/* ============================================================
   MCPEDL - Main Stylesheet
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
    --bg:       #0f0f0f;
    --bg2:      #141414;
    --card:     #1a1a1a;
    --card2:    #222222;
    --border:   #2a2a2a;
    --accent:   #00ffcc;
    --accent2:  #00e6b8;
    --accent3:  #00ccaa;
    --text:     #ffffff;
    --text2:    #cccccc;
    --text3:    #888888;
    --danger:   #ff4757;
    --warning:  #ffa502;
    --success:  #2ed573;
    --info:     #1e90ff;
    --shadow:   0 4px 24px rgba(0,0,0,0.4);
    --radius:   8px;
    --radius-lg:16px;
    --font:     'Inter', 'Poppins', sans-serif;
    --nav-h:    64px;
    --transition: 0.2s ease;
    --max-w:    1200px;
}

[data-theme="light"] {
    --bg:       #f5f5f5;
    --bg2:      #ebebeb;
    --card:     #ffffff;
    --card2:    #f8f8f8;
    --border:   #e0e0e0;
    --text:     #111111;
    --text2:    #444444;
    --text3:    #888888;
    --shadow:   0 4px 24px rgba(0,0,0,0.1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px; /* mobile nav */
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent2); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

main { flex: 1; }

.skip-link {
    position: absolute; top: -40px; left: 0; background: var(--accent); color: #000;
    padding: 8px 16px; z-index: 10000; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ---- Layout ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 0; }
.section-sm { padding: 32px 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.sidebar-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }

/* ---- Navbar ---- */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(15,15,15,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-h);
}
[data-theme="light"] .navbar { background: rgba(255,255,255,0.95); }

.navbar-inner {
    display: flex; align-items: center; gap: 16px; height: 100%;
}
.navbar-brand { display: flex; align-items: center; flex-shrink: 0; }
.logo-text {
    font-family: 'Poppins', sans-serif; font-size: 1.5rem; font-weight: 800;
    color: var(--accent); letter-spacing: -0.5px;
}
.site-logo { height: 40px; width: auto; }

.navbar-search {
    flex: 1; max-width: 480px; position: relative;
    display: flex; align-items: center;
}
.search-input {
    width: 100%; padding: 10px 48px 10px 16px;
    background: var(--card2); border: 1px solid var(--border);
    border-radius: 50px; color: var(--text); font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,255,204,0.15);
}
.search-btn {
    position: absolute; right: 14px; color: var(--text3); font-size: 0.9rem;
    background: none; transition: color var(--transition);
}
.search-btn:hover { color: var(--accent); }
.search-suggestions {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; z-index: 200;
    display: none; box-shadow: var(--shadow);
}
.search-suggestions.active { display: block; }
.suggestion-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    color: var(--text2); cursor: pointer; transition: background var(--transition);
}
.suggestion-item:hover { background: var(--card2); color: var(--accent); }
.suggestion-item img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; }

.navbar-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
    color: var(--text2); padding: 8px 10px; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 500; transition: color var(--transition), background var(--transition);
    display: flex; align-items: center; gap: 6px;
}
.nav-link:hover { color: var(--text); background: var(--card2); }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); min-width: 200px;
    box-shadow: var(--shadow); z-index: 500;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all var(--transition); overflow: hidden;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px;
    color: var(--text2); font-size: 0.875rem;
    transition: background var(--transition), color var(--transition);
}
.dropdown-item:hover { background: var(--card2); color: var(--accent); }
.dropdown-item i { width: 16px; text-align: center; color: var(--text3); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Notification Dropdown */
.notif-bell { position: relative; }
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 700; border-radius: 50%;
    width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
}
.notif-menu { min-width: 320px; right: 0; left: auto; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.875rem; }
.notif-clear { font-size: 0.8rem; color: var(--accent); cursor: pointer; }
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.notif-item:hover { background: var(--card2); }
.notif-item.unread { background: rgba(0,255,204,0.05); }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--card2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent); }
.notif-content p { font-size: 0.83rem; color: var(--text2); }
.notif-content small { color: var(--text3); font-size: 0.75rem; }
.notif-footer { display: block; text-align: center; padding: 10px; font-size: 0.83rem; color: var(--accent); border-top: 1px solid var(--border); }
.notif-loading { text-align: center; padding: 20px; color: var(--text3); }

/* User Avatar in Nav */
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); font-size: 0; color: transparent; }
.nav-avatar-sm { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; font-size: 0; color: transparent; }

