/* =============================================
   GATE PORTAL — Main Stylesheet
   Theme: Deep Space Modern Dark
   ============================================= */

/* --- CSS VARIABLES --- */
:root {
    --primary: #4f8ef7;
    --primary-dark: #2563eb;
    --primary-glow: rgba(79, 142, 247, 0.3);
    --accent: #00e5ff;
    --accent2: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    --bg-base: #0a0e1a;
    --bg-secondary: #0f1628;
    --bg-card: #141c2e;
    --bg-card-hover: #1a2540;
    --bg-input: #1e2a45;
    --border: rgba(255,255,255,0.07);
    --border-accent: rgba(79, 142, 247, 0.3);

    --text-primary: #e8edf8;
    --text-secondary: #8090b0;
    --text-muted: #506080;

    --nav-height: 64px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-pill: 50px;

    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 30px rgba(79, 142, 247, 0.15);
    --shadow-hover: 0 8px 40px rgba(0,0,0,0.5);

    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Nunito', sans-serif;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(79,142,247,0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 0%, rgba(124,58,237,0.05) 0%, transparent 50%);
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; color: var(--text-primary); }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

::selection { background: rgba(79,142,247,0.4); color: white; }

/* --- PRELOADER --- */
#preloader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-base);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.gate-loader {
    display: flex; gap: 6px;
    font-family: var(--font-heading);
    font-size: 32px; font-weight: 900;
}
.gate-loader span {
    color: var(--primary);
    animation: loaderPop 1.2s infinite;
    display: inline-block;
}
.gate-loader span:nth-child(1) { animation-delay: 0s; color: var(--primary); }
.gate-loader span:nth-child(2) { animation-delay: 0.1s; color: var(--accent); }
.gate-loader span:nth-child(3) { animation-delay: 0.2s; color: var(--accent2); }
.gate-loader span:nth-child(4) { animation-delay: 0.3s; color: var(--primary); }

@keyframes loaderPop {
    0%, 80%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-20px) scale(1.2); }
}

/* --- NAVBAR --- */
.gate-navbar {
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
    padding: 0;
    z-index: 1000;
    transition: var(--transition);
}
.gate-navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

/* Brand */
.gate-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
}
.brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent2));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px;
    box-shadow: 0 0 20px var(--primary-glow);
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-main {
    font-family: var(--font-heading);
    font-weight: 900; font-size: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}
.brand-sub { font-size: 9px; color: var(--text-secondary); letter-spacing: 3px; text-transform: uppercase; }

/* Nav Links */
.main-menu .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px !important;
    border-radius: 8px;
    transition: var(--transition);
    display: flex; align-items: center; gap: 6px;
}
.main-menu .nav-link:hover,
.main-menu .nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(79,142,247,0.1);
}
.main-menu .nav-link.active { color: var(--primary) !important; }

/* Dropdowns */
.gate-dropdown {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-accent) !important;
    border-radius: var(--radius) !important;
    padding: 8px !important;
    box-shadow: var(--shadow-hover), var(--shadow-glow) !important;
    min-width: 200px;
}
.gate-dropdown .dropdown-item {
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    display: flex; align-items: center; gap: 10px;
    transition: var(--transition);
}
.gate-dropdown .dropdown-item:hover {
    background: rgba(79,142,247,0.1);
    color: var(--text-primary);
    transform: translateX(2px);
}
.gate-dropdown .dropdown-divider { border-color: var(--border) !important; margin: 6px 0 !important; }
.dropdown-header { color: var(--text-secondary) !important; font-size: 12px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: 1px !important; padding: 6px 14px !important; }

/* Notification dropdown header */
.gate-dropdown .dropdown-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 14px 12px !important;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.mark-all-read { font-size: 11px; font-weight: 600; }

