/* ArcadeROMs Manager - Modern Retro Dark Theme */
:root {
    --bg-main: #0d1117;
    --bg-card: #161b22;
    --bg-card-hover: #1f242c;
    --bg-sidebar: #090d13;
    --border-color: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-cyan: #00d2ff;
    --accent-purple: #9d4edd;
    --accent-neon-green: #39ff14;
    --accent-neon-pink: #ff007f;
    --accent-yellow: #ffd166;
    --accent-blue: #3a86ff;
    --card-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0d1117;
}
::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* Navbar */
.navbar-custom {
    background-color: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-glow {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}
.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
    border-radius: 6px;
    padding: 6px 12px !important;
}
.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
    border-bottom: 2px solid var(--accent-cyan);
    border-radius: 6px 6px 0 0;
}

/* Stat Cards */
.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: var(--card-shadow);
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 8px 20px rgba(0, 210, 255, 0.15);
}
.stat-icon {
    font-size: 2rem;
    opacity: 0.9;
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Game Card */
.game-card {
    position: relative;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.25s, border-color 0.25s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.2);
}
.game-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 135%; /* Standard 3:4 or cover ratio */
    background-color: #0d1117;
    overflow: hidden;
}
.game-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.game-card:hover .game-card-img {
    transform: scale(1.04);
}
.game-card-body {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.game-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.5rem;
}
.game-card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}
.game-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Badges by Platform */
.badge-arcade { background-color: rgba(255, 75, 110, 0.2); color: #ff4b6e; border: 1px solid rgba(255, 75, 110, 0.4); }
.badge-neogeo { background-color: rgba(255, 165, 0, 0.2); color: #ffa500; border: 1px solid rgba(255, 165, 0, 0.4); }
.badge-nintendo { background-color: rgba(230, 0, 18, 0.2); color: #ff5565; border: 1px solid rgba(230, 0, 18, 0.4); }
.badge-sega { background-color: rgba(0, 140, 255, 0.2); color: #38b6ff; border: 1px solid rgba(0, 140, 255, 0.4); }
.badge-sony { background-color: rgba(0, 55, 145, 0.3); color: #6bb0ff; border: 1px solid rgba(0, 55, 145, 0.5); }
.badge-atari { background-color: rgba(228, 0, 43, 0.2); color: #ff3b5c; border: 1px solid rgba(228, 0, 43, 0.4); }
.badge-pending { background-color: rgba(255, 193, 7, 0.2); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.4); }

/* Banner / Progress Bar */
.scanner-banner {
    background: linear-gradient(90deg, #161b22, #1c232f);
    border-bottom: 1px solid var(--accent-cyan);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.15);
}
.progress-retro {
    background-color: #0d1117;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.progress-bar-retro {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transition: width 0.3s ease;
}

/* Table Custom */
.table-custom {
    color: var(--text-primary);
    background-color: var(--bg-card);
    border-color: var(--border-color);
}
.table-custom thead th {
    background-color: #12161d;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table-custom td {
    vertical-align: middle;
    border-color: var(--border-color);
}

/* Forms & Inputs */
.form-control-dark, .form-select-dark {
    background-color: #0d1117;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
}
.form-control-dark:focus, .form-select-dark:focus {
    background-color: #0d1117;
    border-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(0, 210, 255, 0.2);
}

/* Modals */
.modal-content-dark {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
}
.modal-header-dark {
    border-bottom: 1px solid var(--border-color);
}
.modal-footer-dark {
    border-top: 1px solid var(--border-color);
}

/* Footer */
footer {
    margin-top: auto;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}
