/* ── SmokinGames Core Design System ───────────────────────────── */

:root {
    --bg-color: #0d0e15;
    --panel-bg: rgba(25, 27, 40, 0.65);
    --panel-border: rgba(255, 255, 255, 0.08);
    --accent-primary: #ff3366;
    --accent-secondary: #7e57c2;
    --text-primary: #f0f0f5;
    --text-muted: #8b8d99;
    --success: #00e676;
    --danger: #ff3b3b;
    --glass-blur: blur(16px);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Auth Layout for centered login/register cards */
.auth-layout {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ambient blobs */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(126, 87, 194, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(255, 51, 102, 0.1) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
}

/* ── Components ─────────────────────────────────────────────── */

.glass-card, .glass-panel {
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.glass-card {
    max-width: 420px;
}

h1, h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.center-text {
    text-align: center;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.av-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.av-input:focus {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(126, 87, 194, 0.15);
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    text-decoration: none;
    gap: 0.6rem;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    filter: brightness(1.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 0, 212, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.btn-small {
    padding: 0.5rem 1.15rem;
    font-size: 0.75rem;
    border-radius: 7px;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #000 !important;
    border: none !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border: none !important;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-danger:hover {
    background: #ef4444 !important;
    color: white !important;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
    backdrop-filter: blur(8px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: var(--accent-primary) !important;
}

.footer-link {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-link a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-link a:hover {
    color: white;
}

.status-box {
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    font-weight: 500;
}

.status-box.error {
    background: rgba(255, 59, 59, 0.1);
    border: 1px solid rgba(255, 59, 59, 0.2);
    color: #ff9999;
}

.status-box.success {
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.2);
    color: #99ffcc;
}

/* ── Tabs ───────────────────────────────────────────────────── */

.tabs-header {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--accent-primary);
    border-color: transparent;
    color: white;
}

/* ── Dashboard Layout Utilities ────────────────────────────── */

.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.flex-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--panel-border) !important;
    color: var(--text-primary) !important;
    width: auto !important;
}

.btn-warning {
    background: var(--warning) !important;
    color: #000 !important;
    width: auto !important;
}

.btn-danger {
    background: var(--danger) !important;
    color: white !important;
    width: auto !important;
}

.logout-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
}

@media (max-width: 768px) {
    .grid-stats {
        grid-template-columns: 1fr;
    }
    
    .logout-btn {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 2rem;
    }
}

/* ── Dashboard Restoration Components ───────────────────────── */

.game-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--panel-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.game-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.game-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.game-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-published {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-private {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-running {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.status-stopped {
    background: rgba(255, 255, 255, 0.04);
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-checking {
    background: transparent;
    color: #475569;
    border: none;
    font-size: 0.7rem;
    opacity: 0.7;
}

.game-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success { background: var(--success); color: white; }
.badge-warning { background: var(--warning); color: #000; }

/* Modal Restoration */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form Group */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 4px rgba(255, 0, 212, 0.1);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Progress and Feedback */
.progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    width: 0%;
    transition: width 0.4s ease;
}

.status-text {
    font-size: 0.815rem;
    color: var(--text-muted);
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--panel-border);
    border-radius: 20px;
}

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