/* css/style.css */
:root {
    --bg-dark: #0d0d12;
    --bg-surface: rgba(26, 26, 36, 0.7);
    --bg-glass: rgba(20, 20, 30, 0.45);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #9ba1a6;
    
    --accent-orange: #f99e1a;
    --accent-cyan: #05d9e8;
    --accent-pink: #ff2a6d;
    --accent-glow: 0 0 15px rgba(249, 158, 26, 0.4);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;
    
    --font-main: 'Inter', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ambient Animated Background */
#ambient-background {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1; overflow: hidden;
    background: radial-gradient(circle at top right, rgba(5, 217, 232, 0.05), transparent 40%),
                radial-gradient(circle at bottom left, rgba(255, 42, 109, 0.05), transparent 40%);
}

.blob {
    position: absolute; filter: blur(80px); opacity: 0.4; border-radius: 50%;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.blob-1 { top: -10%; left: -10%; width: 600px; height: 600px; background: radial-gradient(circle, var(--accent-orange), transparent 60%); animation-delay: 0s; }
.blob-2 { bottom: -20%; right: -10%; width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-cyan), transparent 60%); animation-delay: -5s; }
.blob-3 { top: 40%; left: 50%; width: 400px; height: 400px; background: radial-gradient(circle, var(--accent-pink), transparent 60%); animation-delay: -10s; }

@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(50px, 50px) scale(1.1); } }

/* Typography */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.highlight { background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Layout & Glassmorphism */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 24px; flex: 1; display: flex; flex-direction: column; }
.glass-effect { background: var(--bg-glass); backdrop-filter: blur(20px); border: 1px solid var(--border-glass); }
.glass-panel { background: var(--bg-surface); backdrop-filter: blur(30px); border: 1px solid var(--border-glass); border-radius: var(--radius-lg); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); overflow: hidden; }

/* Navigation */
.navbar { position: sticky; top: 0; height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; z-index: 100; border-bottom: 1px solid var(--border-glass); }
.navbar-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hamburger-btn { display: none; background: transparent; color: var(--text-primary); border: none; font-size: 1.5rem; cursor: pointer; padding: 5px; }
.nav-brand { font-size: 1.5rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: var(--transition-fast); }
.nav-brand:hover { transform: scale(1.02); }
.nav-links { display: flex; gap: 16px; background: rgba(0,0,0,0.2); padding: 6px; border-radius: var(--radius-pill); border: 1px solid var(--border-glass); align-items: center; }
.nav-btn { background: transparent; color: var(--text-secondary); border: none; padding: 10px 24px; border-radius: var(--radius-pill); font-size: 0.95rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: var(--transition-smooth); display: flex; align-items: center; gap: 8px; }
.nav-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-btn.active { color: var(--bg-dark); background: var(--text-primary); box-shadow: 0 4px 15px rgba(255,255,255,0.2); }
.nav-user-area { margin-left: 10px; border-left: 1px solid var(--border-glass); padding-left: 20px; display: flex; align-items: center; }

/* Directory Grid */
.directory-header { margin: 60px 0 40px 0; text-align: center; }
.directory-header h1 { font-size: 3.5rem; margin-bottom: 16px; }
.directory-header p { color: var(--text-secondary); font-size: 1.2rem; max-width: 600px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 24px; padding-bottom: 60px; }
@media (min-width: 600px) {
    .streamer-card.large-card {
        grid-column: span 2;
    }
}
.streamer-card.small-card { opacity: 0.3; }
.streamer-card.small-card:hover { opacity: 1; }
.streamer-card { position: relative; border-radius: var(--radius-md); overflow: hidden; cursor: pointer; transition: var(--transition-smooth); background: var(--bg-surface); border: 1px solid var(--border-glass); aspect-ratio: 3/4; display: flex; flex-direction: column; }
.streamer-card:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.2); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(5, 217, 232, 0.2); }
.card-image { width: 100%; height: 100%; object-fit: cover; transition: var(--transition-smooth); }
.streamer-card:hover .card-image { transform: scale(1.05); }
.streamer-card.offline { filter: grayscale(100%); opacity: 0.5; }
.streamer-card.offline:hover { filter: grayscale(50%); opacity: 0.8; }
.card-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 30px 20px 20px; background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0)); color: white; transition: var(--transition-smooth); }
.streamer-card.small-card { overflow: visible; }
.streamer-card.small-card .card-image { border-radius: var(--radius-md); }
.streamer-card.small-card .card-overlay { opacity: 0; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(10px); width: max-content; max-width: 200px; background: rgba(20, 20, 30, 0.95); border-radius: var(--radius-sm); padding: 12px; pointer-events: none; border: 1px solid var(--border-glass); z-index: 20; margin-bottom: 5px; }
.streamer-card.small-card:hover .card-overlay { opacity: 1; transform: translateX(-50%) translateY(0); }
.streamer-card.small-card .card-overlay::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-width: 6px; border-style: solid; border-color: rgba(20, 20, 30, 0.95) transparent transparent transparent; }
.card-name { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.live-badge { background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1); color: white; font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 1px; display: inline-flex; align-items: center; }
.live-circle { display: inline-block; width: 8px; height: 8px; background-color: #ff4757; border-radius: 50%; box-shadow: 0 0 8px #ff4757; animation: pulse-circle 2s infinite; margin-right: 6px; }
@keyframes pulse-circle { 0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.6); } 70% { box-shadow: 0 0 0 6px rgba(255, 71, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); } }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { background: rgba(255,255,255,0.1); backdrop-filter: blur(5px); padding: 4px 10px; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 600; border: 1px solid rgba(255,255,255,0.05); }

