:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --accent-primary: #00d4aa;
    --accent-secondary: #f59e0b;
    --accent-negative: #ef4444;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: #374151;
    --glow-primary: rgba(0, 212, 170, 0.3);
    --glow-secondary: rgba(245, 158, 11, 0.3);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease-out;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--glow-primary));
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent-primary);
    text-shadow: 0 0 20px var(--glow-primary);
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

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

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.1);
}

.nav-link i {
    width: 18px;
    height: 18px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.market-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.85rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.status-text {
    color: var(--text-secondary);
}

.live-clock {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ticker-wrapper {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    height: 48px;
}

.ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    animation: ticker-scroll 60s linear infinite;
}

.ticker-wrapper:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.ticker-item:hover {
    background: var(--bg-tertiary);
}

.ticker-coin-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.ticker-symbol {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-primary);
}

.ticker-price {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-secondary);
}

.ticker-change {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.ticker-change.positive {
    color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.15);
}

.ticker-change.negative {
    color: var(--accent-negative);
    background: rgba(239, 68, 68, 0.15);
}

.ticker-separator {
    color: var(--border-color);
    padding: 0 8px;
}

.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 144px 24px 64px;
}

.hero-section {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 48px;
    min-height: 400px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 400px;
    background: linear-gradient(to top, rgba(10, 14, 23, 0.95) 0%, rgba(10, 14, 23, 0.4) 50%, transparent 100%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent-secondary);
    color: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    width: fit-content;
    margin-bottom: 16px;
}

.hero-badge i {
    width: 14px;
    height: 14px;
    animation: pulse 1s infinite;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 700px;
}

.hero-excerpt {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 24px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-meta i {
    width: 16px;
    height: 16px;
}

.filters-section {
    margin-bottom: 32px;
}

.filters-wrapper {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.filter-chip.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.filter-chip i {
    width: 16px;
    height: 16px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    margin-bottom: 64px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
}

.section-title i {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.update-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.update-indicator i {
    width: 14px;
    height: 14px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.news-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s ease forwards;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-primary);
}

.news-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
}

.news-card.featured .news-image {
    height: 100%;
    min-height: 280px;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.news-content {
    padding: 20px;
}

.news-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.news-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card.featured .news-title {
    font-size: 1.4rem;
    -webkit-line-clamp: 3;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-meta i {
    width: 14px;
    height: 14px;
}

.load-more-wrapper {
    margin-top: 32px;
    text-align: center;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.load-more-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.load-more-btn i {
    width: 18px;
    height: 18px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-title i {
    width: 18px;
    height: 18px;
    color: var(--accent-secondary);
}

.trending-list, .new-listings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-item, .listing-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.trending-item:hover, .listing-item:hover {
    background: rgba(0, 212, 170, 0.1);
    transform: translateX(4px);
}

.coin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.coin-info {
    flex: 1;
}

.coin-name {
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.coin-symbol {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.coin-price-info {
    text-align: right;
}

.coin-price {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.9rem;
}

.coin-change {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.coin-change.positive { color: var(--accent-primary); }
.coin-change.negative { color: var(--accent-negative); }

.new-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: var(--accent-secondary);
    color: var(--bg-primary);
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-value {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-primary);
}

.new-coins-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
}

.badge-new i {
    width: 14px;
    height: 14px;
}

.new-coins-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.coin-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.coin-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.2);
}

.coin-card .coin-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    font-size: 1.2rem;
}

.coin-card .coin-name {
    font-size: 1rem;
    margin-bottom: 4px;
}

.coin-card .coin-symbol {
    margin-bottom: 12px;
}

.coin-card .coin-price {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.coin-card .coin-change {
    font-size: 0.9rem;
}

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 64px;
}

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

.footer-main {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.footer-brand {
    max-width: 300px;
}

.footer-tagline {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 64px;
}

.footer-column h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-column a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s ease;
}

.toast.success { border-color: var(--accent-primary); }
.toast.error { border-color: var(--accent-negative); }
.toast.warning { border-color: var(--accent-secondary); }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    width: 20px;
    height: 20px;
}

.toast.success .toast-icon { color: var(--accent-primary); }
.toast.error .toast-icon { color: var(--accent-negative); }
.toast.warning .toast-icon { color: var(--accent-secondary); }

.toast-message {
    font-size: 0.9rem;
}

.skeleton {
    pointer-events: none;
}

.skeleton-image {
    height: 180px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.news-card.featured .skeleton-image {
    height: 100%;
    min-height: 280px;
}

.skeleton-content {
    padding: 20px;
}

.skeleton-tag {
    width: 80px;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin-bottom: 12px;
    animation: shimmer 1.5s infinite;
}

.skeleton-title {
    width: 100%;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin-bottom: 8px;
    animation: shimmer 1.5s infinite;
}

.skeleton-title:last-of-type {
    width: 70%;
}

.skeleton-meta {
    width: 150px;
    height: 16px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    animation: shimmer 1.5s infinite;
}

.skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    animation: shimmer 1.5s infinite;
}

.skeleton-avatar.lg {
    width: 56px;
    height: 56px;
    margin: 0 auto;
}

.skeleton-info {
    flex: 1;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    animation: shimmer 1.5s infinite;
}

.skeleton-hero {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-ticker {
    width: 200vw;
    height: 100%;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.ticker-loading {
    display: flex;
    width: 100%;
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar-section:last-child {
        grid-column: span 2;
    }
    
    .new-coins-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .header-right {
        gap: 12px;
    }
    
    .market-status {
        display: none;
    }
    
    .ticker-wrapper {
        top: 105px;
    }
    
    .main {
        padding-top: 176px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar-section:last-child {
        grid-column: span 1;
    }
    
    .new-coins-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-main {
        flex-direction: column;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .filters-wrapper {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-chip {
        flex-shrink: 0;
    }
    
    .new-coins-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
