/* ============================================
   TUDY RUDY - Killer CSS
   ============================================ */

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

:root {
    --purple: #7c3aed;
    --purple-dark: #5b21b6;
    --purple-light: #a78bfa;
    --pink: #ec4899;
    --cyan: #06b6d4;
    --dark: #0f0f23;
    --darker: #080816;
    --card: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --sidebar-bg: rgba(15, 15, 35, 0.85);
    --hero-mid: #1a1040;
}

/* ---- LIGHT MODE ---- */
body.light-mode {
    --darker: #f0f0f5;
    --dark: #e4e4ec;
    --card: rgba(0, 0, 0, 0.04);
    --card-border: rgba(0, 0, 0, 0.1);
    --text: #1e293b;
    --text-muted: #64748b;
    --sidebar-bg: rgba(240, 240, 248, 0.95);
    --hero-mid: #d8d0f0;
}

body.light-mode .sidebar {
    background: var(--sidebar-bg);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--hero-mid) 50%, var(--dark) 100%);
}

body.light-mode .hero-glow {
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
}

body.light-mode .hero-title {
    background: linear-gradient(135deg, #1e293b 0%, var(--purple) 50%, var(--pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

body.light-mode .form-input {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .form-input::placeholder { color: #94a3b8; }

body.light-mode .search-input {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .logo-text {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
}

body.light-mode .sidebar-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

body.light-mode .btn-sm {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

body.light-mode .btn-sm:hover {
    background: rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--darker);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- SIDEBAR ---- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: rgba(15, 15, 35, 0.85);
    border-right: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 25px 0;
    z-index: 100;
    transition: transform 0.3s;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.3);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 25px 30px;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 20px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.sidebar-logo:hover { opacity: 0.8; }

.logo-icon { font-size: 1.8rem; }

.logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--purple-light), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    list-style: none;
    flex: 1;
    padding: 0 12px;
}

.sidebar-nav li { margin-bottom: 4px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text);
}

.nav-link.active {
    background: rgba(124, 58, 237, 0.15);
    color: var(--purple-light);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.nav-icon { font-size: 1.2rem; width: 24px; text-align: center; }

.nav-divider {
    height: 1px;
    background: var(--card-border);
    margin: 10px 16px;
}

/* Dropdown */
.nav-toggle { position: relative; }

.nav-arrow {
    margin-left: auto;
    font-size: 1.1rem;
    transition: transform 0.3s;
    color: var(--text-muted);
}

.nav-dropdown.open .nav-arrow {
    transform: rotate(90deg);
}

.nav-sub {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-dropdown.open .nav-sub {
    max-height: 200px;
}

.nav-link-sub {
    padding: 9px 16px 9px 44px;
    font-size: 0.9rem;
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text);
}

.sidebar-footer {
    padding: 15px 12px 0;
    border-top: 1px solid var(--card-border);
    margin-top: 10px;
}

.nav-link-small {
    font-size: 0.85rem;
    padding: 10px 16px;
    opacity: 0.6;
}

.nav-link-small:hover { opacity: 1; }

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 200;
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text);
    font-size: 1.4rem;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
}

/* ---- MAIN CONTENT ---- */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
}

/* ---- PAGE LAYOUT ---- */
.page { max-width: 100%; margin: 0; padding: 30px 40px; }

/* ---- HERO ---- */
.hero {
    position: relative;
    text-align: center;
    padding: 80px 30px 60px;
    margin-bottom: 30px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--dark) 0%, #1a1040 50%, var(--dark) 100%);
    border: 1px solid var(--card-border);
    overflow: hidden;
}

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

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff 0%, var(--purple-light) 50%, var(--pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    line-height: 1;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--text-muted);
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.stat-box {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 16px;
    padding: 20px 30px;
    min-width: 140px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.3);
}

.stat-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--purple-light);
}

.stat-lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- CARDS ---- */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.card h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

/* ---- CIP SECTION ---- */
.cip-card h2 {
    background: linear-gradient(135deg, #34d399, var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cip-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.cip-text { flex: 1; }

.cip-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.cip-achievements {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.achievement {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cyan);
}

.cip-badge { flex-shrink: 0; }

.badge-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(52, 211, 153, 0.2));
    border: 2px solid rgba(6, 182, 212, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: pulse 3s ease-in-out infinite;
}

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

.badge-emoji { font-size: 3rem; }
.badge-text {
    font-weight: 800;
    font-size: 0.9rem;
    text-align: center;
    color: var(--cyan);
    line-height: 1.2;
    margin-top: 5px;
}

/* ---- HIGHLIGHTS LINK ---- */
.highlights-link-card {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(124, 58, 237, 0.1));
    border-color: rgba(236, 72, 153, 0.3);
}