/* Notif dropdown */
.notif-dropdown { min-width: 320px !important; }
.notif-item {
    display: flex; gap: 10px; padding: 10px 12px;
    border-radius: 8px; transition: var(--transition);
    color: var(--text-secondary); text-decoration: none;
    align-items: flex-start;
}
.notif-item:hover { background: rgba(79,142,247,0.08); color: var(--text-primary); }
.notif-item.unread { background: rgba(79,142,247,0.06); }
.notif-item.unread .notif-text { color: var(--text-primary); }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; background: rgba(79,142,247,0.2); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 13px; flex-shrink: 0; }
.notif-text { font-size: 13px; line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* User menu header */
.dropdown-header-user {
    padding: 12px 14px !important;
    background: rgba(79,142,247,0.05);
    border-radius: 8px; margin-bottom: 6px;
}

/* User toggle */
.user-menu-toggle {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 10px !important;
    border-radius: var(--radius-pill) !important;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: var(--transition);
}
.user-menu-toggle:hover { border-color: var(--border-accent); box-shadow: var(--shadow-glow); }

.user-info-nav { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.user-rank { font-size: 10px; font-weight: 600; }

/* Icon buttons */
.nav-icon-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}
.nav-icon-btn:hover { background: rgba(79,142,247,0.1); color: var(--primary); }

.badge-dot {
    position: absolute; top: 0; right: 0;
    min-width: 18px; height: 18px;
    background: var(--danger);
    border-radius: 9px; font-size: 10px; font-weight: 700;
    color: white; display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-base);
    padding: 0 4px;
}

/* Register button */
.btn-register {
    border-radius: var(--radius-pill) !important;
    padding: 7px 20px !important;
    font-weight: 700; font-size: 13px;
}

/* Toggler */
.navbar-toggler { border: none; background: transparent; padding: 6px; }
.navbar-toggler:focus { box-shadow: none; }
.toggler-icon { display: flex; flex-direction: column; gap: 5px; }
.toggler-icon span { display: block; width: 22px; height: 2px; background: var(--text-secondary); border-radius: 2px; transition: var(--transition); }

/* --- MAIN CONTENT --- */
.gate-main { min-height: calc(100vh - var(--nav-height) - 200px); padding-bottom: 40px; }

/* --- CARDS --- */
.gate-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    overflow: hidden;
}
.gate-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.gate-card .card-header {
    background: rgba(79,142,247,0.05);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    font-family: var(--font-heading);
    font-weight: 700; font-size: 15px;
    color: var(--text-primary);
}
.gate-card .card-body { padding: 20px; }

/* Widget Cards */
.widget-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}
.widget-card:hover { border-color: var(--border-accent); }

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex; align-items: center; gap: 16px;
    transition: var(--transition);
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--border-accent); }
.stat-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-info .stat-value { font-family: var(--font-heading); font-size: 28px; font-weight: 800; line-height: 1; }
.stat-info .stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* --- PAGE HEADERS --- */
.page-hero {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    border-bottom: 1px solid var(--border);
    padding: 40px 0 32px;
    margin-bottom: 32px;
    position: relative; overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 0% 50%, rgba(79,142,247,0.08) 0%, transparent 60%);
}
.page-hero .hero-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 900;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.page-hero .hero-subtitle { color: var(--text-secondary); font-size: 15px; }
.breadcrumb { background: transparent !important; padding: 0 !important; }
.breadcrumb-item { font-size: 13px; color: var(--text-muted); }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-secondary); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted) !important; }

