/* Portal Dashboard Styles v9.0.0 */
:root {
    --bg-dark: #0f172a;
    --panel-dark: #1e293b;
    --border: #334155;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
}

body {
    margin: 0; padding: 0;
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh; overflow: hidden;
}

#app {
    display: flex; flex-direction: column;
    height: 100vh;
}

header {
    height: 60px; background: var(--panel-dark);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px;
}

.logo { font-size: 20px; font-weight: bold; }
.logo span { color: var(--accent); }

main {
    flex: 1; display: flex; overflow-y: auto;
}

#sidebar {
    width: 240px; background: #020617;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden;
}

nav { padding: 20px 10px; flex: 1; }
.nav-item {
    width: 100%; text-align: left; background: transparent;
    border: none; color: var(--text-dim); padding: 12px 15px;
    border-radius: 8px; cursor: pointer; font-size: 14px;
    margin-bottom: 5px; transition: 0.2s;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; box-shadow: 0 0 15px var(--accent-glow); }

#system-stats {
    padding: 20px; border-top: 1px solid var(--border); font-size: 12px;
}
.status-ok { color: var(--success); font-weight: bold; }

#content-area {
    flex: 1; padding: 30px; overflow-y: auto;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 30px;
}

/* Game Card Styles */
.game-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.game-card {
    background: var(--panel-dark); border-radius: 12px;
    border: 1px solid var(--border); overflow: hidden;
    transition: 0.3s;
}
.game-card:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }

.game-card-header {
    height: 140px; background: #000; position: relative;
    display: flex; align-items: center; justify-content: center;
}
.game-card-header img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.status-badge {
    position: absolute; top: 10px; right: 10px;
    padding: 4px 10px; border-radius: 20px; font-size: 10px; font-weight: bold;
    text-transform: uppercase; background: var(--accent);
}
.status-badge.draft { background: #475569; }
.status-badge.testing { background: #b45309; }
.status-badge.audit_passed { background: #0e7490; }
.status-badge.production { background: #15803d; }
.status-badge.archived { background: #374151; }
.status-badge.test { background: #374151; color: #6b7280; }
.status-badge.development { background: #92400e; }
.status-badge.playable { background: var(--success); }
.status-badge.released { background: var(--success); }

.game-card-body { padding: 20px; }
.game-card-body h3 { margin: 0 0 10px 0; font-size: 18px; }
.game-meta { font-size: 12px; color: var(--text-dim); display: flex; gap: 15px; margin-bottom: 15px; }

.game-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

/* Buttons */
button.primary-btn {
    background: var(--accent); color: #fff; border: none;
    padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold;
}
button.secondary-btn {
    background: #334155; color: #fff; border: none;
    padding: 8px 15px; border-radius: 6px; cursor: pointer; font-size: 12px;
}
button.secondary-btn:hover { background: #475569; }

/* Wizards */
.wizard-container {
    max-width: 600px; margin: 0 auto; background: var(--panel-dark);
    padding: 40px; border-radius: 15px; border: 1px solid var(--border);
}
.wizard-step label { display: block; margin: 20px 0 8px 0; font-size: 14px; color: var(--text-dim); }
.wizard-step input, .wizard-step select {
    width: 100%; background: #0f172a; border: 1px solid var(--border);
    color: #fff; padding: 12px; border-radius: 6px; box-sizing: border-box;
}
.profile-selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wizard-actions { margin-top: 40px; text-align: right; }

/* ── Responsive Breakpoints ── */
@media (max-width: 1280px) {
    #sidebar { width: 200px; }
    #content-area { padding: 20px; }
    .game-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
}

@media (max-width: 1024px) {
    #sidebar { width: 180px; }
    #content-area { padding: 16px; }
    .game-grid { grid-template-columns: 1fr; }
    .game-actions { grid-template-columns: 1fr 1fr; }
    .wizard-container { max-width: 100%; padding: 20px; }
    .profile-selectors { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    body { overflow-y: auto; height: auto; }
    #app { height: auto; min-height: 100vh; }
    main { flex-direction: column; }
    #sidebar { width: 100%; max-height: 200px; flex-shrink: 0; }
    #content-area { padding: 12px; flex: auto; }
    header { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px; }
    .game-grid { grid-template-columns: 1fr; gap: 12px; }
    .game-card-header { height: 100px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .action-grid { grid-template-columns: 1fr 1fr; }
    button.primary-btn, button.secondary-btn { padding: 8px 12px; font-size: 12px; }
}