.highlights-link-card h2 {
    background: linear-gradient(135deg, var(--pink), var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.btn-highlights {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-highlights:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

/* ---- DISCORD ---- */
.discord-card {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(88, 101, 242, 0.05));
    border-color: rgba(88, 101, 242, 0.3);
}

.discord-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.discord-emoji { font-size: 3rem; }

.discord-content h2 {
    color: #7289da;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.discord-content p {
    color: var(--text-muted);
    font-size: 1rem;
}

.discord-content div { flex: 1; }

.btn-discord {
    padding: 14px 28px;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-discord:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

.hero-yt {
    position: relative;
    z-index: 1;
    color: var(--text-muted);
    font-size: 1.3rem;
    margin-top: -5px;
    margin-bottom: 50px;
}

.hero-yt a {
    color: #ff4444;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.hero-yt a:hover {
    color: #ff6666;
    text-decoration: underline;
}

/* ---- CONTACT FORM ---- */
.contact-card h2 {
    background: linear-gradient(135deg, var(--pink), var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.form-wrap { max-width: 700px; margin: 0 auto; }

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.form-group {
    flex: 1;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-input::placeholder { color: #475569; }

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}

.alert-success {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #34d399;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 600;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Form errors from Symfony */
.form-group ul {
    list-style: none;
    margin-top: 5px;
}

.form-group ul li {
    color: #ef4444;
    font-size: 0.85rem;
}

/* ---- HIGHLIGHTS ---- */
.hero-small { padding: 50px 30px 40px; margin-bottom: 30px; }
.hero-small .hero-title { font-size: clamp(2.5rem, 6vw, 4rem); }

.filter-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 25px;
    position: relative;
    z-index: 1;
}

.tag {
    padding: 8px 18px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.tag:hover, .tag-active {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.4);
    color: var(--purple-light);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.highlight-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.2);
}

.video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrap iframe,
.video-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.highlight-info {
    padding: 20px;
}

.highlight-info h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--text);
}

.highlight-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.highlight-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.game-tag {
    background: rgba(124, 58, 237, 0.15);
    color: var(--purple-light);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-tag {
    background: rgba(6, 182, 212, 0.15);
    color: var(--cyan);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    margin-bottom: 30px;
}

.empty-icon { font-size: 4rem; display: block; margin-bottom: 15px; }
.empty-state h3 { font-size: 1.5rem; margin-bottom: 8px; color: var(--text-muted); }
.empty-state p { color: #475569; font-size: 1rem; }

/* ---- FOOTER ---- */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.admin-link {
    color: #475569;
    text-decoration: none;
    font-size: 0.8rem;
    margin-top: 8px;
    display: inline-block;
    transition: color 0.3s;
}

.admin-link:hover { color: var(--purple-light); }

/* ---- LOGIN PAGE ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--darker) 0%, #1a1040 100%);
}

.login-box {
    background: var(--card);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-box h1 {
    font-size: 2rem;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--purple-light), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-box .form-group {
    text-align: left;
}

.login-box .btn-submit { margin-top: 10px; }

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover { color: var(--purple-light); }

/* ---- ADMIN TOP BAR ---- */
.admin-topbar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
    height: 48px;
    background: rgba(15, 15, 35, 0.92);
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    backdrop-filter: blur(16px);
}

body.light-mode .admin-topbar {
    background: rgba(240, 240, 248, 0.92);
}

.has-admin-topbar {
    padding-top: 48px;
}

.admin-topbar-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--purple-light);
    background: rgba(124, 58, 237, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
}

.admin-topbar-nav {
    display: flex;
    gap: 2px;
    flex: 1;
}

.admin-topbar-nav a,
.admin-topbar-right a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.admin-topbar-nav a:hover,
.admin-topbar-right a:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--text);
}

.admin-topbar-nav a.active {
    background: rgba(124, 58, 237, 0.2);
    color: var(--purple-light);
}

.admin-topbar-right {
    display: flex;
    gap: 2px;
    align-items: center;
}

.admin-topbar-logout {
    color: #ef4444 !important;
}

.admin-topbar-logout:hover {
    background: rgba(239, 68, 68, 0.15) !important;
}

/* ---- ADMIN DASHBOARD ---- */
.admin-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 20px;
}