/* Dark mode toggle */
.dark-mode-toggle {
    color: var(--text3); width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: color var(--transition), background var(--transition);
}
.dark-mode-toggle:hover { color: var(--accent); background: var(--card2); }

.nav-hamburger {
    display: none; flex-direction: column; gap: 5px; width: 32px;
    margin-left: auto;
}
.nav-hamburger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 900; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius); font-size: 0.9rem;
    font-weight: 600; cursor: pointer; transition: all var(--transition); border: none;
    text-decoration: none; white-space: nowrap; font-family: inherit;
}
.btn-accent { background: var(--accent); color: #000; }
.btn-accent:hover { background: var(--accent2); color: #000; transform: translateY(-1px); }
.btn-outline { border: 1.5px solid var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: #000; }
.btn-ghost { color: var(--text2); background: var(--card2); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #e84057; }
.btn-success { background: var(--success); color: #000; }
.btn-warning { background: var(--warning); color: #000; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; }

/* ---- Cards ---- */
.content-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex; flex-direction: column;
}
.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,255,204,0.12);
    border-color: rgba(0,255,204,0.3);
}
.card-thumb-link { position: relative; display: block; overflow: hidden; aspect-ratio: 16/9; }
.card-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.content-card:hover .card-thumb { transform: scale(1.05); }
.card-category {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,255,204,0.9); color: #000;
    font-size: 0.7rem; font-weight: 700; padding: 3px 8px;
    border-radius: 50px; text-transform: uppercase; letter-spacing: 0.5px;
}
.card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 0.95rem; font-weight: 600; line-height: 1.35; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; color: var(--text3); }
.card-downloads { display: flex; align-items: center; gap: 4px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
.card-version { font-size: 0.75rem; color: var(--text3); }

/* ---- Stars ---- */
.stars { color: #ffd700; font-size: 0.8rem; }
.rating-count { color: var(--text3); font-size: 0.75rem; margin-left: 4px; }

/* ---- Section Headers ---- */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: 1.4rem; font-weight: 700; position: relative; padding-left: 14px; }
.section-title::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 22px; background: var(--accent); border-radius: 2px;
}
.view-all { color: var(--accent); font-size: 0.875rem; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.view-all:hover { color: var(--accent2); }

/* ---- Hero Banner ---- */
.hero-section {
    background: linear-gradient(135deg, rgba(0,255,204,0.1) 0%, transparent 50%), var(--bg2);
    border-bottom: 1px solid var(--border); padding: 60px 0;
}
.hero-inner { display: flex; align-items: center; gap: 48px; }
.hero-text { flex: 1; }
.hero-text h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero-text h1 span { color: var(--accent); }
.hero-text p { color: var(--text2); font-size: 1.1rem; margin-bottom: 28px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 32px; flex-wrap: wrap; }
.hero-stat-item { text-align: center; }
.hero-stat-item strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.hero-stat-item span { font-size: 0.8rem; color: var(--text3); }
.hero-image { flex: 0 0 400px; }

/* ---- Categories Grid ---- */
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.category-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px 16px; text-align: center; transition: all var(--transition);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.category-card:hover {
    border-color: var(--accent); background: rgba(0,255,204,0.05);
    transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,255,204,0.1);
}
.category-icon {
    width: 56px; height: 56px; background: rgba(0,255,204,0.15);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--accent);
}
.category-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.category-card span { font-size: 0.78rem; color: var(--text3); }

/* ---- Featured Creator Card ---- */
.creator-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 20px; display: flex; align-items: center; gap: 14px;
    transition: all var(--transition);
}
.creator-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.creator-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); flex-shrink: 0; }
.creator-info h4 { font-size: 0.95rem; font-weight: 600; }
.creator-info h4 a { color: var(--text); }
.creator-info h4 a:hover { color: var(--accent); }
.creator-info p { font-size: 0.8rem; color: var(--text3); margin-top: 2px; }
.creator-verified { color: var(--accent); font-size: 0.85rem; margin-left: 4px; }
.creator-card .follow-btn { margin-left: auto; }

/* ---- Search & Filter ---- */
.search-page-header { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 32px 0; }
.search-page-form { display: flex; gap: 12px; }
.search-page-input {
    flex: 1; padding: 14px 20px; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text); font-size: 1rem;
}
.search-page-input:focus { outline: none; border-color: var(--accent); }
.filter-bar {
    display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; align-items: center;
}
.filter-select {
    padding: 8px 14px; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text); font-size: 0.875rem; cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--accent); }
