/* Uniswap Consumer DEX Interface Theme */
:root {
    --bg-dark: #0B0C10;
    --bg-card: rgba(19, 21, 33, 0.75);
    --bg-card-hover: rgba(26, 29, 45, 0.85);
    --border-color: rgba(255, 0, 122, 0.18);
    --border-glow: rgba(255, 0, 122, 0.4);
    --primary-pink: #FF007A;
    --primary-pink-hover: #E8006F;
    --secondary-violet: #9747FF;
    --text-main: #FFFFFF;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --glass-blur: blur(20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(255, 0, 122, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 35%, rgba(151, 71, 255, 0.1) 0%, transparent 45%);
    background-attachment: fixed;
}

/* Market Ticker Bar */
.market-ticker-bar {
    background: rgba(11, 12, 16, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 24px;
    font-size: 0.82rem;
    overflow: hidden;
    white-space: nowrap;
}
.ticker-content {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}
.t-name {
    color: var(--text-main);
}
.t-up {
    color: #00FFA3;
    font-weight: 600;
}
.t-badge {
    background: rgba(0, 255, 163, 0.15);
    color: #00FFA3;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}
.ticker-sep {
    color: var(--text-dim);
}

/* Header */
.dex-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: var(--glass-blur);
    background: rgba(11, 12, 16, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #FFFFFF 0%, #FF007A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.nav-link:hover, .nav-link.active {
    color: #FF007A;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}
.network-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
.net-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00FFA3;
    box-shadow: 0 0 8px #00FFA3;
}
.btn-connect-wallet {
    background: linear-gradient(135deg, #FF007A, #9747FF);
    color: #FFF;
    border: none;
    padding: 10px 22px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(255, 0, 122, 0.35);
    transition: all 0.2s ease;
}
.btn-connect-wallet:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 0, 122, 0.55);
}

/* Hero Section */
.dex-hero {
    padding: 60px 24px 80px;
}
.hero-container {
    max-width: 1240px;
    margin: 0 auto;
}
.hero-header-text {
    text-align: center;
    max-width: 840px;
    margin: 0 auto 50px;
}
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 0, 122, 0.12);
    border: 1px solid rgba(255, 0, 122, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #FF007A;
    margin-bottom: 20px;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}
.gradient-text {
    background: linear-gradient(135deg, #FF007A 20%, #9747FF 60%, #00FFA3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.6;
}

/* Hero Grid (Swap Card + Image) */
.hero-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 40px;
    align-items: center;
}

/* Swap Card */
.swap-card-box {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 0, 122, 0.15);
    border-radius: 28px;
    padding: 24px;
    position: relative;
}
.swap-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.swap-modes {
    display: flex;
    gap: 8px;
}
.mode-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mode-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #FFF;
}
.btn-settings-gear {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-settings-gear:hover {
    color: #FFF;
}

/* Swap Input Group */
.swap-input-group {
    background: rgba(11, 12, 16, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 6px;
    transition: border-color 0.2s;
}
.swap-input-group:focus-within {
    border-color: var(--border-glow);
}
.input-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.input-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.token-amount-input {
    background: transparent;
    border: none;
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    width: 100%;
    outline: none;
}
.token-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 8px 14px;
    color: #FFF;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.token-selector-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}
.token-sym-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.eth-dot { background: #627EEA; }
.uni-dot { background: #FF007A; }
.token-chevron {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.input-sub-row {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-dim);
}
.price-impact-tag {
    color: #00FFA3;
    font-weight: 600;
}

/* Switcher Button */
.swap-switch-wrap {
    display: flex;
    justify-content: center;
    margin: -14px 0;
    position: relative;
    z-index: 2;
}
.btn-swap-switch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #181A25;
    border: 2px solid var(--border-color);
    color: #FF007A;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.2s;
}
.btn-swap-switch:hover {
    transform: rotate(180deg);
    border-color: #FF007A;
}

/* Details Box */
.swap-details-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 12px 16px;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
}
.detail-row {
    display: flex;
    justify-content: space-between;
}
.d-label {
    color: var(--text-dim);
}
.d-val {
    color: var(--text-main);
    font-weight: 600;
}
.gas-val {
    color: #00FFA3;
}
.routing-val {
    color: #FF007A;
}

.btn-swap-execute {
    width: 100%;
    background: linear-gradient(135deg, #FF007A, #9747FF);
    color: #FFF;
    border: none;
    padding: 16px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(255, 0, 122, 0.4);
    transition: all 0.2s ease;
}
.btn-swap-execute:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 0, 122, 0.6);
}

/* Hero Image Card */
.hero-image-card {
    position: relative;
}
.image-inner-frame {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(151, 71, 255, 0.2);
}
.hero-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}
.hero-image-card:hover .hero-img {
    transform: scale(1.02);
}
.image-floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(11, 12, 16, 0.85);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 16px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.badge-top-right {
    top: 20px;
    right: 20px;
}
.badge-bottom-left {
    bottom: 20px;
    left: 20px;
}
.badge-icon {
    font-size: 1.3rem;
}
.badge-text {
    display: flex;
    flex-direction: column;
}
.badge-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: #FFF;
}
.badge-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Stats Ribbon */
.stats-ribbon {
    background: rgba(19, 21, 33, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 40px 24px;
}
.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}
.stat-cell {
    text-align: center;
}
.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    color: #FFF;
    background: linear-gradient(135deg, #FFF, #FF007A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-title {
    font-size: 0.95rem;
    color: var(--text-muted);
}
.stat-sep {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
}