/* --- BUTTONS --- */
.btn { font-family: var(--font-body); font-weight: 700; border-radius: 8px; transition: var(--transition); border: none; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; box-shadow: 0 4px 15px rgba(79,142,247,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,142,247,0.4); background: var(--primary); color: white; }
.btn-outline-primary { border: 1.5px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline-primary:hover { background: var(--primary); color: white; transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg, var(--success), #059669); color: white; }
.btn-danger { background: linear-gradient(135deg, var(--danger), #dc2626); color: white; }
.btn-warning { background: linear-gradient(135deg, var(--warning), #d97706); color: white; }
.btn-secondary { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--border-accent); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(79,142,247,0.08); color: var(--primary); border-color: var(--border-accent); }
.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-pill { border-radius: var(--radius-pill) !important; }

/* --- FORMS --- */
.form-control, .form-select {
    background: var(--bg-input) !important;
    border: 1.5px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font-family: var(--font-body) !important;
    font-size: 14px !important;
    transition: var(--transition) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
    background: var(--bg-input) !important;
}
.form-control::placeholder { color: var(--text-muted) !important; }
.form-label { font-weight: 600; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
textarea.form-control { min-height: 120px; resize: vertical; }
.input-group-text { background: var(--bg-secondary); border: 1.5px solid var(--border); color: var(--text-secondary); border-radius: 10px; }
.form-check-input { background-color: var(--bg-input); border-color: var(--border); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.invalid-feedback { font-size: 12px; font-weight: 600; }
select option { background: var(--bg-card); color: var(--text-primary); }

/* Auth Forms */
.auth-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 16px;
    position: relative;
}
.auth-page::before {
    content: ''; position: fixed; inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(79,142,247,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(124,58,237,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%; max-width: 480px;
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    position: relative;
}
.auth-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent2));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-title { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-secondary); font-size: 14px; margin-bottom: 28px; }

/* --- ALERTS --- */
.alert { border: none; border-radius: var(--radius); font-weight: 500; }
.alert-success { background: rgba(16,185,129,0.1); color: #34d399; border-left: 4px solid var(--success) !important; }
.alert-danger { background: rgba(239,68,68,0.1); color: #f87171; border-left: 4px solid var(--danger) !important; }
.alert-warning { background: rgba(245,158,11,0.1); color: #fbbf24; border-left: 4px solid var(--warning) !important; }
.alert-info { background: rgba(6,182,212,0.1); color: #22d3ee; border-left: 4px solid var(--info) !important; }
.btn-close { filter: invert(1) brightness(0.7); }
.flash-alert { margin: 0 0 12px; }

/* --- BADGES --- */
.badge { font-family: var(--font-heading); font-weight: 700; border-radius: 6px; padding: 4px 10px; font-size: 11px; letter-spacing: 0.3px; }
.role-badge { border-radius: var(--radius-pill); font-size: 10px; padding: 3px 10px; }
.role-webmaster { background: linear-gradient(135deg,#f59e0b,#d97706); color: white; }
.role-administrator { background: linear-gradient(135deg,#ef4444,#dc2626); color: white; }
.role-moderator { background: linear-gradient(135deg,#3b82f6,#2563eb); color: white; }
.role-user { background: rgba(79,142,247,0.15); color: var(--primary); }

/* --- RANK BADGES --- */
.rank-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.05);
}

/* --- CONTENT CARDS (Articles, Discussions) --- */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden; transition: var(--transition);
    height: 100%;
    display: flex; flex-direction: column;
}
.content-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--border-accent); }
.content-card .card-thumb {
    height: 180px; overflow: hidden; position: relative;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card-hover));
}
.content-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.content-card:hover .card-thumb img { transform: scale(1.05); }
.content-card .card-thumb .thumb-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: var(--text-muted); opacity: 0.3;
}
.content-card .card-cat {
    position: absolute; top: 12px; left: 12px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    padding: 4px 10px; border-radius: var(--radius-pill);
    background: rgba(10,14,26,0.8); color: var(--accent);
    backdrop-filter: blur(10px);
}
.content-card .card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.content-card .card-title {
    font-size: 15px; font-weight: 700; line-height: 1.4;
    color: var(--text-primary); margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.content-card .card-title a { color: inherit; }
.content-card .card-title a:hover { color: var(--primary); }
.content-card .card-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.content-card .card-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: auto; }
.content-card .card-stats { display: flex; gap: 12px; }
.content-card .card-stat { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.content-card .card-stat i { font-size: 11px; }
.content-card .card-author { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }

/* Status badges */
.status-badge {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 3px 10px; border-radius: var(--radius-pill);
}
.status-pending { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-approved { background: rgba(16,185,129,0.15); color: var(--success); }
.status-rejected { background: rgba(239,68,68,0.15); color: var(--danger); }
.status-draft { background: rgba(107,114,128,0.15); color: #9ca3af; }

/* --- DISCUSSION ITEMS --- */
.discussion-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex; align-items: flex-start; gap: 14px;
    transition: var(--transition);
}
.discussion-item:hover { border-color: var(--border-accent); background: var(--bg-card-hover); transform: translateX(2px); }
.discussion-icon { width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.discussion-content { flex: 1; min-width: 0; }
.discussion-title { font-weight: 700; font-size: 15px; color: var(--text-primary); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.discussion-title a { color: inherit; }
.discussion-title a:hover { color: var(--primary); }
.discussion-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.discussion-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.discussion-stat { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* --- PROFILE PAGE --- */
.profile-header {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative; overflow: hidden;
    margin-bottom: 24px;
}
.profile-header::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 0% 0%, rgba(79,142,247,0.1), transparent 60%);
}
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; border: 4px solid var(--primary); box-shadow: 0 0 30px var(--primary-glow); object-fit: cover; }
.profile-avatar-placeholder {
    width: 100px; height: 100px; border-radius: 50%;
    border: 4px solid var(--primary); box-shadow: 0 0 30px var(--primary-glow);
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: 900; color: white;
}
.profile-name { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.profile-username { color: var(--text-secondary); font-size: 14px; margin-bottom: 8px; }
.profile-bio { color: var(--text-secondary); font-size: 14px; max-width: 500px; }
.profile-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.profile-stat { text-align: center; }
.profile-stat .value { font-size: 22px; font-weight: 800; font-family: var(--font-heading); color: var(--primary); }
.profile-stat .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.social-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.social-link {
    width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-secondary); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 14px; transition: var(--transition);
}
.social-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.social-fb:hover { background: #1877f2; color: white; border-color: #1877f2; }
.social-ig:hover { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: white; border-color: transparent; }
.social-tt:hover { background: #010101; color: white; border-color: #010101; }
.social-tw:hover { background: #1da1f2; color: white; border-color: #1da1f2; }
.social-yt:hover { background: #ff0000; color: white; border-color: #ff0000; }
.social-web:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Points Progress */
.points-progress-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.points-bar-wrap { background: var(--bg-secondary); border-radius: var(--radius-pill); height: 10px; overflow: hidden; margin: 10px 0; }
.points-bar { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 1s ease; }

/* --- DASHBOARD --- */
.dashboard-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.dashboard-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* --- CHAT --- */
.chat-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex; flex-direction: column;
    height: 460px; overflow: hidden;
}
.chat-header {
    padding: 14px 18px;
    background: rgba(79,142,247,0.07);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 700; font-size: 14px;
}
.chat-header .chat-online { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--success); font-weight: 600; }
.chat-header .chat-online::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: block; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.chat-body::-webkit-scrollbar { width: 4px; }
.chat-body::-webkit-scrollbar-track { background: transparent; }
.chat-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.chat-message { display: flex; gap: 8px; align-items: flex-end; }
.chat-message.own { flex-direction: row-reverse; }
.chat-content { flex: 1; min-width: 0; max-width: calc(100% - 44px); }
.chat-bubble {
    display: block; padding: 8px 14px;
    border-radius: 16px; font-size: 13px; line-height: 1.5;
    background: var(--bg-secondary); color: var(--text-primary);
    border-bottom-left-radius: 4px; word-break: break-word;
    overflow-wrap: anywhere;
}
.chat-message.own .chat-bubble {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-bottom-left-radius: 16px; border-bottom-right-radius: 4px;
}
.chat-time { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.chat-sender { font-size: 11px; color: var(--primary); font-weight: 700; margin-bottom: 2px; }
.chat-footer { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-footer .form-control { border-radius: var(--radius-pill) !important; font-size: 13px !important; }
.chat-footer .btn { border-radius: var(--radius-pill) !important; padding: 8px 16px !important; font-size: 13px; }

/* --- MESSAGES --- */
.inbox-item {
    display: flex; gap: 12px; padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition); cursor: pointer;
    align-items: flex-start;
}
.inbox-item:hover { background: rgba(79,142,247,0.05); }
.inbox-item.unread { background: rgba(79,142,247,0.04); }
.inbox-item.unread .inbox-subject { color: var(--text-primary); font-weight: 700; }
.inbox-subject { font-size: 14px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.inbox-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; margin-left: auto; flex-shrink: 0; }

/* --- ADMIN PANEL --- */
.admin-layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - var(--nav-height)); }
.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: sticky; top: var(--nav-height); height: calc(100vh - var(--nav-height));
    overflow-y: auto;
}
.admin-sidebar-header { padding: 0 20px 16px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.admin-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px; color: var(--text-secondary);
    font-size: 14px; font-weight: 600; transition: var(--transition);
    border-left: 3px solid transparent;
}
.admin-nav-item:hover { color: var(--text-primary); background: rgba(79,142,247,0.07); border-left-color: var(--primary); }
.admin-nav-item.active { color: var(--primary); background: rgba(79,142,247,0.1); border-left-color: var(--primary); }
.admin-nav-item i { width: 18px; text-align: center; }
.admin-content { padding: 28px; overflow-x: auto; }
.admin-section-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }

/* Admin Tables */
.gate-table { width: 100%; border-collapse: collapse; }
.gate-table th {
    background: var(--bg-secondary); color: var(--text-secondary);
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; font-weight: 700;
    padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.gate-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 14px; vertical-align: middle; }
.gate-table tr:hover td { background: rgba(79,142,247,0.03); }
.gate-table tr:last-child td { border-bottom: none; }

/* Pending Badge */
.pending-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; border-radius: 10px;
    background: var(--danger); color: white; font-size: 10px; font-weight: 700;
    padding: 0 5px; margin-left: 6px;
}

/* --- PHOTO ALBUM GRID --- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.album-photo-item { aspect-ratio: 1; border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; }
.album-photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.album-photo-item:hover img { transform: scale(1.1); }
.album-photo-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition); color: white; font-size: 20px;
}
.album-photo-item:hover .album-photo-overlay { opacity: 1; }

/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.95); align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius); }
.lightbox-close { position: absolute; top: 20px; right: 20px; color: white; font-size: 28px; cursor: pointer; z-index: 1; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); color: white; border: none; border-radius: 50%; width: 50px; height: 50px; font-size: 18px; cursor: pointer; transition: var(--transition); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(79,142,247,0.5); }

/* --- FILTER TABS --- */
.filter-tabs { display: flex; gap: 4px; background: var(--bg-secondary); border-radius: var(--radius); padding: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-tab { padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: var(--transition); white-space: nowrap; border: none; background: transparent; }
.filter-tab:hover { color: var(--text-primary); background: rgba(79,142,247,0.08); }
.filter-tab.active { background: var(--primary); color: white; }

/* --- SIDEBAR WIDGETS --- */
.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.sidebar-widget .widget-header { padding: 14px 18px; background: rgba(79,142,247,0.05); border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.sidebar-widget .widget-body { padding: 14px; }
.member-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.member-item:last-child { border-bottom: none; }
.member-info { flex: 1; min-width: 0; }
.member-name { font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-sub { font-size: 11px; color: var(--text-muted); }
.member-points { font-size: 12px; font-weight: 800; color: var(--warning); font-family: var(--font-heading); }

/* --- ANNOUNCEMENT --- */
.announcement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    border-left: 4px solid var(--info);
}
.announcement-card.type-warning { border-left-color: var(--warning); }
.announcement-card.type-success { border-left-color: var(--success); }
.announcement-card.type-danger { border-left-color: var(--danger); }
.announcement-card:hover { transform: translateX(2px); box-shadow: var(--shadow); }

/* --- HERO (HOME) --- */
.home-hero {
    padding: 80px 0 60px;
    position: relative; overflow: hidden;
    text-align: center;
}
.home-hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(79,142,247,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(124,58,237,0.08) 0%, transparent 50%);
}
.home-hero-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900; line-height: 1.1;
    margin-bottom: 20px;
}
.home-hero-title span {
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--accent2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.home-hero-sub { font-size: 18px; color: var(--text-secondary); max-width: 600px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-primary { padding: 14px 32px; font-size: 16px; border-radius: var(--radius-pill); }
.hero-actions .btn-ghost { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-pill); }

/* Floating orbs */
.orb { position: absolute; border-radius: 50%; filter: blur(60px); animation: orbFloat 8s ease-in-out infinite; pointer-events: none; }
.orb-1 { width: 300px; height: 300px; background: rgba(79,142,247,0.08); top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 200px; height: 200px; background: rgba(124,58,237,0.07); bottom: -50px; right: -50px; animation-delay: -4s; }
@keyframes orbFloat { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(30px, -30px); } }

/* --- SECTION TITLES --- */
.section-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-title .title-icon { width: 36px; height: 36px; border-radius: 8px; background: rgba(79,142,247,0.15); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 15px; }

/* --- SCROLL TO TOP --- */
.scroll-to-top {
    position: fixed; bottom: 28px; right: 28px; z-index: 999;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary); color: white; border: none;
    box-shadow: 0 4px 20px rgba(79,142,247,0.4);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
    opacity: 0; transform: translateY(10px); pointer-events: none;
}
.scroll-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.scroll-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 25px rgba(79,142,247,0.5); }

/* --- FOOTER --- */
.gate-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    position: relative; overflow: hidden;
}
.footer-wave { margin-bottom: -2px; }
.footer-wave svg { width: 100%; display: block; }
.footer-heading { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-secondary); margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); font-size: 13px; display: flex; align-items: center; gap: 6px; transition: var(--transition); }
.footer-links a:hover { color: var(--primary); transform: translateX(4px); }
.footer-links a i { font-size: 9px; }
.footer-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-pill { background: rgba(79,142,247,0.08); border: 1px solid var(--border-accent); border-radius: var(--radius-pill); padding: 4px 14px; font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.stat-pill i { color: var(--primary); }
.footer-top-users { display: flex; flex-direction: column; gap: 6px; }
.footer-user-pill { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border); transition: var(--transition); font-size: 13px; }
.footer-user-pill:hover { border-color: var(--border-accent); color: var(--text-primary); }
.footer-user-pill .points-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--warning); }
.footer-bottom { border-top: 1px solid var(--border); padding: 16px 0; }