.admin-header h1 { font-size: 1.5rem; }

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-header-right {
    display: flex;
    gap: 10px;
}

.admin-badge {
    background: rgba(124, 58, 237, 0.2);
    color: var(--purple-light);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-sm {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-sm:hover { background: rgba(255, 255, 255, 0.1); }

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

/* Search */
.search-bar {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.search-bar form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--purple);
}

.btn-search {
    padding: 12px 20px;
    background: var(--purple);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-search:hover { background: var(--purple-dark); }

/* Data Table */
.table-wrap {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(124, 58, 237, 0.15);
}

.data-table th {
    padding: 15px 20px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--purple-light);
    font-weight: 700;
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.95rem;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: rgba(124, 58, 237, 0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.msg-cell {
    max-width: 300px;
}

.msg-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
    word-break: break-word;
    white-space: pre-wrap;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.msg-preview:hover {
    background: rgba(124, 58, 237, 0.1);
}

.msg-preview.expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
    background: rgba(124, 58, 237, 0.08);
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px !important;
}

/* ---- PC SPECS ---- */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.spec-item {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.spec-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

.spec-icon {
    font-size: 2.2rem;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 14px;
    flex-shrink: 0;
}

.spec-info h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.spec-info p {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

/* ---- LINK CLICK TRACKING ---- */
.link-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
}

.link-tag-discord {
    background: rgba(88, 101, 242, 0.15);
    color: #7289da;
    border: 1px solid rgba(88, 101, 242, 0.3);
}

.link-tag-youtube {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    border: 1px solid rgba(255, 0, 0, 0.25);
}

.click-badge-discord {
    background: rgba(88, 101, 242, 0.2) !important;
    color: #7289da !important;
}

.click-badge-youtube {
    background: rgba(255, 0, 0, 0.15) !important;
    color: #ff4444 !important;
}

/* ---- VISITOR TRACKING ---- */
.online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: blink-dot 2s ease-in-out infinite;
}

@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.online-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.15) !important;
    color: #22c55e !important;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.ua-cell {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auto-refresh-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 15px;
    opacity: 0.6;
}

