/* ==========================================================================
   DigiLiner DOS Games Archive - Classic MS-DOS CRT Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&family=Inter:wght@400;600;700;800&display=swap');

:root {
    --dos-bg: #0c1017;
    --dos-panel: #161e2e;
    --dos-panel-border: #2e3d56;
    --dos-blue: #0000aa;
    --dos-cyan: #00ffff;
    --dos-green: #33ff33;
    --dos-amber: #ffaa00;
    --dos-red: #ff3333;
    --dos-white: #f1f5f9;
    --dos-muted: #94a3b8;
    --dos-accent: #00dd88;
    --font-dos: 'Share Tech Mono', monospace;
    --font-pixel: 'VT323', monospace;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    background-color: var(--dos-bg);
    color: var(--dos-white);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* CRT Scanline Effect */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 9999;
    background-size: 100% 3px, 6px 100%;
    pointer-events: none;
    opacity: 0.6;
}

.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Navigation */
.dos-navbar {
    background: #000088;
    border-bottom: 3px solid #5555ff;
    padding: 12px 0;
    font-family: var(--font-dos);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.dos-navbar .nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.dos-brand {
    font-family: var(--font-pixel);
    font-size: 2.2rem;
    color: var(--dos-cyan);
    text-decoration: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 2px 2px 0 #000;
}

.dos-nav-links {
    display: flex;
    gap: 18px;
    align-items: center;
    list-style: none;
}

.dos-nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    padding: 6px 14px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.dos-nav-links a:hover, .dos-nav-links a.active {
    background: #5555ff;
    border-color: #ffffff;
    color: #ffff55;
    box-shadow: 2px 2px 0 #000;
}

/* Hero Header */
.dos-hero {
    background: linear-gradient(180deg, #111827 0%, #0c1017 100%);
    border-bottom: 2px solid var(--dos-panel-border);
    padding: 36px 0 28px;
    text-align: center;
}

.dos-title {
    font-family: var(--font-pixel);
    font-size: 3.4rem;
    color: var(--dos-green);
    text-shadow: 3px 3px 0 #000, 0 0 10px rgba(51, 255, 51, 0.4);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.dos-prompt {
    font-family: var(--font-dos);
    color: var(--dos-amber);
    font-size: 1.2rem;
    margin-bottom: 16px;
    display: inline-block;
    background: #000;
    padding: 6px 16px;
    border: 1px solid var(--dos-amber);
    border-radius: 4px;
}

.dos-desc {
    max-width: 800px;
    margin: 0 auto;
    color: var(--dos-muted);
    font-size: 1.05rem;
}

/* Ad Placement Slots */
.ad-slot-container {
    margin: 24px auto;
    text-align: center;
    display: flex;
    justify-content: center;
}

.ad-slot {
    background: #111622;
    border: 1px dashed #374151;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 0.82rem;
    font-family: var(--font-dos);
    overflow: hidden;
}

.ad-leaderboard {
    width: 100%;
    max-width: 970px;
    min-height: 90px;
    padding: 10px;
}

.ad-card-native {
    grid-column: span 1;
    min-height: 360px;
    background: #131b2a !important;
    border: 2px dashed #4b5563 !important;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ad-modal-slot {
    width: 100%;
    min-height: 70px;
    margin-bottom: 18px;
    background: #0c1017;
}

/* Filter Controls Bar */
.controls-bar {
    background: var(--dos-panel);
    border: 2px solid var(--dos-panel-border);
    border-radius: 10px;
    padding: 20px;
    margin: 28px 0;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}

.search-box-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.dos-input {
    width: 100%;
    background: #000;
    border: 2px solid var(--dos-green);
    color: var(--dos-green);
    font-family: var(--font-dos);
    font-size: 1.2rem;
    padding: 12px 18px;
    border-radius: 6px;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
    transition: all 0.2s;
}

.dos-input:focus {
    border-color: var(--dos-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.dos-input::placeholder {
    color: #2e5a3c;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pill-btn {
    background: #0c1017;
    border: 1px solid var(--dos-panel-border);
    color: var(--dos-muted);
    font-family: var(--font-dos);
    font-size: 0.92rem;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.pill-btn:hover {
    border-color: var(--dos-cyan);
    color: #fff;
}

.pill-btn.active {
    background: var(--dos-blue);
    border-color: var(--dos-cyan);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.game-card {
    background: var(--dos-panel);
    border: 2px solid var(--dos-panel-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--dos-green);
    box-shadow: 0 8px 24px rgba(51, 255, 51, 0.15);
}

.card-header {
    background: #090d14;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--dos-panel-border);
    font-family: var(--font-dos);
    font-size: 0.85rem;
}

.badge-genre {
    color: var(--dos-cyan);
    font-weight: bold;
}

.badge-year {
    color: var(--dos-amber);
}

.card-thumb {
    height: 160px;
    background: #000;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: pixelated;
    transition: transform 0.3s;
}

.game-card:hover .card-thumb img {
    transform: scale(1.05);
}

.card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    cursor: pointer;
}

.game-title:hover {
    color: var(--dos-green);
}

.game-dev {
    font-size: 0.88rem;
    color: var(--dos-muted);
    margin-bottom: 12px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #1f2937;
    font-family: var(--font-dos);
    font-size: 0.85rem;
}

.stats-count {
    color: var(--dos-muted);
    display: flex;
    gap: 8px;
}

.btn-download {
    background: var(--dos-green);
    color: #000;
    font-family: var(--font-dos);
    font-weight: bold;
    font-size: 0.95rem;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid #000;
    box-shadow: 2px 2px 0 #000;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-download:hover {
    background: #55ff55;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #000;
}

/* Modal Popup */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--dos-panel);
    border: 3px solid var(--dos-green);
    border-radius: 12px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    box-shadow: 0 0 30px rgba(51, 255, 51, 0.2);
}

.modal-close {
    position: absolute;
    top: 16px; right: 18px;
    background: #000;
    color: var(--dos-red);
    border: 1px solid var(--dos-red);
    font-family: var(--font-pixel);
    font-size: 1.8rem;
    width: 36px; height: 36px;
    line-height: 30px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
}

/* Footer */
.dos-footer {
    background: #080c14;
    border-top: 2px solid var(--dos-panel-border);
    padding: 32px 0;
    text-align: center;
    font-family: var(--font-dos);
    color: var(--dos-muted);
}

@media (max-width: 768px) {
    .dos-title { font-size: 2.4rem; }
    .games-grid { grid-template-columns: 1fr; }
}
