/* ==========================================
   GameLib Admin — Dashboard Styles
   ========================================== */

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

:root {
    --primary: #E50914; /* Crimson Red */
    --primary-hover: #B20710;
    --bg-main: #080808;
    --bg-sidebar: rgba(18, 18, 18, 0.8);
    --bg-nav: rgba(10, 10, 10, 0.9);
    --bg-card: rgba(25, 25, 25, 0.6);
    --bg-card-hover: rgba(35, 35, 35, 0.8);
    --bg-input: rgba(0, 0, 0, 0.4);
    
    --text-primary: #FFFFFF;
    --text-normal: #E5E5E5;
    --text-muted: #A3A3A3;
    
    --success: #00C853;
    --danger: #FF1744;
    --warning: #FFD600;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(18, 18, 18, 0.7);
    --glass-blur: blur(16px);
    
    --font-main: 'Outfit', 'Inter', sans-serif;
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(229, 9, 20, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(229, 9, 20, 0.03) 0%, transparent 40%);
    color: var(--text-normal);
    line-height: 1.6;
    min-height: 100vh;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
}

.accent {
    background: linear-gradient(135deg, #FFF 0%, #E50914 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* ---- Login Page ---- */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 1;
}

.login-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 70%);
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.login-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Stats Grid */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.stat-card-number {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
}

/* Sections */
.admin-section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.section-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Table */
.games-table th {
    background-color: var(--bg-nav);
    color: var(--text-muted);
}

.games-table tr:hover td {
    background-color: var(--bg-card-hover);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input:not([type="file"]):not([type="checkbox"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.05); /* Subtle border */
    border-radius: var(--radius-sm);
    color: var(--text-normal);
    font-family: var(--font-main);
    font-size: 14px;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15); /* Soft primary glow */
}

input[type="file"] {
    display: block;
    width: 100%;
    padding: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background: var(--bg-card-hover);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(255,255,255,0.1);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-normal);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-normal);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
}

.image-preview {
    margin-top: 8px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-width: 200px;
}

.image-preview img {
    width: 100%;
    border-radius: var(--radius-sm);
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.btn-danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.back-home {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition-normal);
}

.back-home:hover {
    color: var(--accent-primary);
}

/* ---- Admin Header ---- */
.admin-header {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon { font-size: 24px; }
.logo-text {
    font-size: 22px;
    font-weight: 800;
}

.admin-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    background: var(--accent-gradient);
    color: white;
    letter-spacing: 1px;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

/* ---- Main Content ---- */
.admin-main {
    padding: 32px 0;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Stats Grid ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card-number {
    display: block;
    font-size: 24px;
    font-weight: 800;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ---- Section ---- */
.admin-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
}

/* ---- Games Table ---- */
.games-table-container {
    overflow-x: auto;
}

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

.games-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.games-table td {
    padding: 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    color: var(--text-normal);
}

.games-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.table-loading {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
}

.table-img {
    width: 56px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.table-no-img {
    width: 56px;
    height: 36px;
    border-radius: 6px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.table-title {
    font-weight: 600;
}

.table-category {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-primary);
    display: inline-block;
}

.table-featured {
    color: var(--warning);
}

.table-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-family: var(--font-main);
    transition: var(--transition-fast);
}

.action-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.action-btn.delete:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-main);
    background-image: 
        radial-gradient(circle at top right, rgba(229, 9, 20, 0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.1), transparent 40%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    width: 680px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
}

.modal::-webkit-scrollbar {
    width: 8px;
}
.modal::-webkit-scrollbar-track {
    background: transparent;
}
.modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ---- Autocomplete ---- */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition-fast);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover, .autocomplete-item.active {
    background: var(--bg-card-hover);
}

.autocomplete-img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.autocomplete-info {
    display: flex;
    flex-direction: column;
}

.autocomplete-title {
    font-size: 14px;
    font-weight: 600;
}

.autocomplete-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* ---- Toast ---- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: white;
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ==========================================
   ADMIN MOBILE RESPONSIVENESS
   ========================================== */


/* Admin Main Definitions continue... */

/* ---- Admin Tabs ---- */
.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.25s ease;
    flex: 1;
    justify-content: center;
}

.admin-tab:hover {
    color: var(--text-normal);
    background: rgba(255,255,255,0.03);
}