/* Profile View */
.profile-view { padding: 40px 0; display: grid; grid-template-columns: 1fr 350px; gap: 30px; }
@media (max-width: 968px) { .profile-view { grid-template-columns: 1fr; } }
.profile-main { display: flex; flex-direction: column; gap: 30px; }
.video-container { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius-lg); overflow: hidden; position: relative; border: 1px solid var(--border-glass); box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.profile-header { display: flex; gap: 24px; align-items: center; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--bg-surface); outline: 2px solid var(--accent-cyan); outline-offset: 4px; object-fit: cover; }
.profile-info h1 { font-size: 2.5rem; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.profile-info .bio { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.6; max-width: 800px; }
.wiki-panel { padding: 30px; display: flex; flex-direction: column; gap: 24px; }
.wiki-section h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.social-links { display: flex; flex-direction: column; gap: 12px; }
.social-btn { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.05); padding: 14px 20px; border-radius: var(--radius-md); color: white; text-decoration: none; font-weight: 600; transition: var(--transition-fast); border: 1px solid transparent; }
.social-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); transform: translateX(5px); }
.social-btn.twitch:hover { color: #9146FF; border-color: #9146FF; background: rgba(145, 70, 255, 0.1); }

/* Admin Base */
.admin-login { max-width: 400px; margin: 100px auto; padding: 40px; text-align: center; }
.input-group { margin-bottom: 20px; text-align: left; }
.input-label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; }
.input-control { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border-glass); padding: 14px 20px; border-radius: var(--radius-md); color: white; font-family: inherit; font-size: 1rem; transition: var(--transition-fast); }
.input-control:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(5, 217, 232, 0.2); }
.btn-primary { width: 100%; background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink)); color: white; border: none; padding: 14px 24px; border-radius: var(--radius-md); font-size: 1rem; font-weight: 800; cursor: pointer; transition: var(--transition-smooth); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 25px rgba(255, 42, 109, 0.3); }

/* Admin Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin: 40px 0;
}
@media (max-width: 968px) {
    .admin-layout { grid-template-columns: 1fr; }
}

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

.admin-menu-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-menu-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.admin-menu-btn.active {
    background: rgba(5, 217, 232, 0.1);
    border-color: rgba(5, 217, 232, 0.3);
    color: var(--accent-cyan);
}

.admin-content-section {
    display: none;
}
.admin-content-section.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

/* Admin Dashboard Table */
.admin-dashboard { margin: 40px 0; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.admin-table-container { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th { padding: 20px; color: var(--text-secondary); font-weight: 600; border-bottom: 1px solid var(--border-glass); background: rgba(0,0,0,0.2); }
.admin-table td { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: middle; }
.admin-table tr:hover { background: rgba(255,255,255,0.02); }
.avatar-cell { display: flex; align-items: center; gap: 16px; }
.avatar-sm { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.action-btns { display: flex; gap: 10px; }

.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border-glass); padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-family: inherit; font-size: 0.9rem; font-weight: 600; transition: var(--transition-fast); display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; }
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.3); }
.btn-outline.active { background: rgba(5, 217, 232, 0.15); color: var(--accent-cyan); border-color: rgba(5, 217, 232, 0.3); }

.btn-wiki-tab { background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid transparent; }
.btn-wiki-tab:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.btn-wiki-tab.active { background: rgba(5, 217, 232, 0.15); color: var(--accent-cyan); border-color: rgba(5, 217, 232, 0.3); }

.lb-tab { background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid var(--border-glass); padding: 9px 18px; border-radius: var(--radius-sm); cursor: pointer; font-family: inherit; font-size: 0.9rem; font-weight: 600; transition: var(--transition-fast); display: inline-flex; align-items: center; gap: 7px; }
.lb-tab:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.lb-tab.active { background: rgba(5, 217, 232, 0.15); color: var(--accent-cyan); border-color: rgba(5, 217, 232, 0.4); }

