:root {
    /* Dark Mode (Default) */
    --md-sys-color-background: #050505;
    --md-sys-color-surface: #101010;
    --md-sys-color-surface-container: #181818;
    --md-sys-color-on-surface: #ffffff;
    --md-sys-color-text-secondary: #9aa0a6;
    --md-sys-color-primary: #45A29E; /* Electric Blue */
    --md-sys-color-info: #f1f1f1; /* Electric Blue */
    --md-sys-color-outline: rgba(255, 255, 255, 0.1);
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 24px;
    --md-text: #ffffff;
    --nav-height: 72px;
}

:root.light-mode {
    /* Light Mode */
    --md-sys-color-background: #fdfdfd;
    --md-sys-color-surface: #ffffff;
    --md-sys-color-surface-container: #f0f2f5;
    --md-sys-color-on-surface: #1f1f1f;
    --md-sys-color-text-secondary: #444746;
    --md-sys-color-primary: #0b57d0;
    --md-sys-color-info: #888; /* Electric Blue */
    --md-sys-color-outline: rgba(0, 0, 0, 0.1);
    --md-text: #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface);
    font-family: 'Roboto', sans-serif;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Lazy Loading & Skeleton Effect --- */

/* Base styling for image containers to show skeleton */
.card-image,
.bento-item,
.airdrop-icon,
.article-hero-img {
    background-color: var(--md-sys-color-surface-container);
    position: relative;
    overflow: hidden;
}

/* Shimmer Animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Apply shimmer to containers while image is loading */
.card-image::before,
.bento-item::before,
.article-hero-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            90deg,
            var(--md-sys-color-surface-container) 25%,
            var(--md-sys-color-outline) 50%,
            var(--md-sys-color-surface-container) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    z-index: 1; /* Skeleton is Layer 1 */
    pointer-events: none;
}

/* Specific fix for airdrop icon which is an IMG tag itself */
img.airdrop-icon {
    background-color: var(--md-sys-color-surface-container);
}

/* The Image Itself - Strict Lazy Loading Transition */
img.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

img.lazy-load.loaded {
    opacity: 1;
}

/* FIX: Ensure ALL images (lazy or eager) sit ABOVE the skeleton (z-index 1) */
.card-image img,
.bento-item img,
.article-hero-img {
    position: relative;
    z-index: 2; /* Image is Layer 2 */
}

/* Ensure bento images fill container properly */
.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    background-color: var(--md-sys-color-surface-container);
}

/* Ensure card images fill container */
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(var(--md-sys-color-background), 0.8);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1446px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 40px;
    height: 100%; /* Important: inherit height from navbar */
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
    white-space: nowrap;
    height: 100%;
}

.logo-icon {
    color: #F7931A; /* Orange Brand Color */
    display: flex;
    align-items: center;
}

.logo-text {
    width: 106px;
    height: 18px;
    background-color: var(--md-text);
    -webkit-mask-image: url('logo-text.svg');
    mask-image: url('logo-text.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.nav-menu {
    display: flex;
    gap: 24px;
    align-items: center;
    height: 100%;
    flex-wrap: nowrap; /* Prevent wrap */
}

.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-text-secondary);
    transition: color 0.2s;

    /* ALIGNMENT FIX */
    display: flex;
    align-items: center; /* Vertically center the text */
    height: 100%;        /* Fill the navbar height */
    padding: 0 4px;      /* Only horizontal padding */
    position: relative;  /* For border positioning */
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--md-sys-color-on-surface);
}

.nav-menu a.active {
    color: var(--md-sys-color-primary);
    font-weight: 700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--md-sys-color-surface-container);
    padding: 8px 16px;
    border-radius: 99px;
    width: 240px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--md-sys-color-on-surface);
    margin-left: 8px;
    width: 100%;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
}

/* Theme Toggle */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--md-sys-color-text-secondary);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
}

.light-mode .icon-sun { display: none; }
.light-mode .icon-moon { display: block; }
:not(.light-mode) .icon-sun { display: block; }
:not(.light-mode) .icon-moon { display: none; }