.admin-tab.active {
    background: linear-gradient(135deg, rgba(229,9,20,0.2), rgba(139,92,246,0.15));
    color: white;
    box-shadow: 0 2px 12px rgba(229,9,20,0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.3s ease;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Homepage Management Grid ---- */
.hp-hint {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.hp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 24px;
}

.hp-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Game Card in Homepage Preview */
.hp-card {
    background: rgba(20,20,25,0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: grab;
    transition: all 0.3s ease;
    position: relative;
}

.hp-card:hover {
    border-color: rgba(229,9,20,0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.hp-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    border-color: rgba(139,92,246,0.6);
    box-shadow: 0 0 20px rgba(139,92,246,0.3);
}

.hp-card.drag-over {
    border-color: rgba(0,200,83,0.6);
    box-shadow: 0 0 20px rgba(0,200,83,0.2);
}

.hp-card-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.hp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hp-card:hover .hp-card-image img {
    transform: scale(1.05);
}

.hp-card-order {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,0.15);
}

.hp-card-actions-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hp-card:hover .hp-card-actions-overlay {
    opacity: 1;
}

.hp-card-action {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.hp-card-action:hover {
    background: rgba(229,9,20,0.8);
    border-color: rgba(229,9,20,0.6);
    transform: scale(1.1);
}

.hp-card-action.move-up:hover,
.hp-card-action.move-down:hover {
    background: rgba(88,101,242,0.8);
    border-color: rgba(88,101,242,0.6);
}

.hp-card-action.delete-card:hover {
    background: rgba(239,68,68,0.8);
    border-color: rgba(239,68,68,0.6);
}

.hp-card-body {
    padding: 16px;
}

.hp-card-title {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    line-height: 1.3;
}

.hp-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-card-desc.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
}

.hp-card-show-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 0;
    background: none;
    border: none;
    color: #5865f2;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: color 0.2s;
}

.hp-card-show-more:hover {
    color: #7983f5;
}

.hp-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.hp-card-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.hp-card-edit-btn {
    padding: 4px 10px;
    background: rgba(88,101,242,0.15);
    border: 1px solid rgba(88,101,242,0.3);
    border-radius: 4px;
    color: #5865f2;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s;
}

.hp-card-edit-btn:hover {
    background: rgba(88,101,242,0.3);
    border-color: rgba(88,101,242,0.5);
}

/* Add Game Card */
.hp-add-card {
    background: rgba(20,20,25,0.4);
    border: 2px dashed rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 12px;
}

.hp-add-card:hover {
    border-color: rgba(229,9,20,0.5);
    background: rgba(229,9,20,0.05);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(229,9,20,0.1);
}

.hp-add-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(229,9,20,0.2), rgba(139,92,246,0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    transition: transform 0.3s ease;
}

.hp-add-card:hover .hp-add-icon {
    transform: scale(1.15) rotate(90deg);
}

.hp-add-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Quick Edit Modal */
.quick-edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    padding: 20px;
}

.quick-edit-overlay.active {
    display: flex;
}

.quick-edit-modal {
    background: var(--bg-main);
    background-image:
        radial-gradient(circle at top right, rgba(88,101,242,0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(229,9,20,0.1), transparent 40%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    width: 560px;
    max-width: 95%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 40px 100px rgba(0,0,0,0.9);
}

.quick-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.quick-edit-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.quick-edit-body {
    padding: 24px;
}

.quick-edit-body textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    color: var(--text-normal);
    font-family: var(--font-main);
    font-size: 14px;
    resize: vertical;
}

.quick-edit-body textarea:focus {
    outline: none;
    border-color: #5865f2;
    box-shadow: 0 0 0 3px rgba(88,101,242,0.15);
}

.quick-edit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ---- Tab Badge ---- */
.tab-badge {
    background: #FF1744;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 50px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

/* ---- Reviews Admin Styles ---- */
.reviews-admin-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rev-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.1);
}

.rev-stat-badge.total {
    background: rgba(255,255,255,0.05);
    color: #ccc;
}

.rev-stat-badge.approved {
    background: rgba(0,200,83,0.1);
    border-color: rgba(0,200,83,0.2);
    color: #00C853;
}

.rev-stat-badge.pending {
    background: rgba(255,193,7,0.1);
    border-color: rgba(255,193,7,0.2);
    color: #FFC107;
}

.rev-stat-badge.rejected {
    background: rgba(255,23,68,0.1);
    border-color: rgba(255,23,68,0.2);
    color: #FF1744;
}

/* Sub-tabs */
.reviews-sub-tabs {
    display: flex;
    gap: 4px;
    padding: 16px 24px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rev-sub-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: -1px;
}

.rev-sub-tab:hover {
    color: var(--text-normal);
}

.rev-sub-tab.active {
    color: white;
    border-bottom-color: var(--primary);
}

.rev-sub-badge {
    background: rgba(255,193,7,0.2);
    color: #FFC107;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 50px;
    min-width: 18px;
    text-align: center;
}

/* Reviews Admin List */
.reviews-admin-list {
    padding: 24px;
}

.rev-game-group {
    margin-bottom: 28px;
}

.rev-game-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.rev-game-img {
    width: 48px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: #222;
}

.rev-game-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.rev-game-count {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 50px;
}

/* Individual Review Card (Admin) */
.rev-admin-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 10px;
    transition: all 0.25s ease;
}