.btn-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); border: none; display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; transition: var(--transition-fast); }
.btn-approve { background: rgba(46, 213, 115, 0.1); color: #2ed573; }
.btn-approve:hover { background: #2ed573; color: white; }
.btn-reject { background: rgba(255, 71, 87, 0.1); color: #ff4757; }
.btn-reject:hover { background: #ff4757; color: white; }

/* Utilities */
.fade-in { animation: fadeIn 0.4s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.slide-down { animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 50vh; color: var(--text-secondary); font-weight: 600; gap: 20px; }
.spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.1); border-left-color: var(--accent-cyan); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-badge { padding: 6px 12px; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 800; }
.status-approved { background: rgba(46, 213, 115, 0.2); color: #2ed573; }
.status-pending { background: rgba(255, 165, 2, 0.2); color: #ffa502; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state i { font-size: 3rem; margin-bottom: 20px; opacity: 0.5; }

/* Wiki Markdown Content Styles */
.wiki-content h1, .wiki-content h2, .wiki-content h3 {
    margin-bottom: 15px;
    margin-top: 30px;
    color: var(--accent-cyan);
}
.wiki-content h1:first-child, .wiki-content h2:first-child, .wiki-content h3:first-child {
    margin-top: 0;
}
.wiki-content p, .wiki-content li {
    color: rgba(255,255,255,0.9);
    margin-bottom: 15px;
}
.wiki-content ul, .wiki-content ol {
    margin-left: 25px;
    margin-bottom: 20px;
}
.wiki-content a {
    color: var(--accent-pink);
    text-decoration: none;
}
.wiki-content a:hover {
    text-decoration: underline;
}
.wiki-content blockquote {
    border-left: 4px solid var(--accent-orange);
    padding-left: 15px;
    margin: 20px 0;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}
.wiki-content pre {
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid var(--border-glass);
}

/* ========================================================================= */
/* Global Mobile Layout Enhancements */
/* ========================================================================= */
@media (max-width: 768px) {
    /* Navbar Hamburger */
    .navbar {
        height: auto;
        min-height: 70px;
        flex-direction: column;
        padding: 15px;
        gap: 0;
        align-items: stretch;
    }
    .navbar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .hamburger-btn {
        display: block;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: transparent;
        border: none;
        padding: 0;
        margin-top: 15px;
        border-radius: 0;
        gap: 10px;
    }
    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }
    .nav-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 20px;
        border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.05);
    }
    .nav-btn.active {
        background: var(--text-primary);
    }
    .nav-user-area {
        margin-left: 0;
        border-left: none;
        padding-left: 0;
        margin-top: 10px;
        border-top: 1px solid var(--border-glass);
        padding-top: 15px;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .nav-user-area > div {
        justify-content: center;
        width: 100%;
    }
    
    /* Headers & Text Scaling */
    .directory-header { margin: 30px 0 20px 0; }
    .directory-header h1 { font-size: 2.2rem; }
    .directory-header p { font-size: 1rem; }
    
    /* Profile Restructuring */
    .profile-view { padding: 20px 0; gap: 20px; }
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .profile-info h1 {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 10px;
    }
    .profile-info h1 .live-badge {
        position: static;
        margin-top: 5px;
    }
    .profile-info .btn-outline {
        margin: 15px auto 0 auto;
    }
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    .wiki-header-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    /* Login Modals */
    .glass-panel { padding: 20px; }
}

/* ── Spotlight Rail ─────────────────────────────────────────── */
.spotlight-section { margin: 30px 0 10px; overflow: visible; }

.spot-rail-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.spot-arrow {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: rgba(15, 15, 30, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s, opacity 0.2s;
    z-index: 2;
    opacity: 0.7;
}
.spot-arrow:hover { background: var(--accent-pink); opacity: 1; }
.spot-arrow-left  { margin-right: 8px; }
.spot-arrow-right { margin-left:  8px; }

.spot-rail {
    flex: 1;
    display: flex;
    gap: 14px;
    overflow-x: scroll;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}
.spot-rail::-webkit-scrollbar { display: none; }

.spot-card {
    position: relative;
    flex: 0 0 180px;
    height: 240px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.spot-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.6); }
.spot-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-card.offline { filter: grayscale(100%); opacity: 0.5; }
.spot-card.offline:hover { filter: grayscale(50%); opacity: 0.8; }

.spot-live-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    max-width: 80%;
    text-align: right;
    line-height: 1.4;
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    display: inline-flex;
    align-items: center;
}

.spot-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 30px 10px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.spot-name {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Context pills */
.spot-pill {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.spot-pill.hot     { background: rgba(255,71,87,0.9);   color: white; }
.spot-pill.rising  { background: rgba(46,213,115,0.85); color: white; }
.spot-pill.new     { background: rgba(5,217,232,0.85);  color: #000;  }
.spot-pill.game    { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); }

@media (max-width: 400px) {
    .grid { grid-template-columns: 1fr; }
}
