:root {
    --primary: #2563eb;
    --success: #16a34a;
    --danger: #dc2626;
    --bg: #f3f4f6;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
}

.container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 600px;
    width: 100%;
}

.site-brand {
    text-align: center;
    margin-bottom: 0.9rem;
}

.site-logo {
    width: 96px;
    height: auto;
    display: inline-block;
}

h1 {
    color: var(--text);
    text-align: center;
    margin: 0 0 2rem;
    font-size: 1.5rem;
}

h2, h3 {
    color: var(--text);
}

.input-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

input, select, button {
    box-sizing: border-box;
    width: 100%;
    font-size: 1rem;
    border-radius: 0.5rem;
    padding: 0.75rem;
    height: auto;
}

input, select {
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s;
}

button {
    border: 2px solid transparent;
    background: var(--primary);
    color: white;
    margin-top: -2px;
}

input:focus, select:focus {
    border-color: var(--primary);
    outline: none;
}

button:hover {
    opacity: 0.9;
}

.result {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: 0.5rem;
}

.result-content {
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: 0.5rem;
}

.success {
    color: var(--success);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.error {
    color: var(--danger);
    margin-bottom: 1rem;
}

.detail-item {
    margin: 0.75rem 0;
    word-break: break-word;
    color: #475569;
    line-height: 1.6;
}

.mono {
    font-family: monospace;
    word-break: break-all;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.explorer-link {
    display: block;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--primary);
}

.acknowledgment {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

.stats {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(243, 244, 246, 0.5);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
}

.stat-item {
    margin: 0.25rem 0;
    display: flex;
    justify-content: space-between;
}

.stat-label {
    font-weight: 500;
    color: #4b5563;
}

.stat-value {
    font-family: monospace;
    color: var(--primary);
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0.5rem 0.5rem 0 0;
}

.tab.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.warning {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.trust-badges {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 2rem;
    font-size: 0.9rem;
}

.result-content .detail-item {
    margin: 0.5rem 0;
}

.result-content .detail-item strong {
    display: inline-block;
    min-width: 120px;
    color: #4b5563;
}

.beta-notice {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    border: 1px solid #90caf9;
}

.beta-notice p {
    margin: 0 0 0.35rem;
    color: #0d47a1;
    font-size: 0.9em;
}

.beta-notice p:last-child {
    margin-bottom: 0;
}

.beta-notice a {
    color: #1565c0;
    text-decoration: underline;
}

.contract-address {
    display: inline-block;
    max-width: 100%;
    padding: 2px 6px;
    border-radius: 6px;
    background: #f8fafc;
    font-family: monospace;
    font-size: 0.95em;
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: top;
}

.seo-content code,
.seo-content .mono,
.seo-content p,
.seo-content li,
.faq-content code,
.faq-content .mono,
.faq-content p,
.faq-content li,
.owner-content p,
.owner-content li {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.legend-box {
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.legend-item {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: #475569;
}

.resource-links {
    margin-top: 1rem;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.resource-links a {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f3f4f6;
    text-decoration: none;
    font-weight: 600;
}

.resource-links a:hover {
    text-decoration: none;
    background: #e5e7eb;
}

.owner-card {
    margin-top: 0.75rem;
    padding: 1rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: #475569;
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.owner-card strong {
    color: var(--text);
}

.owner-card a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.soft-note {
    font-size: 0.92rem;
    color: var(--muted);
}

.share-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.share-btn {
    text-align: center;
}

.share-btn.social {
    background: #f3f4f6;
    color: #111827;
}

.share-btn.social:hover {
    background: #e5e7eb;
    text-decoration: none;
}

.share-btn.copy {
    background: #eef2ff;
    color: #1e3a8a;
}

.risk-details-box {
    margin-top: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.risk-details-box summary {
    cursor: pointer;
    list-style: none;
    padding: 0.85rem 1rem;
    font-weight: 600;
    color: #334155;
}

.risk-details-box summary::-webkit-details-marker {
    display: none;
}

.risk-details-box summary::after {
    content: ' +';
    color: #64748b;
    font-weight: 600;
}

.risk-details-box[open] summary::after {
    content: ' −';
}

.risk-details-inner {
    padding: 0 1rem 1rem;
}

.helpful-strip {
    margin-top: 1rem;
    text-align: center;
}

.helpful-btn {
    width: auto;
    display: inline-block;
    padding: 0.8rem 1.1rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
}

.helpful-btn:hover {
    background: #dcfce7;
    opacity: 1;
}

.helpful-btn.voted,
.helpful-btn:disabled {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
    cursor: default;
    opacity: 1;
}

.helpful-note {
    display: block;
    margin-top: 0.55rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.featured-guides {
    margin-top: 2rem;
    padding: 1.25rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.featured-guides h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    text-align: center;
}

.featured-guides-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.featured-guide-card {
    display: block;
    padding: 1rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.featured-guide-card:hover {
    text-decoration: none;
    background: #eef2ff;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.featured-guide-card strong {
    display: block;
    color: #0f172a;
    margin-bottom: 0.45rem;
}

.featured-guide-card span {
    display: block;
    color: #64748b;
    line-height: 1.6;
    font-size: 0.92rem;
}

.support-explainer {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.support-explainer h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    text-align: center;
}

.support-explainer p {
    margin: 0 0 0.85rem;
    color: #475569;
    line-height: 1.75;
    text-align: center;
}

.support-explainer ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #475569;
}

.support-explainer li {
    margin: 0.45rem 0;
    line-height: 1.7;
}

.support-explainer-actions {
    text-align: center;
    margin-top: 1rem;
}

.support-explainer-actions a {
    display: inline-block;
    padding: 11px 16px;
    border-radius: 10px;
    background: #fff5f5;
    color: #e63946;
    text-decoration: none;
    font-weight: 600;
}

.support-explainer-actions a:hover {
    background: #ffe3e3;
    text-decoration: none;
}

.post-result-support-note {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.post-result-support-text {
    color: #475569;
    line-height: 1.7;
    text-align: center;
    font-size: 0.95rem;
}

.post-result-support-action {
    margin-top: 0.8rem;
    text-align: center;
}

.post-result-support-link {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff5f5;
    color: #e63946;
    text-decoration: none;
    font-weight: 600;
}

.post-result-support-link:hover {
    background: #ffe3e3;
    text-decoration: none;
}

@media (max-width: 640px) {
    body {
        padding: 0.75rem;
        align-items: flex-start;
    }

    .container {
        padding: 1.25rem;
        border-radius: 0.75rem;
    }

    .site-logo {
        width: 78px;
    }
    
    h1 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .tabs {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .tab {
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
        padding: 0.7rem 0.6rem;
        font-size: 0.88rem;
    }

    .result,
    .result-content {
        padding: 1rem;
    }

    .result-content .detail-item strong {
        display: block;
        min-width: 0;
        margin-bottom: 0.2rem;
    }

    .stat-item {
        gap: 0.75rem;
        align-items: flex-start;
    }

    .resource-links a {
        width: 100%;
        text-align: center;
    }

    .share-actions {
        justify-content: center;
    }

    .featured-guides-grid {
        grid-template-columns: 1fr;
    }

    .support-explainer {
        padding: 1rem;
    }

    .post-result-support-note {
        padding: 0.9rem;
    }
}