.filter-tag {
    padding: 6px 12px; background: var(--card2); border: 1px solid var(--border);
    border-radius: 50px; font-size: 0.8rem; color: var(--text2); cursor: pointer;
    transition: all var(--transition);
}
.filter-tag:hover, .filter-tag.active { background: var(--accent); color: #000; border-color: var(--accent); }
.search-count { color: var(--text3); font-size: 0.875rem; margin-bottom: 16px; }

/* ---- Content Detail Page ---- */
.content-detail-header { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 32px 0; }
.content-title-area h1 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.content-meta-bar { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.content-meta-item { display: flex; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--text3); }
.content-meta-item a { color: var(--accent); }
.content-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.download-btn { font-size: 1rem; padding: 14px 32px; min-width: 180px; }
.btn-like, .btn-bookmark { background: var(--card2); color: var(--text); }
.btn-like.liked { color: var(--danger); border-color: var(--danger); }
.btn-bookmark.bookmarked { color: var(--accent); border-color: var(--accent); }

.content-gallery { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; margin: 20px 0; }
.gallery-item { flex-shrink: 0; width: 180px; height: 100px; object-fit: cover; border-radius: var(--radius); cursor: pointer; border: 2px solid transparent; transition: border-color var(--transition); }
.gallery-item:hover, .gallery-item.active { border-color: var(--accent); }
.gallery-main img { width: 100%; border-radius: var(--radius-lg); max-height: 480px; object-fit: cover; }

.content-description { line-height: 1.8; color: var(--text2); }
.content-description h1, .content-description h2, .content-description h3 { color: var(--text); margin: 1em 0 .5em; }
.content-description ul, .content-description ol { padding-left: 1.5em; margin: .5em 0; }
.content-description img { border-radius: var(--radius); margin: .5em 0; }
.content-description code { background: var(--card2); padding: 2px 6px; border-radius: 4px; font-size: .85em; }
.content-description pre { background: var(--card2); padding: 16px; border-radius: var(--radius); overflow-x: auto; margin: 1em 0; }

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    padding: 4px 12px; background: var(--card2); border: 1px solid var(--border);
    border-radius: 50px; font-size: 0.78rem; color: var(--text3);
    transition: all var(--transition);
}
.tag:hover { background: rgba(0,255,204,0.1); border-color: var(--accent); color: var(--accent); }

