/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-page: #FAFAFA;
    --bg-surface: #FFFFFF;
    --text-primary: #1A1A2E;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border-color: #E2E8F0;
    --accent-primary: #4F46E5;
    --accent-secondary: #F97316;
    --tx-dot: #10B981;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    background: var(--bg-page);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-secondary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

/* Header Styles */
.header-container {
    display: flex;
    flex-direction: column;
    padding: 20px 32px 12px;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
    gap: 12px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 140px;
}

.logo {
    max-height: 40px;
    max-width: 140px;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.title-container {
    text-align: center;
    flex: 1;
}

.title-container h1 {
    font-size: 26px;
    font-weight: 700;
    font-family: 'Fraunces', serif;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin: 0;
}

.title-container .ca-address {
    font-size: 11px;
    margin-top: 4px;
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
}

/* Navigation Styles */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 4px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-page);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(79, 70, 229, 0.08);
}

/* Blockchain Selector Dropdown */
.blockchain-selector {
    z-index: 1000;
    position: relative;
    width: 140px;
}

.bloom-dropdown {
    position: relative;
}

.bloom-trigger {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 10px 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    justify-content: space-between;
}

.bloom-trigger:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.bloom-trigger .chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
}

.bloom-dropdown.open .bloom-trigger .chevron {
    transform: rotate(180deg);
}

.bloom-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
    transform-origin: top right;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    min-width: 180px;
}

.bloom-dropdown.open .bloom-menu {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.bloom-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s ease;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
}

.bloom-item:hover {
    background: var(--bg-page);
}

.bloom-item.selected {
    background: rgba(79, 70, 229, 0.08);
    color: var(--accent-primary);
}

.bloom-item .chain-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.bloom-item .chain-icon.ethereum {
    background: linear-gradient(135deg, #627EEA, #3C3C3D);
    color: white;
}

.bloom-item .chain-icon.base {
    background: #0052FF;
    color: white;
}

.bloom-item .chain-icon.bitcoin {
    background: linear-gradient(135deg, #F7931A, #E68A00);
    color: white;
}

.bloom-trigger .current-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

.bloom-trigger .current-icon.ethereum {
    background: linear-gradient(135deg, #627EEA, #3C3C3D);
    color: white;
}

.bloom-trigger .current-icon.base {
    background: #0052FF;
    color: white;
}

.bloom-trigger .current-icon.bitcoin {
    background: linear-gradient(135deg, #F7931A, #E68A00);
    color: white;
}

/* Content Sections */
.intro-section {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 20px 24px;
    text-align: center;
    line-height: 1.7;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.content-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 48px 64px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

.content-section h1 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Fraunces', serif;
    line-height: 1.2;
}

.content-section h2 {
    margin: 40px 0 16px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Fraunces', serif;
    line-height: 1.3;
}

.content-section h3 {
    margin: 28px 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Fraunces', serif;
}

.content-section p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
}

.content-section ul, .content-section ol {
    margin-bottom: 16px;
    padding-left: 24px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.content-section li {
    margin-bottom: 8px;
}

.content-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

.content-section a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.content-section a:hover {
    border-bottom-color: var(--accent-primary);
}

/* FAQ specific styles */
.faq-category {
    margin-bottom: 48px;
}

.faq-category h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-primary);
}

.faq-item {
    margin-bottom: 24px;
}

.faq-question {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 8px;
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 20px;
}

/* Footer Styles */
footer {
    background: var(--bg-surface);
    padding: 32px 20px;
    margin-top: 48px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--accent-primary);
}

.footer-nav span {
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 16px 12px;
        gap: 10px;
    }

    .header-top {
        gap: 12px;
    }

    .logo {
        max-height: 32px;
        max-width: 100px;
    }

    .logo-link {
        width: 120px;
    }

    .title-container h1 {
        font-size: 18px;
    }

    .title-container .ca-address {
        font-size: 9px;
    }

    .main-nav {
        gap: 4px;
    }

    .nav-link {
        font-size: 13px;
        padding: 5px 10px;
    }

    .blockchain-selector {
        width: 120px;
    }

    .bloom-trigger {
        padding: 8px 14px;
        min-width: 120px;
        font-size: 13px;
    }

    .bloom-trigger .current-icon {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }

    .content-section {
        padding: 32px 24px;
        margin: 24px 12px;
    }

    .content-section h1 {
        font-size: 26px;
        margin-bottom: 24px;
    }

    .content-section h2 {
        font-size: 20px;
        margin: 32px 0 12px;
    }

    .content-section h3 {
        font-size: 16px;
        margin: 24px 0 10px;
    }

    .content-section p {
        font-size: 14px;
    }

    .intro-section {
        margin: 0 12px 16px;
        padding: 16px;
        font-size: 13px;
    }

    footer {
        padding: 24px 16px;
        margin-top: 32px;
    }

    footer .footer-content {
        font-size: 12px;
    }

    .footer-nav {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 12px 10px;
    }

    .header-top {
        gap: 8px;
    }

    .logo {
        max-height: 28px;
        max-width: 80px;
    }

    .logo-link {
        width: 100px;
    }

    .title-container h1 {
        font-size: 15px;
    }

    .title-container .ca-address {
        font-size: 8px;
    }

    .main-nav {
        gap: 2px;
    }

    .nav-link {
        font-size: 12px;
        padding: 4px 8px;
    }

    .blockchain-selector {
        width: 100px;
    }

    .bloom-trigger {
        padding: 6px 10px;
        min-width: 100px;
        font-size: 12px;
        gap: 4px;
    }

    .bloom-trigger .current-icon {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }

    .bloom-trigger .chevron {
        width: 12px;
        height: 12px;
    }

    #currentChainName {
        display: none;
    }

    .content-section {
        padding: 24px 16px;
    }

    .content-section h1 {
        font-size: 22px;
    }

    .content-section h2 {
        font-size: 18px;
    }

    .content-section h3 {
        font-size: 15px;
    }

    .content-section p {
        font-size: 13px;
    }

    footer {
        padding: 20px 12px;
    }
}