/* Bento Grid */
.bento-section {
    padding: 90px 24px;
}
.bento-container {
    max-width: 1200px;
    margin: 0 auto;
}
.section-title-wrap {
    text-align: center;
    margin-bottom: 50px;
}
.sec-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(151, 71, 255, 0.15);
    border: 1px solid rgba(151, 71, 255, 0.3);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #9747FF;
    margin-bottom: 12px;
}
.sec-h2 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
}
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.bento-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    transition: transform 0.2s, border-color 0.2s;
}
.bento-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
}
.bento-wide {
    grid-column: span 2;
}
.bento-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: #FF007A;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}
.bento-card h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.bento-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
.bento-metric-chip {
    display: inline-block;
    margin-top: 20px;
    padding: 6px 14px;
    background: rgba(0, 255, 163, 0.1);
    border: 1px solid rgba(0, 255, 163, 0.25);
    border-radius: 12px;
    color: #00FFA3;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Pools Section Table */
.pools-section {
    padding: 40px 24px 90px;
}
.pools-container {
    max-width: 1200px;
    margin: 0 auto;
}
.table-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow-x: auto;
}
.pools-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.pools-table th {
    padding: 18px 24px;
    background: rgba(11, 12, 16, 0.8);
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pools-table td {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.95rem;
}
.pool-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fee-badge {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
}
.apr-highlight {
    color: #00FFA3;
    font-weight: 700;
}
.pool-trade-link {
    color: #FF007A;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 14px;
    background: rgba(255, 0, 122, 0.1);
    border: 1px solid rgba(255, 0, 122, 0.25);
    border-radius: 12px;
    transition: all 0.2s;
}
.pool-trade-link:hover {
    background: #FF007A;
    color: #FFF;
}

/* =======================================================
   ARTICLE STYLING (Target: 8,400 chars)
   ======================================================= */
.article-section-wrapper {
    padding: 90px 24px;
    background: rgba(11, 12, 16, 0.9);
    border-top: 1px solid rgba(255, 0, 122, 0.15);
    border-bottom: 1px solid rgba(255, 0, 122, 0.15);
}
.article-content-container {
    max-width: 900px;
    margin: 0 auto;
}
.uniswap-deep-dive-article {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 48px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.5);
}
.article-meta-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.article-badge {
    color: #FF007A;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.article-read-time {
    color: var(--text-dim);
    font-size: 0.8rem;
}
.uniswap-deep-dive-article h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #FFFFFF, #FF007A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.article-lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #E2E8F0;
    margin-bottom: 32px;
}
.uniswap-deep-dive-article h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFF;
    margin-top: 36px;
    margin-bottom: 16px;
    border-left: 3px solid #FF007A;
    padding-left: 14px;
}
.uniswap-deep-dive-article p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 18px;
}
.math-callout-card {
    background: rgba(11, 12, 16, 0.85);
    border: 1px solid rgba(255, 0, 122, 0.25);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 24px 0;
}
.formula-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #9747FF;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.formula-latex {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: #00FFA3;
    padding: 8px 0;
}
.formula-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 6px;
}

/* FAQ */
.faq-section {
    padding: 80px 24px;
}
.faq-container {
    max-width: 860px;
    margin: 0 auto;
}
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 24px;
}
.faq-question {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #FFF;
    margin-bottom: 10px;
}
.faq-answer {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Wallet Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-backdrop.open {
    display: flex;
}
.wallet-modal-card {
    background: #12141F;
    border: 1px solid rgba(255, 0, 122, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 0, 122, 0.2);
    border-radius: 28px;
    padding: 32px;
    width: 440px;
    max-width: 90vw;
}
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.modal-head h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
}
.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
}
.modal-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wallet-option {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.wallet-option:hover {
    background: rgba(255, 0, 122, 0.1);
    border-color: rgba(255, 0, 122, 0.35);
}
.w-icon {
    font-size: 1.6rem;
}
.w-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.w-info strong {
    font-size: 0.95rem;
    color: #FFF;
}
.w-info span {
    font-size: 0.78rem;
    color: var(--text-dim);
}
.w-arrow {
    color: var(--text-dim);
}

/* Footer */
.dex-footer {
    background: #07080B;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 70px 24px 30px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 16px;
}
.footer-col-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 18px;
    max-width: 340px;
}
.footer-domain-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-dim);
}
.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    margin-bottom: 18px;
    color: #FFF;
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}
.footer-col a:hover {
    color: #FF007A;
}
.footer-bottom-bar {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.82rem;
    color: var(--text-dim);
}

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.4rem;
    }
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-wide {
        grid-column: span 1;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}