/* Language Selector */
.custom-select {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    cursor: pointer;
}

.select-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    white-space: nowrap;
}

.select-trigger:hover {
    background: var(--md-sys-color-surface-container);
}

.lang-globe {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.select-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 12px;
    padding: 8px;
    min-width: 140px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    z-index: 101;

    /* Scrollable Dropdown Fix */
    max-height: calc(100dvh - var(--nav-height));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--md-sys-color-outline) transparent;
}

.select-options::-webkit-scrollbar { width: 4px; }
.select-options::-webkit-scrollbar-track { background: transparent; }
.select-options::-webkit-scrollbar-thumb { background-color: var(--md-sys-color-outline); border-radius: 4px; }

.custom-select.open .select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.option {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    display: block;
}

.option:hover, .option.selected {
    background: var(--md-sys-color-surface-container);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--md-sys-color-on-surface);
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-container {
    position: fixed;
    inset: 0;
    z-index: 200;
    visibility: hidden;
    transition: visibility 0.3s;
}

.mobile-menu-container.active {
    visibility: visible;
}

.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-container.active .mobile-menu-backdrop {
    opacity: 1;
}

.mobile-menu-drawer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--md-sys-color-surface);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mobile-menu-container.active .mobile-menu-drawer {
    transform: translateX(0);
}

.mobile-menu-header {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.close-menu {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--md-sys-color-text-secondary);
    cursor: pointer;
    padding: 8px;
}