/* ---- Comments ---- */
.comments-section { margin-top: 32px; }
.comment-form textarea {
    width: 100%; padding: 14px; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text); font-size: 0.9rem; resize: vertical; min-height: 100px;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-item {
    display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border);
}
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.comment-body { flex: 1; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.comment-author { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.comment-time { font-size: 0.78rem; color: var(--text3); }
.comment-text { color: var(--text2); font-size: 0.9rem; line-height: 1.6; }
.comment-actions { display: flex; gap: 12px; margin-top: 8px; }
.comment-action-btn { font-size: 0.8rem; color: var(--text3); display: flex; align-items: center; gap: 4px; transition: color var(--transition); }
.comment-action-btn:hover { color: var(--accent); }
.comment-replies { margin-left: 54px; }

/* ---- Rating Widget ---- */
.rating-widget { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; background: var(--card2); border-radius: var(--radius-lg); }
.rating-stars-input { display: flex; flex-direction: row-reverse; gap: 4px; }
.rating-stars-input input { display: none; }
.rating-stars-input label {
    font-size: 1.8rem; color: var(--text3); cursor: pointer; transition: color var(--transition);
}
.rating-stars-input input:checked ~ label,
.rating-stars-input label:hover,
.rating-stars-input label:hover ~ label { color: #ffd700; }

/* ---- Auth Pages ---- */
.auth-page {
    min-height: calc(100vh - var(--nav-h));
    display: flex; align-items: center; justify-content: center;
    padding: 40px 16px;
}
.auth-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 440px;
}
.auth-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; text-align: center; }
.auth-subtitle { color: var(--text3); text-align: center; margin-bottom: 28px; font-size: 0.9rem; }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; color: var(--text2); }
.form-control {
    width: 100%; padding: 11px 14px; background: var(--bg2); border: 1.5px solid var(--border);
    border-radius: var(--radius); color: var(--text); font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,255,204,0.12);
}
.form-control::placeholder { color: var(--text3); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-text { font-size: 0.78rem; color: var(--text3); margin-top: 4px; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 4px; }
.form-success { font-size: 0.78rem; color: var(--success); margin-top: 4px; }
.input-group { position: relative; }
.input-group .form-control { padding-right: 44px; }
.input-group-icon {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text3); cursor: pointer; transition: color var(--transition);
}
.input-group-icon:hover { color: var(--accent); }
.form-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.form-check input[type="checkbox"] { margin-top: 3px; accent-color: var(--accent); }
.form-check-label { font-size: 0.875rem; color: var(--text2); }
.form-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text3); font-size: 0.875rem; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Alert Messages */
.alert {
    padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px; font-size: 0.875rem;
}
.alert-danger  { background: rgba(255,71,87,0.12); border: 1px solid rgba(255,71,87,0.3); color: #ff7784; }
.alert-success { background: rgba(46,213,115,0.12); border: 1px solid rgba(46,213,115,0.3); color: #2ed573; }
.alert-warning { background: rgba(255,165,2,0.12); border: 1px solid rgba(255,165,2,0.3); color: #ffa502; }
.alert-info    { background: rgba(30,144,255,0.12); border: 1px solid rgba(30,144,255,0.3); color: #1e90ff; }

/* ---- Dashboard Layout ---- */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; min-height: 70vh; }
.dashboard-sidebar {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 20px; position: sticky; top: calc(var(--nav-h) + 16px); align-self: start;
}
.dash-user-info { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.dash-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); margin: 0 auto 10px; font-size: 0; color: transparent; display: block; background: var(--card2); }
.dash-username { font-weight: 700; font-size: 1rem; }
.dash-role { font-size: 0.78rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }
.dash-nav-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: var(--radius); color: var(--text2); font-size: 0.875rem; font-weight: 500;
    transition: all var(--transition); margin-bottom: 4px;
}
.dash-nav-item i { width: 18px; text-align: center; color: var(--text3); }
.dash-nav-item:hover, .dash-nav-item.active { background: rgba(0,255,204,0.1); color: var(--accent); }
.dash-nav-item.active i, .dash-nav-item:hover i { color: var(--accent); }
.dash-nav-divider { height: 1px; background: var(--border); margin: 10px 0; }

.dashboard-content { min-width: 0; }
.dash-page-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }

