/* Coin Advice - Enterprise Level Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    /* Primary Colors */
    --primary: #7C3AED;
    --primary-light: #A78BFA;
    --primary-dark: #5B21B6;
    --accent: #06B6D4;
    --accent-light: #22D3EE;
    
    /* Background Colors */
    --bg-primary: #0A0A0F;
    --bg-secondary: #12121A;
    --bg-tertiary: #1A1A24;
    --bg-card: #1E1E2A;
    --bg-card-hover: #252532;
    
    /* Text Colors */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    /* Status Colors */
    --success: #10B981;
    --success-light: #34D399;
    --warning: #F59E0B;
    --warning-light: #FBBF24;
    --danger: #EF4444;
    --danger-light: #F87171;
    --info: #3B82F6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
    --gradient-accent: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
    --gradient-card: linear-gradient(180deg, rgba(124, 58, 237, 0.1) 0%, transparent 100%);
    --gradient-hero: radial-gradient(ellipse at top, rgba(124, 58, 237, 0.15) 0%, transparent 50%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.3);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

p { color: var(--text-secondary); }

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover { color: var(--accent); }

/* Navbar */
.navbar {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--primary-light);
    background: rgba(124, 58, 237, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    min-width: 220px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    margin-top: 0;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.dropdown-content a:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text-primary);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    padding-top: 100px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 0 3rem;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease forwards;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    margin-bottom: 0.75rem;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    position: relative;
}

.tool-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    position: relative;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Crypto Cards */
.crypto-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-base);
}

.crypto-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.coin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.coin-header strong {
    font-size: 1.125rem;
    color: var(--text-primary);
}

.coin-symbol {
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.coin-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}

.price-change {
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    display: inline-block;
    margin: 0.5rem 0;
}

.price-change.positive {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

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

.coin-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* Trade Suggestions Cards */
.trade-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.trade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.trade-card.buy::before {
    background: var(--success);
}

.trade-card.sell::before {
    background: var(--danger);
}

.trade-card.watch::before {
    background: var(--warning);
}

.trade-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.signal-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.signal-badge.buy {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.signal-badge.sell {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.signal-badge.watch {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

/* Tags */
.tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: rgba(124, 58, 237, 0.15);
    color: var(--primary-light);
    font-size: 0.75rem;
    border-radius: var(--radius-full);
    margin-right: 0.375rem;
    margin-bottom: 0.375rem;
}

/* Loading & Error States */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger-light);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

/* Global Cards */
.global-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.global-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}

.global-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.875rem 1rem;
    }
    
    .dropdown-content {
        position: static;
        transform: none;
        margin-left: 1rem;
        box-shadow: none;
        border: 1px solid rgba(255, 255, 255, 0.05);
        background: var(--bg-tertiary);
    }
    
    .mobile-menu-btn {
        display: none;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .mobile-menu-btn span {
        width: 24px;
        height: 2px;
        background: var(--text-primary);
        transition: all var(--transition-base);
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-brand {
        font-size: 1.25rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
    }
    
    .hero-section {
        padding: 2rem 0 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1rem;
        padding-top: 85px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    .crypto-card {
        padding: 1rem;
    }
    
    .coin-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .coin-price {
        font-size: 1.25rem;
    }
    
    .coin-stats {
        flex-wrap: wrap;
    }
    
    .trade-card {
        padding: 1rem;
    }
    
    .tag {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
    }
    
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table th,
    table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    .calculator-container {
        padding: 0 0.5rem;
    }
    
    .crypto-card input,
    .crypto-card select {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .result-card {
        padding: 1rem;
    }
    
    .result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .footer {
        padding: 2rem 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .tool-card {
        padding: 1.25rem;
    }
    
    .tool-icon {
        font-size: 2rem;
    }
    
    .tool-card h3 {
        font-size: 1.125rem;
    }
    
    .tool-card p {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        height: 60px;
    }
    
    .container {
        padding-top: 75px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
    
    .btn {
        width: 100%;
    }
    
    .signal-badge {
        font-size: 0.6875rem;
        padding: 0.25rem 0.625rem;
    }
    
    .price-change {
        font-size: 0.8125rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .global-card {
        padding: 1rem;
    }
    
    .global-value {
        font-size: 1.25rem;
    }
}

/* Scrollbar */
::-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: rgba(124, 58, 237, 0.5);
}

/* Selection */
::selection {
    background: rgba(124, 58, 237, 0.3);
    color: white;
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar, .footer { display: none; }
}