/* --- TABS (Bootstrap override) --- */
.nav-tabs { border-bottom: 1px solid var(--border); }
.nav-tabs .nav-link { color: var(--text-secondary); border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 16px; font-weight: 600; font-size: 14px; transition: var(--transition); }
.nav-tabs .nav-link:hover { color: var(--text-primary); border-bottom-color: var(--border); }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }
.tab-content { padding-top: 20px; }

/* --- PAGINATION --- */
.pagination { gap: 4px; }
.page-item .page-link { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); border-radius: 8px; padding: 7px 14px; font-weight: 600; font-size: 13px; transition: var(--transition); }
.page-item .page-link:hover { background: rgba(79,142,247,0.1); color: var(--primary); border-color: var(--border-accent); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: white; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- UTILITY --- */
.text-accent { color: var(--accent) !important; }
.text-primary-c { color: var(--primary) !important; }
.bg-card { background: var(--bg-card) !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.gap-6 { gap: 6px !important; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }

/* Avatar */
.avatar-placeholder { flex-shrink: 0; }
img.rounded-circle { object-fit: cover; }

/* Article content */
.article-content { color: var(--text-primary); line-height: 1.9; }
.article-content h2,h3,h4 { font-family: var(--font-heading); margin: 28px 0 12px; color: var(--text-primary); }
.article-content p { margin-bottom: 16px; }
.article-content img { max-width: 100%; border-radius: var(--radius); }
.article-content blockquote { border-left: 4px solid var(--primary); padding: 12px 20px; background: rgba(79,142,247,0.06); border-radius: 0 8px 8px 0; margin: 20px 0; color: var(--text-secondary); }
.article-content code { background: var(--bg-secondary); color: var(--accent); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.article-content pre { background: var(--bg-secondary); padding: 16px; border-radius: var(--radius); overflow-x: auto; }

/* Like button */
.like-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: var(--font-body); }
.like-btn:hover, .like-btn.liked { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.08); }
.like-btn i { transition: transform 0.3s; }
.like-btn.liked i { transform: scale(1.3); }

/* ─── COMMENT ──────────────────────── */
.cmt-form-wrap { margin-bottom: 10px; }
.cmt-input-row { display: flex; align-items: center; gap: 6px; }
.cmt-input {
    flex: 1;
    height: 36px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    border-radius: 20px !important;
    background: var(--bg-secondary) !important;
    border-color: transparent !important;
}
.cmt-input:focus { border-color: var(--primary) !important; }
.cmt-send-btn {
    flex-shrink: 0; height: 32px; width: 32px; padding: 0 !important;
    border-radius: 50% !important;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}

/* item */
.comment-item { display: flex; gap: 8px; padding: 6px 0; align-items: flex-start; }
.comment-item:last-child { border-bottom: none; }
.comment-item > a img,
.comment-item > a .avatar-placeholder {
    width: 30px !important; height: 30px !important;
    min-width: 30px; flex-shrink: 0;
    font-size: 11px !important;
}
.comment-body { flex: 1; min-width: 0; }

/* bubble ala FB */
.cmt-bubble {
    display: inline-block;
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 7px 12px;
    max-width: 100%;
    word-break: break-word;
}
.comment-author, .comment-author a {
    font-weight: 700; font-size: 12px;
    color: var(--text-primary); text-decoration: none;
}
.comment-author a:hover { color: var(--primary); }
.cmt-rank {
    font-size: 9px; padding: 1px 5px;
    border-radius: 20px; margin-left: 4px;
    vertical-align: middle;
}
.comment-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-top: 1px; }