/* ---- HELPER ---- */
.hide-mobile { }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    body.sidebar-open .main-content {
        opacity: 0.3;
        pointer-events: none;
        cursor: pointer;
    }
    .sidebar-toggle {
        display: block;
    }
    .sidebar {
        top: 0;
        left: 0;
        bottom: 0;
        border-radius: 0;
    }
    .main-content {
        margin-left: 0;
        transition: opacity 0.3s;
    }

    /* Admin topbar: scroll orizontal */
    .admin-topbar {
        left: 0;
        height: auto;
        padding: 8px 12px;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-topbar-left {
        display: none;
    }
    .admin-topbar-nav {
        flex-wrap: nowrap;
        gap: 2px;
    }
    .admin-topbar-nav a,
    .admin-topbar-right a {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
}

@media (max-width: 768px) {
    /* Page & layout */
    .page { padding: 20px 15px; }
    .admin-page { padding: 12px; }

    /* Hero */
    .hero { padding: 40px 20px 30px; margin-bottom: 20px; }
    .hero-small { padding: 35px 20px 25px; margin-bottom: 20px; }
    .hero-title { font-size: clamp(2.2rem, 8vw, 4rem); }
    .hero-small .hero-title { font-size: clamp(1.8rem, 6vw, 3rem); }
    .hero-subtitle { font-size: 0.95rem; margin-bottom: 30px; }
    .hero-yt { font-size: 1rem; margin-bottom: 30px; }
    .hero-stats { gap: 10px; }
    .stat-box { min-width: 100px; padding: 15px 18px; }
    .stat-num { font-size: 1.6rem; }

    /* Cards */
    .card { padding: 25px 18px; border-radius: 18px; margin-bottom: 20px; }
    .card h2 { font-size: 1.5rem; }

    /* Forms */
    .form-row { flex-direction: column; gap: 0; }
    .form-input { padding: 12px 14px; font-size: 0.95rem; }
    .btn-submit { padding: 14px; font-size: 1rem; }
    .btn-highlights { padding: 12px 22px; font-size: 0.95rem; }

    /* CIP & Discord */
    .cip-content { flex-direction: column; text-align: center; }
    .cip-achievements { justify-content: center; }
    .discord-content { flex-direction: column; text-align: center; }

    /* Clips grid */
    .highlights-grid { grid-template-columns: 1fr; gap: 15px; }

    /* Filter tags */
    .filter-tags { gap: 6px; }
    .tag { padding: 6px 14px; font-size: 0.8rem; }

    /* Admin */
    .admin-header { flex-direction: column; gap: 12px; padding: 15px 18px; }
    .admin-header h1 { font-size: 1.2rem; }
    .admin-header-left { flex-wrap: wrap; gap: 10px; }
    .admin-badge { font-size: 0.75rem; padding: 4px 10px; }

    /* Tables */
    .table-wrap { overflow-x: auto; border-radius: 12px; }
    .data-table th { padding: 10px 12px; font-size: 0.7rem; }
    .data-table td { padding: 10px 12px; font-size: 0.85rem; }
    .btn-sm { padding: 6px 10px; font-size: 0.75rem; }

    /* Search */
    .search-bar { padding: 10px 15px; }
    .search-bar form { flex-direction: column; }

    /* Login */
    .login-box { margin: 15px; padding: 35px 25px; border-radius: 18px; }
    .login-box h1 { font-size: 1.6rem; margin-bottom: 20px; }

    /* Specs */
    .specs-grid { grid-template-columns: 1fr; gap: 12px; }

    /* Posts feed images */
    .card img { max-width: 100%; height: auto; }

    /* Empty state */
    .empty-state { padding: 50px 15px; }
    .empty-icon { font-size: 3rem; }
    .empty-state h3 { font-size: 1.2rem; }

    /* Alerts */
    .alert-success, .alert-error { padding: 12px 15px; font-size: 0.9rem; margin-bottom: 15px; }
}

@media (max-width: 480px) {
    /* Page */
    .page { padding: 15px 10px; }
    .admin-page { padding: 8px; }

    /* Hero */
    .hero { padding: 30px 15px 25px; border-radius: 16px; }
    .hero-small { padding: 25px 15px 20px; border-radius: 16px; }
    .hero-title { font-size: clamp(1.8rem, 10vw, 2.5rem); letter-spacing: -1px; }
    .hero-small .hero-title { font-size: clamp(1.5rem, 8vw, 2rem); }
    .hero-subtitle { font-size: 0.85rem; margin-bottom: 20px; }
    .hero-yt { font-size: 0.85rem; }

    /* Stats: 2 columns grid */
    .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-box { min-width: unset; padding: 12px 10px; border-radius: 12px; text-align: center; }
    .stat-num { font-size: 1.3rem; }
    .stat-lbl { font-size: 0.7rem; }

    /* Cards */
    .card { padding: 20px 15px; border-radius: 14px; }
    .card h2 { font-size: 1.3rem; }

    /* Admin topbar */
    .admin-topbar-nav a,
    .admin-topbar-right a { font-size: 0.7rem; padding: 4px 6px; }

    /* Admin header */
    .admin-header { padding: 12px 14px; border-radius: 12px; }
    .admin-header h1 { font-size: 1.1rem; }

    /* Tables: hide less important columns */
    .hide-mobile { display: none !important; }
    .data-table th { padding: 8px 8px; font-size: 0.65rem; letter-spacing: 0.5px; }
    .data-table td { padding: 8px 8px; font-size: 0.8rem; }
    .msg-cell { max-width: 150px; }
    .ua-cell { max-width: 100px; }
    .btn-sm { padding: 5px 8px; font-size: 0.7rem; border-radius: 8px; }

    /* Forms */
    .form-wrap { padding: 0; }
    .form-input { padding: 11px 12px; border-radius: 10px; }
    .btn-submit { padding: 13px; font-size: 0.95rem; border-radius: 10px; }
    .btn-highlights { padding: 10px 18px; font-size: 0.85rem; }

    /* Login */
    .login-box { margin: 10px; padding: 30px 20px; border-radius: 16px; }
    .login-box h1 { font-size: 1.4rem; }

    /* Sidebar toggle position */
    .sidebar-toggle { top: 10px; left: 10px; padding: 6px 10px; font-size: 1.2rem; }

    /* Footer */
    .footer { padding: 25px 15px; font-size: 0.8rem; }

    /* Filter tags */
    .filter-tags { gap: 5px; }
    .tag { padding: 5px 10px; font-size: 0.75rem; }

    /* Specs */
    .spec-item { padding: 18px; gap: 14px; }
    .spec-icon { width: 45px; height: 45px; font-size: 1.8rem; border-radius: 12px; }
    .spec-info p { font-size: 0.95rem; }
}