.rev-admin-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

.rev-admin-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.rev-admin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E50914, #7367F0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.rev-admin-user {
    font-weight: 700;
    font-size: 14px;
}

.rev-admin-date {
    font-size: 11px;
    color: var(--text-muted);
}

.rev-admin-stars {
    color: #FFD700;
    font-size: 14px;
    letter-spacing: 1px;
    margin-left: auto;
}

.rev-admin-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-normal);
    margin-bottom: 12px;
    padding-left: 46px;
}

/* AI Section */
.rev-ai-section {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(139,92,246,0.06);
    border: 1px solid rgba(139,92,246,0.12);
    border-radius: 8px;
    margin-bottom: 12px;
    margin-left: 46px;
}

.rev-ai-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.rev-ai-content {
    flex: 1;
}

.rev-ai-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a78bfa;
    margin-bottom: 3px;
}

.rev-ai-reason {
    font-size: 12px;
    color: var(--text-normal);
    line-height: 1.5;
}

.rev-ai-status {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.rev-ai-status.approved {
    background: rgba(0,200,83,0.15);
    color: #00C853;
}

.rev-ai-status.needs_review {
    background: rgba(255,193,7,0.15);
    color: #FFC107;
}

.rev-ai-status.rejected {
    background: rgba(255,23,68,0.15);
    color: #FF1744;
}

/* Admin Actions */
.rev-admin-actions {
    display: flex;
    gap: 6px;
    padding-left: 46px;
}

.rev-action-btn {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-main);
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rev-action-btn.approve {
    color: #00C853;
    border-color: rgba(0,200,83,0.3);
}
.rev-action-btn.approve:hover {
    background: rgba(0,200,83,0.15);
}

.rev-action-btn.reject {
    color: #FF1744;
    border-color: rgba(255,23,68,0.3);
}
.rev-action-btn.reject:hover {
    background: rgba(255,23,68,0.15);
}

.rev-action-btn.delete {
    color: var(--text-muted);
}
.rev-action-btn.delete:hover {
    background: rgba(255,255,255,0.05);
    color: #FF1744;
}

.rev-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.rev-empty svg {
    opacity: 0.3;
    margin-bottom: 12px;
}

/* ---- AI Boss Panel ---- */
.ai-boss-panel {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.08), rgba(115, 103, 240, 0.08));
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 12px;
    margin: 16px 24px;
    overflow: hidden;
}

.boss-panel-header {
    background: rgba(88, 101, 242, 0.1);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.boss-panel-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #a78bfa;
}

.boss-panel-body {
    padding: 16px 20px;
}

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

.boss-panel-body textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px 14px;
    color: white;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 12px;
}

.boss-panel-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.boss-status-msg {
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.boss-status-msg.success { color: #00C853; }
.boss-status-msg.error { color: #FF1744; }

/* ---- Per-Review Feedback ---- */
.rev-feedback-loop {
    margin-top: 10px;
    margin-left: 46px;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px dashed rgba(255,255,255,0.1);
}

.feedback-input-container {
    display: flex;
    gap: 8px;
}

.feedback-input-container input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--text-normal);
    font-size: 12px;
    padding: 4px 0;
}

.feedback-input-container input:focus {
    outline: none;
    border-color: #5865f2;
}

.btn-feedback-send {
    background: transparent;
    border: none;
    color: #5865f2;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-feedback-send:hover {
    background: rgba(88,101,242,0.1);
}

.prev-feedback-msg {
    font-size: 11px;
    color: #00C853;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---- Permissions Grid ---- */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    margin-top: 10px;
}

.permissions-grid label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.03);
    font-size: 13px;
    color: var(--text-normal);
}

.permissions-grid label:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.permissions-grid input[type="checkbox"] {
    accent-color: #8b5cf6;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ==========================================
   ADMIN MOBILE RESPONSIVENESS (CONSOLIDATED)
   ========================================== */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-header-inner {
        padding: 15px;
        height: auto;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-actions {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }
    
    .admin-main { padding: 10px 0; }
    .admin-container { padding: 0 10px; }
    
    .admin-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding: 10px 4px;
        margin-bottom: 20px;
        background: rgba(0,0,0,0.2);
        border-radius: 12px;
    }
    .admin-tabs::-webkit-scrollbar { display: none; }
    
    .admin-tab {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 8px 16px;
        border-radius: 8px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-header div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input-v { width: 100% !important; }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .games-table {
        min-width: 600px; /* Force scroll instead of squishing */
    }

    .modal-box {
        width: 95% !important;
        max-height: 90vh;
        overflow-y: auto;
    }
}