.mobile-links {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-links a {
    font-size: 18px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

/* --- Priority Plus Nav Dropdown --- */
.nav-more-container {
    position: relative;
    display: none;
    align-items: center;
    height: 100%;
}

.nav-more-btn {
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
    padding: 0 4px;
    transition: color 0.2s;
}

.nav-more-btn:hover, .nav-more-container.active .nav-more-btn {
    color: var(--md-sys-color-on-surface);
}

.nav-more-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 102;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.2s;
}

.nav-more-container.active .nav-more-dropdown {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.nav-more-dropdown a {
    display: block;
    height: auto;
    padding: 10px 12px;
    border-radius: 8px;
    border-bottom: none;
    white-space: nowrap;
    text-align: left;
}

.nav-more-dropdown a:hover {
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-primary);
}

/* --- Main Layout --- */
.main-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 100px 24px 60px;
    min-height: 80vh;
}

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    min-height: 500px;
    margin-bottom: 80px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 55%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--md-sys-color-primary);
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 56px;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 16px;
    background: linear-gradient(to right, var(--md-sys-color-on-surface), var(--md-sys-color-text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: var(--md-sys-color-text-secondary);
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

.btn-primary {
    background: var(--md-sys-color-on-surface);
    color: var(--md-sys-color-background);
    padding: 8px 22px;
    border-radius: 99px;
    font-weight: 500;
    font-size: 14px;
    transition: opacity 0.2s;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--md-sys-color-outline);
    color: var(--md-sys-color-on-surface);
    padding: 8px 22px;
    border-radius: 99px;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-primary:hover { opacity: 0.9; }
.btn-secondary:hover { background: var(--md-sys-color-surface-container); }

/* Hero Bento Visual */
.hero-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-bento {
    position: relative;
    width: 100%;
    max-width: 600px;
    -webkit-mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
    mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

.bento-item {
    position: absolute;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    width 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
    height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
    left 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
    top 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bento-item:hover {
    z-index: 10;
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.bento-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    z-index: 3;
}

.bento-title {
    font-weight: 700;
    display: block;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hero Stats */
.stats-grid {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    /* Horizontal Scroll Logic */
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    /* Fade Effect on Right Edge */
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.stats-grid::-webkit-scrollbar { display: none; }

.stat-card {
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 12px;
    padding: 12px 16px;
    flex: 0 0 auto;
    min-width: 130px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    border-color: var(--md-sys-color-primary);
    transform: translateY(-2px);
}

.stat-top {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 4px;
}

.stat-value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
    font-size: 16px;
    color: var(--md-sys-color-on-surface);
}

.stat-unit {
    font-size: 10px;
    color: var(--md-sys-color-text-secondary);
}

.stat-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.stat-symbol {
    font-weight: 700;
    color: var(--md-sys-color-text-secondary);
}

.stat-change {
    font-weight: 500;
}

.stat-change.positive { color: #14f195; }
.stat-change.negative { color: #ff4d4d; }


/* --- Sections --- */
.section-container {
    margin-bottom: 80px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    margin-top: 32px;
}
.section-header-tips {
    margin-bottom: 32px;
    color: var(--md-sys-color-info);
    font-size: small;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.section-header.header-stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.section-header.header-stacked .filters {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0;
}

.filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--md-sys-color-outline);
    color: var(--md-sys-color-text-secondary);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--md-sys-color-on-surface);
    color: var(--md-sys-color-background);
    border-color: transparent;
}

/* Grids */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

@media (min-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* News Card */
.news-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background: var(--md-sys-color-surface);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.news-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--md-sys-color-on-surface);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    font-size: 13px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
}

.light-mode .card-excerpt {
    color: #3c4043;
}

.card-meta {
    font-size: 12px;
    color: var(--md-sys-color-info);
    font-weight: 500;
    margin-top: auto;
}

/* --- Homepage Airdrops --- */
.home-airdrop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.airdrop-card {
    background: var(--md-sys-color-surface);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--md-sys-color-outline);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: transform 0.2s;

    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
}

.airdrop-card:hover {
    transform: translateY(-2px);
    border-color: var(--md-sys-color-primary);
}

.airdrop-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.airdrop-info {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    /* FIX: Prevents grid blowout from non-wrapping content */
    min-width: 0;
}

.airdrop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    width: 100%;
}

.airdrop-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    /* Truncation styles */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* FIX: Allows flex child to truncate */
    min-width: 0;
    padding-right: 8px; /* Buffer from badges */
}

.airdrop-badges {
    display: flex;
    gap: 6px;
    margin-left: auto;
    /* FIX: Protect badges from being squashed */
    flex-shrink: 0;
}

.badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.live { background: rgba(20, 241, 149, 0.1); color: #14f195; }
.badge.upcoming { background: rgba(69, 162, 158, 0.1); color: #45a29e; }
.badge.ended { background: rgba(150, 150, 150, 0.1); color: #999; }

.airdrop-desc {
    font-size: 13px;
    color: var(--md-sys-color-text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.airdrop-meta {
    font-size: 11px;
    color: var(--md-sys-color-primary);
    font-weight: 500;
}
.airdrop-time {
    font-size: 11px;
    color: var(--md-sys-color-info);
    margin-top: 6px;
}

.airdrop-action {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    margin-top: 4px;
}

.btn-claim {
    width: 100%;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    border: none;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-claim:hover {
    background: var(--md-sys-color-primary);
    color: white;
}

/* --- Airdrop Page Specifics --- */
.airdrop-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.airdrop-list-container .airdrop-card {
    display: flex;
    align-items: center;
    grid-template-columns: none;
    grid-template-rows: none;
}

.airdrop-list-container .airdrop-info {
    flex: 1;
    display: block;
}

.airdrop-list-container .airdrop-action {
    width: auto;
    margin-top: 0;
}

.airdrop-list-container .btn-claim {
    width: auto;
    padding: 8px 24px;
}

/* Intro & Promo */
.page-intro {
    margin-bottom: 24px;
}
.page-intro p {
    color: var(--md-sys-color-text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
    max-width: 800px;
}
.promo-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.promo-link {
    font-size: 12px;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
    padding: 4px 12px;
    border-radius: 99px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 3px;
}
.promo-link:hover {
    border-color: var(--md-sys-color-primary);
    background: rgba(69, 162, 158, 0.05);
}
.promo-link.premium {
    background: linear-gradient(45deg, #F7931A, #f1c40f);
    color: white;
    border: none;
    font-weight: 600;
}

/* --- Alpha/Market Tables --- */
.alpha-header-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.sub-nav {
    display: flex;
    border-bottom: 1px solid var(--md-sys-color-outline);
    margin-bottom: 32px;
}

.sub-nav-item {
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 500;
    color: var(--md-sys-color-text-secondary);
    position: relative;
}

.sub-nav-item.active {
    color: var(--md-sys-color-primary);
}

.sub-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--md-sys-color-primary);
}

.alpha-section { display: none; }
.alpha-section.active { display: block; }

.table-wrapper-card {
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
}

.table-group {
    margin-bottom: 40px;
}

.table-group .table-wrapper-card {
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}
.table-group {
    background: var(--md-sys-color-surface);
    border-radius: 12px;
    border: 1px solid var(--md-sys-color-outline);
    overflow: hidden;
}

.alpha-table-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 16px;
    border-bottom: 1px solid var(--md-sys-color-outline);
    background: var(--md-sys-color-surface-container);
}

.table-scroll-container {
    overflow-x: auto;
    padding: 0;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.market-table th {
    text-align: left;
    padding: 14px 24px;
    font-size: 11px;
    font-weight: 700;
    color: var(--md-sys-color-text-secondary);
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: var(--md-sys-color-surface-container);
    border-bottom: 1px solid var(--md-sys-color-outline);
}

.market-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.market-table th.sortable:hover {
    color: var(--md-sys-color-on-surface);
}
.market-table th.sortable::after {
    content: '↕';
    display: inline-block;
    margin-left: 4px;
    opacity: 0.3;
    font-size: 10px;
}
.market-table th.sortable.asc::after { content: '↑'; opacity: 1; color: var(--md-sys-color-primary); }
.market-table th.sortable.desc::after { content: '↓'; opacity: 1; color: var(--md-sys-color-primary); }

.market-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--md-sys-color-outline);
    font-size: 14px;
    font-weight: 500;
}

.market-table tr:last-child td {
    border-bottom: none;
}

.asset-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coin-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F7931A;
    font-weight: 700;
    font-size: 14px;
}

.coin-symbol {
    font-size: 12px;
    color: var(--md-sys-color-text-secondary);
}
.circle.red {
    --circle-color: red;
}
.circle.yellow {
    --circle-color: #f0b90b;
}
.circle.green {
    --circle-color: #22c55e;
}
/* ---------- 基础圆圈 ---------- */
.circle {
    width: 0.8em;               /* 圆的直径 */
    height: 0.8em;
    background: var(--circle-color);      /* 颜色 */
    border-radius: 50%;        /* 圆形 */
    display: block;
}

.color-green { color: #14f195; }
.color-red { color: #ff4d4d; }
.color-amount { color: rgb(225 113 10) }
.color-amount:before { content: "$" }

/* --- Learn Grid --- */
.learn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

@media (min-width: 1200px) {
    .learn-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.learn-card {
    display: flex;
    flex-direction: column;
    background: var(--md-sys-color-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--md-sys-color-outline);
    transition: transform 0.2s;
}

.learn-card:hover {
    transform: translateY(-4px);
    border-color: var(--md-sys-color-primary);
}

.learn-card .card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: transparent;
}

/* --- Article Page --- */
.article-container {
    max-width: 800px;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

.article-header h1 {
    font-size: 36px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.article-meta-line {
    font-size: 14px;
    color: var(--md-sys-color-text-secondary);
    margin-bottom: 32px;
}

.article-hero-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 40px;
}

.article-body {
    font-size: 18px;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface);
}

/* Related Articles */
.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.related-grid .news-card {
    flex-direction: row;
    align-items: flex-start;
    height: auto;
}

.related-grid .card-image {
    width: 100px;
    height: 100%;
    aspect-ratio: 1/1;
    flex-shrink: 0;
}

.related-grid .card-content {
    padding: 12px;
}

.related-grid .card-title {
    font-size: 14px;
    margin-bottom: 4px;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 8px;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(.disabled) {
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-primary);
}

.page-btn.active {
    background: var(--md-sys-color-primary);
    color: white;
    border-color: var(--md-sys-color-primary);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Footer --- */
footer {
    background: var(--md-sys-color-surface);
    border-top: 1px solid rgba(255,255,255,0.03);
    padding: 60px 0 30px;
}

.footer-content {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.copyright {
    font-size: 13px;
    color: var(--md-sys-color-text-secondary);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    transition: all 0.2s;
}

.social-links a:hover {
    background: var(--md-sys-color-primary);
    color: white;
}

.social-links svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer-links-row {
    border-top: 1px solid rgba(255,255,255,0.03);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 13px;
    color: var(--md-sys-color-text-secondary);
    align-items: center;
}

.footer-links-label {
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
}

.footer-links-row a:hover {
    color: var(--md-sys-color-primary);
}

/* --- Mobile Media Queries --- */
@media (max-width: 992px) {
    .nav-menu, .search-bar { display: none; }

    /* Optimized Mobile Nav */
    .nav-container { padding: 0 12px; }
    .nav-left { gap: 8px; }
    .logo { font-size: 18px; gap: 8px; }
    .logo-icon svg { width: 20px; height: 20px; }
    .logo-text { width: 82px; height: 14px; }

    .nav-actions { gap: 6px; }
    .select-trigger { padding: 4px 8px; font-size: 11px; white-space: nowrap; }
    .lang-globe { width: 12px; height: 12px; }
    .btn-icon { padding: 4px; }
    .btn-icon svg { width: 20px; height: 20px; }
    .mobile-menu-btn { display: block; padding: 0; }

    .hero-container { flex-direction: column; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-content {
        max-width: 100%;
    }

    /* Stats Grid Mobile Update: Fixed width container to prevent parent break */
    .stats-grid {
        justify-content: flex-start;
        flex-wrap: nowrap;
        width: 100vw; /* Constrain to viewport */
        max-width: 100%;
        margin-left: -24px; /* Pull left to counteract main padding */
        margin-right: -24px; /* Pull right */
        padding-left: 24px; /* Restore visual padding */
        padding-right: 24px;
        mask-image: linear-gradient(to right, transparent 0%, black 5%, black 90%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 90%, transparent 100%);
    }

    .stat-card {
        min-width: 130px;
        flex-grow: 0;
    }
    .hero h1 { font-size: 40px; }
    .hero-bento { max-width: 100%; }

    .hero-visual {
        width: 100%;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .main-wrapper { padding-top: 80px; }

    .hero {
        min-height: auto;
        margin-bottom: 40px;
    }

    .home-airdrop-grid { grid-template-columns: 1fr; }

    .airdrop-list-container .airdrop-card { flex-wrap: wrap; }

    .airdrop-list-container .btn-claim { width: 100%; margin-top: 12px; }

    /* Footer Stack */
    .footer-top-row { flex-direction: column; gap: 24px; align-items: center; text-align: center; }
    .footer-brand { align-items: center; }
    .footer-links-row { justify-content: center; }

    /* Filters horizontal scroll */
    .section-header { flex-wrap: nowrap; gap: 12px; overflow: hidden; }
    .section-header h2 {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        mask-image: linear-gradient(to right, black 80%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
    }

    .filters {
        flex: 1;
        overflow-x: auto;
        flex-wrap: nowrap;
        margin-right: -24px;
        padding-right: 24px;
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
        scrollbar-width: none;
    }
    .filters::-webkit-scrollbar { display: none; }
    .filter-btn { white-space: nowrap; flex-shrink: 0; }
    .btn-icon-link { flex-shrink: 0; }

    /* Vertical Header Override */
    .section-header.header-stacked {
        flex-direction: column;
        align-items: flex-start;
    }
    .section-header.header-stacked h2 { white-space: normal; mask-image: none; }
    .section-header.header-stacked .filters { width: 100%; margin-top: 16px; mask-image: none; }

    /* Mobile Table Optimization */
    .table-scroll-container {
        padding: 0;
        overflow-x: hidden;
    }
    .market-table {
        min-width: auto;
    }
    .market-table th, .market-table td {
        padding: 8px 4px;
        font-size: 11px;
        white-space: normal;
    }
    .asset-cell { gap: 6px; }
    .coin-icon { width: 24px; height: 24px; font-size: 10px; }
}