/* CSS RESET & VARIABLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* LUXURY GREEN & GOLD PALETTE */
    --bg-color: #f6f8f6;           /* Soft tint green-white */
    --surface-bg: #ffffff;         /* Pure white cards */
    
    --green-dark: #0a2e1d;         /* Deep Forest Green */
    --green-primary: #185e3d;      /* Vibrant Brand Green */
    --green-light: #ddeadd;        /* Soft green for accents */
    
    --gold-primary: #d6b84f;       /* Rich Gold */
    --gold-hover: #c4a13b;         /* Darker Gold */
    --gold-light: #fbf7e6;         /* Glow yellow */
    
    --text-strong: #0a1f14;        /* Dark text */
    --text-muted: #5e6b63;         /* Grayish green text */
    --border-line: #e6eee8;        /* Divider lines */
    
    --font-sans: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --rad-md: 12px;
    --rad-lg: 24px;
    --shadow-card: 0 16px 40px rgba(10, 46, 29, 0.06);
}

body {
    background-color: var(--bg-color);
    color: var(--text-strong);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* UTILITIES */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 5%;
}

.flex-between { display: flex; justify-content: space-between; }
.flex-row { display: flex; gap: 24px; }
.flex-col { display: flex; flex-direction: column; }
.align-center { align-items: center; }
.text-center { text-align: center; }

.pt-8 { padding-top: 4rem; }
.pb-4 { padding-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mt-8 { margin-top: 4rem; }
.mb-4 { margin-bottom: 2rem; }
.py-6 { padding-top: 3rem; padding-bottom: 3rem; }

/* HEADER */
.site-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-line);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    background: rgba(246, 248, 246, 0.85);
}

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

.logo-mark {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-hover));
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    border-radius: 8px;
    letter-spacing: 1px;
}

.logo-text {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--green-dark);
}

/* BUTTONS */
.nav-controls {
    display: flex;
    gap: 12px;
}

.btn {
    border: none;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: var(--rad-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover {
    color: var(--green-dark);
    background: var(--border-line);
}

.btn-gold {
    background-color: var(--gold-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(214, 184, 79, 0.3);
}
.btn-gold:hover {
    background-color: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 184, 79, 0.4);
}

.btn-green {
    background-color: var(--green-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(24, 94, 61, 0.2);
    padding: 16px 24px;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}
.btn-green:hover {
    background-color: var(--green-dark);
    transform: translateY(-2px);
}

.btn-gray {
    background-color: #fff;
    border: 1px solid var(--border-line);
    color: var(--text-strong);
    padding: 16px 24px;
}
.btn-gray:hover {
    background-color: var(--bg-color);
    border-color: #ccd5ce;
}

.btn-block {
    width: 100%;
}

/* HERO SECTION */
.hero {
    max-width: 700px;
    margin: 0 auto;
}

.heading-mega {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--green-dark);
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* CARD LAYOUT - BULLETPROOF FLEX */
.trading-card {
    background: var(--surface-bg);
    border-radius: var(--rad-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-line);
    overflow: hidden;
    display: block; /* Pure block flow */
}

.card-top {
    padding: 24px 40px;
    background: var(--surface-bg);
}

.divider {
    border: none;
    border-top: 1px solid var(--border-line);
    margin: 0;
}

.card-body {
    padding: 40px;
    background: linear-gradient(to bottom, #ffffff, #fafbfb);
    display: flex;
    gap: 40px;
}

.col-half {
    flex: 1; /* Automatically splits 50/50 and wraps safely on mobile */
    min-width: 0; /* Prevents flex blowout */
}

/* LIVE TAG */
.tag-live {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--green-primary);
}

.pulse {
    width: 8px; height: 8px;
    background: var(--green-primary);
    border-radius: 50%;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(24, 94, 61, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(24, 94, 61, 0); }
    100% { box-shadow: 0 0 0 0 rgba(24, 94, 61, 0); }
}

/* CLOCK */
.clock-display {
    font-family: var(--font-mono);
    color: var(--green-dark);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--border-line);
    padding: 6px 16px;
    border-radius: 8px;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.clock-num {
    font-variant-numeric: tabular-nums;
}

.clock-dim {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-right: 8px;
    font-weight: 600;
}
.clock-dim:last-child { margin-right: 0; }

/* TOKEN DETAILS */
.avatar {
    width: 72px; height: 72px;
    border-radius: 16px;
    background: var(--gold-light);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    border: 2px solid var(--border-line);
}

.token-name-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.token-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--green-dark);
    margin-bottom: 4px;
}

.badge {
    align-self: flex-start;
    background: var(--bg-color);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-line);
}

.token-description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* STATS */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.data-block {
    background: #fff;
    border: 1px solid var(--border-line);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.data-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.data-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--green-dark);
}

.highlight-gold {
    color: var(--gold-hover);
}

/* HISTORY SECTION */
.heading-section {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--green-dark);
}

.line-grow {
    flex: 1;
    height: 1px;
    background: var(--border-line);
    margin-left: 20px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.history-card {
    background: var(--surface-bg);
    border: 1px solid var(--border-line);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 46, 29, 0.04);
}

.h-ticker {
    display: block;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--green-dark);
}

.h-date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.h-gain {
    background: var(--green-light);
    color: var(--green-primary);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 46, 29, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: var(--rad-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green-dark);
    margin-bottom: 12px;
}

.modal-text {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.footer-text {
    color: #a4b2a9;
    font-weight: 500;
}

/* RESPONSIVE MEDIA QUERIES */
/* Super safe break points for all phones & tablets */
@media (max-width: 768px) {
    .wrap-mobile {
        flex-direction: column;
    }
    
    .card-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 24px;
    }
    
    .card-body {
        padding: 24px;
        gap: 32px;
    }
    
    .mt-mobile-4 {
        margin-top: 2rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .data-block {
        padding: 16px;
    }
    
    .hero {
        padding-top: 2rem;
    }
    
    .nav-controls .btn-ghost {
        display: none;
    }
}