/* footer bawah bubble */
.cmt-footer {
    display: flex; align-items: center;
    gap: 8px; margin-top: 2px; padding-left: 4px;
    flex-wrap: wrap;
}
.comment-time { font-size: 10px; color: var(--text-muted); }
.cmt-like-btn {
    background: none; border: none; padding: 0;
    font-size: 11px; font-weight: 600;
    color: var(--text-muted); cursor: pointer; line-height: 1;
}
.cmt-like-btn:hover { color: var(--primary); }
.cmt-like-btn.liked { color: var(--primary); }
.cmt-like-count { font-size: 11px; }
.btn-cmt-txt {
    background: none; border: none; padding: 0;
    font-size: 11px; font-weight: 600;
    color: var(--text-muted); cursor: pointer;
}
.btn-cmt-txt:hover { color: var(--text-primary); }
.btn-cmt-del:hover { color: #ef4444; }

#comments-list { margin-top: 4px; }


/* Search */
.search-box { position: relative; }
.search-box .form-control { padding-left: 40px !important; }
.search-box .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 52px; color: var(--text-muted); margin-bottom: 16px; display: block; }
.empty-state h4 { color: var(--text-secondary); font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 14px; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-sidebar { order: -1; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-sidebar.mobile-open { display: block; position: fixed; inset: 0; z-index: 990; height: 100vh; }
    .navbar-collapse { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-top: 8px; }
    .main-menu .nav-link { padding: 10px 14px !important; }
}

@media (max-width: 768px) {
    .auth-card { padding: 28px 20px; }
    .profile-header { padding: 20px; }
    .home-hero { padding: 50px 0 40px; }
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .stat-card { padding: 16px; }
    .stat-info .stat-value { font-size: 22px; }
    .page-hero { padding: 28px 0 20px; margin-bottom: 20px; }
}

@media (max-width: 576px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .filter-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .profile-stats { gap: 16px; }
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.fade-in { animation: fadeIn 0.4s ease forwards; }

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* Loading skeleton */
.skeleton { background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card-hover) 50%, var(--bg-secondary) 75%); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 6px; }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }