/* DOS Games - Retro Game Theme */
/* Loads ONLY on dos_game pages */

.dos-games-archive,
.dos-game-single,
.tax-game_category {
    --dos-bg: #0a0e14;
    --dos-panel: #111827;
    --dos-border: #1f2937;
    --dos-text: #d1fae5;
    --dos-muted: #64748b;
    --dos-neon: #00ff41;
    --dos-neon-dim: rgba(0, 255, 65, 0.25);
    --dos-blue: #00d4ff;
    --dos-orange: #ff6b35;
    --dos-font: 'VT323', 'Courier New', monospace;
}

/* Retro overlay for game pages only */
.dos-games-archive {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(0, 255, 65, 0.08) 0%, transparent 50%),
        var(--dos-bg);
    min-height: 60vh;
    padding: 30px 24px 60px;
    border-radius: 0;
    color: var(--dos-text);
}

/* Header */
.dos-games-header {
    text-align: center;
    padding: 50px 20px;
    border: 2px solid var(--dos-neon);
    border-radius: 8px;
    margin-bottom: 30px;
    background: var(--dos-panel);
    box-shadow: 0 0 30px var(--dos-neon-dim), inset 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.dos-games-header::before {
    content: '▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚';
    display: block;
    color: var(--dos-neon-dim);
    font-family: var(--dos-font);
    font-size: 14px;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.dos-games-title {
    font-family: var(--dos-font);
    font-size: 44px;
    color: var(--dos-neon);
    text-shadow: 0 0 10px var(--dos-neon), 0 0 20px var(--dos-neon-dim);
    margin: 0 0 10px;
    letter-spacing: 1px;
}

.dos-games-subtitle {
    font-family: var(--dos-font);
    font-size: 20px;
    color: var(--dos-muted);
    margin: 0;
}

/* Scanline effect */
.dos-games-archive::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* Filters */
.dos-games-controls { margin-bottom: 30px; }
.dos-games-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: var(--dos-panel);
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid var(--dos-border);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    font-family: var(--dos-font);
    font-size: 16px;
    color: var(--dos-neon);
    letter-spacing: 1px;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    background: #0d1320;
    border: 1px solid var(--dos-border);
    border-radius: 4px;
    color: var(--dos-text);
    font-family: var(--dos-font);
    font-size: 17px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--dos-neon);
    box-shadow: 0 0 8px var(--dos-neon-dim);
}

.filter-btn {
    padding: 8px 22px;
    background: var(--dos-neon);
    color: #04120a;
    border: none;
    border-radius: 4px;
    font-family: var(--dos-font);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    box-shadow: 0 0 15px var(--dos-neon);
    transform: translateY(-1px);
}

/* Game Grid */
.dos-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Game Card - CRT style */
.dos-game-card {
    position: relative;
    background: var(--dos-panel);
    border: 1px solid var(--dos-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.dos-game-card:hover {
    border-color: var(--dos-neon);
    box-shadow: 0 0 20px var(--dos-neon-dim);
    transform: translateY(-3px);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-screenshot {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #000;
    border-bottom: 1px solid var(--dos-border);
}

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

.dos-game-card:hover .card-screenshot img { transform: scale(1.06); }

.no-screenshot-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dos-muted);
    font-family: var(--dos-font);
    font-size: 16px;
}

.card-info { padding: 14px 16px; }

.card-title {
    font-family: var(--dos-font);
    font-size: 21px;
    color: var(--dos-text);
    margin: 0 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.category-badge {
    font-family: var(--dos-font);
    font-size: 15px;
    padding: 2px 8px;
    background: rgba(0, 212, 255, 0.15);
    color: var(--dos-blue);
    border-radius: 3px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.card-year {
    font-family: var(--dos-font);
    font-size: 15px;
    color: var(--dos-muted);
}

.license-badge {
    font-family: var(--dos-font);
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 3px;
    color: #04120a;
    font-weight: bold;
}

.license-badge.small { font-size: 13px; padding: 1px 6px; }

.card-download {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: var(--dos-neon);
    color: #04120a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.2s;
    opacity: 0;
    box-shadow: 0 0 10px var(--dos-neon-dim);
}

.dos-game-card:hover .card-download { opacity: 1; }
.card-download:hover { transform: scale(1.15); box-shadow: 0 0 20px var(--dos-neon); }

/* Single Game Page */
.dos-game-single {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(0, 255, 65, 0.08) 0%, transparent 50%),
        var(--dos-bg);
    min-height: 60vh;
    padding: 30px 24px 60px;
    color: var(--dos-text);
}

.dos-game-single-inner { max-width: 950px; margin: 0 auto; }

.back-link {
    display: inline-block;
    font-family: var(--dos-font);
    font-size: 18px;
    color: var(--dos-neon);
    margin-bottom: 20px;
    text-decoration: none;
}

.back-link:hover { text-shadow: 0 0 8px var(--dos-neon); text-decoration: underline; }

.dos-game-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    background: var(--dos-panel);
    border: 1px solid var(--dos-border);
    border-radius: 8px;
    padding: 24px;
}

.dos-game-screenshot {
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--dos-border);
}

.dos-game-image { width: 100%; height: auto; display: block; image-rendering: pixelated; }

.no-screenshot {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dos-muted);
    font-family: var(--dos-font);
    font-size: 18px;
}

.dos-game-title {
    font-family: var(--dos-font);
    font-size: 34px;
    color: var(--dos-neon);
    text-shadow: 0 0 10px var(--dos-neon);
    margin: 0 0 10px;
}

.dos-game-also-known {
    font-family: var(--dos-font);
    font-size: 17px;
    color: var(--dos-muted);
    margin: 0 0 15px;
    font-style: italic;
}

.dos-game-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.dos-game-table th,
.dos-game-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--dos-border);
    font-family: var(--dos-font);
    font-size: 18px;
}

.dos-game-table th { color: var(--dos-neon); width: 40%; font-weight: normal; }
.dos-game-table td { color: var(--dos-text); }
.dos-game-table td a { color: var(--dos-blue); text-decoration: none; }
.dos-game-table td a:hover { text-decoration: underline; }

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: var(--dos-neon);
    color: #04120a;
    border-radius: 4px;
    font-family: var(--dos-font);
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 0 15px var(--dos-neon-dim);
}

.download-btn:hover {
    box-shadow: 0 0 25px var(--dos-neon);
    transform: translateY(-2px);
    color: #04120a;
}

.download-btn.disabled {
    background: #374151;
    color: var(--dos-muted);
    cursor: not-allowed;
    box-shadow: none;
}

/* Description */
.dos-game-description {
    background: var(--dos-panel);
    border: 1px solid var(--dos-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
}

.dos-game-description h2 {
    font-family: var(--dos-font);
    font-size: 24px;
    color: var(--dos-neon);
    margin: 0 0 12px;
}

.dos-game-description p {
    font-family: var(--dos-font);
    font-size: 19px;
    color: var(--dos-text);
    line-height: 1.7;
}

/* Related Games */
.dos-game-related { margin-bottom: 30px; }
.dos-game-related h2 {
    font-family: var(--dos-font);
    font-size: 24px;
    color: var(--dos-neon);
    margin: 0 0 16px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Pagination */
.dos-games-pagination { text-align: center; margin: 30px 0; }
.dos-games-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    background: var(--dos-panel);
    color: var(--dos-text);
    border: 1px solid var(--dos-border);
    border-radius: 4px;
    font-family: var(--dos-font);
    font-size: 17px;
    transition: all 0.2s;
}
.dos-games-pagination .page-numbers:hover,
.dos-games-pagination .page-numbers.current {
    background: var(--dos-neon);
    color: #04120a;
    border-color: var(--dos-neon);
    box-shadow: 0 0 12px var(--dos-neon-dim);
}

.no-games {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-family: var(--dos-font);
    font-size: 20px;
    color: var(--dos-muted);
}

/* Ensure header/footer stay modern, game area retro */
.dos-games-archive .site-container,
.dos-game-single .site-container {
    max-width: none;
    padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .dos-games-filters { flex-direction: column; }
    .dos-game-detail { grid-template-columns: 1fr; }
    .dos-games-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .dos-games-title { font-size: 34px; }
}
@media (max-width: 480px) {
    .dos-games-grid { grid-template-columns: 1fr; }
    .card-download { opacity: 1; }
}
