@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    /* TikTok GenZ Design Tokens */
    --bg-deep: #0a0a0a;
    --bg-card: rgba(22, 22, 30, 0.7);
    --bg-surface: rgba(30, 30, 42, 0.6);
    --bg-hover: rgba(255, 255, 255, 0.05);
    
    --tiktok-red: #FE2C55;
    --tiktok-cyan: #25F4EE;
    --tiktok-cyan-dim: rgba(37, 244, 238, 0.2);
    --neon-purple: #9B59B6;
    
    --text-main: #F0F0F5;
    --text-sec: #8B8FA3;
    --text-dim: #4A4E69;
    
    --success: #00F5D4;
    --warning: #FFD93D;
    --danger: #FF6B6B;
    
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(254, 44, 85, 0.3);
    
    --radius-pill: 50px;
    --radius-card: 16px;
    --radius-sm: 8px;
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(254, 44, 85, 0.15);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Animated Mesh Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 10% 20%, rgba(254, 44, 85, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(37, 244, 238, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(155, 89, 182, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Base Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }

a {
    color: var(--tiktok-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-glass);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--tiktok-red), var(--tiktok-cyan));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow), var(--shadow-glass);
}

.glass-card:hover::after {
    opacity: 1;
}

/* Navigation Component */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--tiktok-red), var(--tiktok-cyan));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.brand h1 {
    font-size: 1.25rem;
    background: linear-gradient(to right, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-surface);
    padding: 4px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-glass);
}

.nav-link {
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    color: var(--text-sec);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

.nav-link:hover:not(.active) {
    color: var(--text-main);
    background: var(--bg-hover);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--tiktok-red), #e6224c);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.4);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.6);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    color: var(--text-sec);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--tiktok-cyan);
    border-color: var(--tiktok-cyan-dim);
}

/* Inputs & Forms */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 12px;
    color: var(--text-sec);
}

.input-dark {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all 0.2s;
    outline: none;
}

.input-dark:focus {
    border-color: var(--tiktok-cyan);
    box-shadow: 0 0 0 2px var(--tiktok-cyan-dim);
}

/* Status Badges */
.badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-green {
    background: rgba(0, 245, 212, 0.15);
    color: var(--success);
}

.badge-yellow {
    background: rgba(255, 217, 61, 0.15);
    color: #ffe66d;
}

.badge-red {
    background: rgba(255, 107, 107, 0.15);
    color: var(--danger);
}

.badge-purple {
    background: rgba(155, 89, 182, 0.15);
    color: #c98eff;
}

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

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(254, 44, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0); }
}

.animate-fade-in {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Spinner TikTok Style */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--tiktok-red);
    border-bottom-color: var(--tiktok-cyan);
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.26, 1.55) infinite;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4A4E69;
}

/* ─── MODALS / OVERLAYS ──────────────────────────────── */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.7); 
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: var(--bg-deep);
    margin: 10% auto; 
    padding: 0;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-glow);
    border-radius: var(--radius-card);
    width: 50%; 
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.modal-header h3 { 
    font-family: var(--font-heading);
    font-size: 18px; 
    color: var(--text-main);
}

.close {
    color: var(--text-sec);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover { color: var(--tiktok-red); }

.modal-body {
    padding: 24px;
}

.modal-body p { margin-bottom: 12px; font-size: 13px; color: var(--text-sec); }

.modal-textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    background: var(--bg-surface);
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.modal-textarea:focus {
    outline: none;
    border-color: var(--tiktok-cyan);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-glass);
    background: rgba(0,0,0,0.3);
    text-align: right;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
}

/* ─── RESPONSIVE: TABLET & MOBILE ────────────────────── */

/* Default hidden hamburger */
.hamburger-menu {
    display: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    z-index: 1001; /* Above other nav items */
}

@media (max-width: 1024px) {
    .modal-content {
        width: 80% !important;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 10px 15px;
        flex-wrap: wrap; /* allow nav-actions to wrap if needed */
    }

    .hamburger-menu {
        display: block;
    }
    
    .nav-links {
        display: none; /* hidden by default on mobile */
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        background: var(--bg-surface);
        border: 1px solid var(--border-glass);
        border-radius: var(--radius-sm);
        padding: 10px;
        order: 3; /* Push below brand and nav-actions if flex-wrap is used */
    }
    
    .nav-links.active {
        display: flex;
        animation: fadeInUp 0.3s ease;
    }

    .nav-link {
        justify-content: flex-start;
        padding: 12px 20px;
    }

    .nav-actions {
        width: 100%;
        margin-top: 10px;
        justify-content: flex-start;
        overflow-x: auto; /* allow horizontal scrolling of buttons */
        padding-bottom: 5px;
        order: 2; /* order below brand */
    }

    /* Modal adjustments */
    .modal-content {
        width: 95% !important;
        margin: 5% auto !important;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .brand h1 {
        font-size: 1.1rem;
    }
    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}