/* Stats Cards */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 20px; display: flex; align-items: center; gap: 14px;
}
.stat-icon {
    width: 52px; height: 52px; border-radius: var(--radius); display: flex; align-items: center;
    justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.stat-icon.green  { background: rgba(46,213,115,0.15); color: var(--success); }
.stat-icon.blue   { background: rgba(30,144,255,0.15); color: var(--info); }
.stat-icon.orange { background: rgba(255,165,2,0.15); color: var(--warning); }
.stat-icon.purple { background: rgba(149,97,226,0.15); color: #9561e2; }
.stat-icon.accent { background: rgba(0,255,204,0.15); color: var(--accent); }
.stat-info strong { display: block; font-size: 1.5rem; font-weight: 800; }
.stat-info span { font-size: 0.8rem; color: var(--text3); }

/* Data Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { padding: 10px 14px; text-align: left; font-weight: 600; color: var(--text3); border-bottom: 1px solid var(--border); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table .actions { display: flex; gap: 8px; }
.table-wrapper { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: auto; }

/* Badges */
.badge {
    display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 50px;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-approved { background: rgba(46,213,115,0.15); color: var(--success); }
.badge-pending  { background: rgba(255,165,2,0.15); color: var(--warning); }
.badge-rejected { background: rgba(255,71,87,0.15); color: var(--danger); }
.badge-draft    { background: rgba(100,100,100,0.15); color: var(--text3); }
.badge-active   { background: rgba(46,213,115,0.15); color: var(--success); }
.badge-banned   { background: rgba(255,71,87,0.15); color: var(--danger); }
.badge-admin    { background: rgba(149,97,226,0.15); color: #9561e2; }
.badge-creator  { background: rgba(0,255,204,0.15); color: var(--accent); }
.badge-user     { background: rgba(30,144,255,0.15); color: var(--info); }

/* ---- Upload Progress ---- */
.upload-progress { margin: 12px 0; }
.progress-bar-wrap { background: var(--card2); border-radius: 50px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 50px; transition: width .3s ease; width: 0; }
.progress-text { font-size: 0.8rem; color: var(--text3); margin-top: 4px; }

/* File Upload Zone */
.upload-zone {
    border: 2px dashed var(--border); border-radius: var(--radius-lg);
    padding: 40px; text-align: center; cursor: pointer;
    transition: all var(--transition); background: var(--bg2);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: rgba(0,255,204,0.04); }
.upload-zone-icon { font-size: 2.5rem; color: var(--text3); margin-bottom: 12px; }
.upload-zone p { color: var(--text3); font-size: 0.9rem; }
.upload-zone strong { color: var(--accent); }
.upload-zone input[type="file"] { display: none; }

/* Rich Text Editor */
.rich-editor { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rich-editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px; background: var(--card2); border-bottom: 1px solid var(--border); }
.editor-btn { padding: 4px 8px; border-radius: 4px; color: var(--text2); font-size: 0.875rem; transition: all var(--transition); }
.editor-btn:hover, .editor-btn.active { background: var(--border); color: var(--accent); }
.rich-editor-content {
    min-height: 200px; max-height: 360px; overflow-y: auto;
    padding: 14px; color: var(--text); background: var(--bg2);
    outline: none; font-size: 0.9rem; line-height: 1.7;
}

/* Screenshot upload grid */
.screenshots-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.screenshot-preview {
    aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
    background: var(--card2); border: 1px solid var(--border); position: relative;
}
.screenshot-preview img { width: 100%; height: 100%; object-fit: cover; }
.screenshot-remove {
    position: absolute; top: 4px; right: 4px; background: rgba(255,71,87,0.9);
    color: #fff; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
    cursor: pointer; opacity: 0; transition: opacity var(--transition);
}
.screenshot-preview:hover .screenshot-remove { opacity: 1; }

/* ---- Modal ---- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 2000;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    opacity: 0; visibility: hidden; transition: all .2s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
    transform: translateY(20px) scale(.97); transition: transform .2s;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; color: var(--text3); display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.modal-close:hover { background: var(--danger); color: #fff; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all .2s;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: var(--radius); }
.lightbox-close { position: absolute; top: 16px; right: 16px; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ---- Toast ---- */
.toast-container { position: fixed; bottom: 80px; right: 16px; z-index: 5000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); min-width: 280px; max-width: 380px;
    animation: slideIn .3s ease; font-size: 0.875rem;
}
.toast.hide { animation: slideOut .3s ease forwards; }
.toast-icon { font-size: 1.1rem; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }
.toast-msg { flex: 1; color: var(--text); }
.toast-close { color: var(--text3); font-size: 0.8rem; cursor: pointer; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

/* ---- Loader ---- */
.page-loader {
    position: fixed; inset: 0; background: var(--bg); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity .4s, visibility .4s; pointer-events: none;
    opacity: 1; visibility: visible;
    /* CSS fallback: auto-hide after 5s even if JS never runs */
    animation: loaderAutohide 0.4s ease 5s forwards;
}
@keyframes loaderAutohide { to { opacity: 0; visibility: hidden; } }
.page-loader.hidden { opacity: 0; visibility: hidden; display: none; }
.loader-spinner {
    width: 44px; height: 44px; border: 3px solid var(--border);
    border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Pagination ---- */
.pagination { display: flex; justify-content: center; margin-top: 32px; }
.pagination ul { display: flex; gap: 6px; align-items: center; }
.pagination li a, .pagination li.active a {
    display: flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 10px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text2); font-size: 0.875rem; transition: all var(--transition);
}
.pagination li a:hover { border-color: var(--accent); color: var(--accent); }
.pagination li.active a { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 700; }
.pagination li.dots a { border: none; background: none; cursor: default; }

/* ---- Tabs ---- */
.tabs { border-bottom: 1px solid var(--border); margin-bottom: 24px; display: flex; gap: 4px; }
.tab-btn {
    padding: 10px 18px; font-size: 0.9rem; font-weight: 500; color: var(--text3);
    border-bottom: 2px solid transparent; transition: all var(--transition); cursor: pointer; border-radius: 0;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---- Footer ---- */
.site-footer { background: var(--card); border-top: 1px solid var(--border); padding: 48px 0 24px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { font-size: 1.4rem; font-weight: 800; color: var(--accent); display: inline-block; margin-bottom: 12px; }
.footer-tagline { font-weight: 600; color: var(--text); margin-bottom: 8px; }
.footer-desc { font-size: 0.875rem; color: var(--text3); line-height: 1.7; margin-bottom: 16px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 36px; height: 36px; background: var(--card2); border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text3); transition: all var(--transition); }
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; color: var(--text); }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.875rem; color: var(--text3); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text3); flex-wrap: wrap; gap: 8px; }

/* ---- Mobile Bottom Nav ---- */
.mobile-bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--card); border-top: 1px solid var(--border);
    z-index: 900; height: 60px; padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; color: var(--text3); font-size: 0.65rem;
    transition: color var(--transition); padding: 6px 0;
}
.mobile-nav-item i { font-size: 1.1rem; }
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--accent); }
.mobile-upload { background: var(--accent); color: #000 !important; border-radius: 12px 12px 0 0; margin: 0 8px; }

/* ---- Ad Containers ---- */
.ad-container { text-align: center; margin: 12px 0; }
.ad-container img { max-width: 100%; margin: 0 auto; }

/* ---- Creator Profile ---- */
.creator-profile-banner { position: relative; height: 200px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.creator-profile-banner img { width: 100%; height: 100%; object-fit: cover; }
.creator-profile-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 24px; }
.creator-profile-info { display: flex; align-items: flex-start; gap: 20px; padding: 20px 24px; position: relative; }
.creator-profile-avatar { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--card); object-fit: cover; flex-shrink: 0; margin-top: -68px; }
.creator-profile-meta h2 { font-size: 1.4rem; font-weight: 800; }
.creator-stats-row { display: flex; gap: 32px; flex-wrap: wrap; padding: 0 24px 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.creator-stat { text-align: center; }
.creator-stat strong { display: block; font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.creator-stat span { font-size: 0.78rem; color: var(--text3); }

/* ---- Changelog ---- */
.changelog-box { background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.changelog-box h4 { margin-bottom: 8px; color: var(--accent); font-size: 0.9rem; }
.changelog-box pre { color: var(--text2); font-size: 0.875rem; white-space: pre-wrap; }

/* ---- Interstitial ---- */
.interstitial-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 8000;
    display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px;
}
.interstitial-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; text-align: center; max-width: 480px; width: 100%; }
.interstitial-timer { font-size: 2rem; font-weight: 800; color: var(--accent); }
.interstitial-msg { color: var(--text2); margin: 12px 0; }

/* ---- Misc ---- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text3); }
.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 1rem; }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-muted  { color: var(--text3); }
.text-center { text-align: center; }
.fw-bold { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .grid-4        { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid   { grid-template-columns: 1fr 1fr; }
    .sidebar-layout { grid-template-columns: 1fr; }
    .stats-grid    { grid-template-columns: repeat(2, 1fr); }
    .hero-image    { display: none; }
}

/* Mobile */
@media (max-width: 768px) {
    :root { --nav-h: 56px; }
    body { padding-bottom: 60px; }

    .navbar-search { display: none; }
    .navbar-search.mobile-search-open { display: flex; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--bg); padding: 10px 16px; border-bottom: 1px solid var(--border); z-index: 999; max-width: 100%; }

    .navbar-nav {
        position: fixed; top: var(--nav-h); left: 0; width: 280px; height: calc(100vh - var(--nav-h));
        background: var(--card); border-right: 1px solid var(--border);
        flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px;
        overflow-y: auto; transform: translateX(-100%); transition: transform .3s ease;
        z-index: 950; margin-left: 0;
    }
    .navbar-nav.open { transform: translateX(0); }
    .nav-link { width: 100%; padding: 12px 14px; }
    .nav-dropdown { width: 100%; }
    .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: var(--card2); margin-top: 4px; display: none; }
    .nav-dropdown.open .dropdown-menu { display: block; }
    .nav-hamburger { display: flex; }
    .nav-overlay.active { display: block; }

    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-brand { margin-bottom: 0; }
    .mobile-bottom-nav { display: flex; }
    .hero-text h1 { font-size: 1.8rem; }
    .auth-card { padding: 24px; }
    .screenshots-grid { grid-template-columns: repeat(3, 1fr); }
    .content-detail-header { padding: 20px 0; }
    .content-title-area h1 { font-size: 1.4rem; }
    .sidebar-layout .sidebar { display: none; } /* collapse sidebar on mobile detail */
    .toast-container { bottom: 70px; left: 10px; right: 10px; }
    .toast { min-width: auto; }
    .creator-profile-info { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .content-actions { flex-direction: column; }
    .hero-actions { flex-direction: column; }
    .search-page-form { flex-direction: column; }
}
