/* ==========================================================================
   DigiLiner Amiga Games Archive - Commodore Workbench Retro Theme
   ========================================================================== */

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

:root {
    --amiga-blue: #0055aa;
    --amiga-dark-blue: #003366;
    --amiga-orange: #ff8800;
    --amiga-white: #ffffff;
    --amiga-gray: #a0a0a0;
    --amiga-light-gray: #dcdcdc;
    --amiga-dark: #121620;
    --amiga-panel: #1a2234;
    --amiga-border: #2d3b58;
    --font-amiga: 'Share Tech Mono', monospace;
    --font-pixel: 'Press Start 2P', cursive;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    background-color: var(--amiga-dark);
    color: #e2e8f0;
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Workbench Top Bar */
.amiga-topbar {
    background: #0055aa;
    border-bottom: 3px solid #000;
    border-top: 2px solid #fff;
    padding: 10px 0;
    font-family: var(--font-amiga);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

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

.amiga-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 2px 2px 0 #000;
}

.boing-ball {
    width: 28px; height: 28px;
    background: radial-gradient(circle at 35% 35%, #fff 15%, #ff0000 45%, #880000 85%);
    border-radius: 50%;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
    display: inline-block;
}

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

.amiga-nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.98rem;
    padding: 6px 14px;
    background: #003366;
    border: 2px solid #000;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    box-shadow: 2px 2px 0 #000;
    transition: all 0.15s;
}

.amiga-nav-links a:hover, .amiga-nav-links a.active {
    background: #ff8800;
    color: #000;
}

/* Hero Header */
.amiga-hero {
    background: #0055aa;
    border: 4px solid #000;
    border-top: 3px solid #fff;
    border-left: 3px solid #fff;
    border-radius: 12px;
    margin: 28px auto 20px;
    padding: 32px;
    box-shadow: 6px 6px 0 rgba(0,0,0,0.6);
    text-align: center;
    color: #fff;
}

.amiga-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--amiga-orange);
    text-shadow: 3px 3px 0 #000;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.amiga-hero p {
    font-size: 1.15rem;
    max-width: 860px;
    margin: 0 auto;
    text-shadow: 1px 1px 0 #000;
}

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

.ad-slot {
    background: #111a2c;
    border: 1px dashed #3b82f6;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    font-size: 0.85rem;
    font-family: var(--font-amiga);
    overflow: hidden;
}

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

.ad-card-native {
    grid-column: span 1;
    min-height: 380px;
    background: #111a2c !important;
    border: 2px dashed #ff8800 !important;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

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

/* Controls Bar */
.controls-bar {
    background: #003366;
    border: 3px solid #000;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-radius: 10px;
    padding: 20px;
    margin: 24px 0;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}

.amiga-input {
    width: 100%;
    background: #ffffff;
    border: 3px solid #000;
    color: #000;
    font-family: var(--font-amiga);
    font-size: 1.2rem;
    font-weight: bold;
    padding: 12px 18px;
    border-radius: 4px;
    outline: none;
    box-shadow: inset 2px 2px 0 #888;
    margin-bottom: 14px;
}

.amiga-input:focus {
    border-color: #ff8800;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
}

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

.pill-btn {
    background: #dcdcdc;
    border: 2px solid #000;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    color: #000;
    font-family: var(--font-amiga);
    font-size: 0.92rem;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 2px 2px 0 #000;
    transition: all 0.15s;
}

.pill-btn:hover {
    background: #fff;
}

.pill-btn.active {
    background: #ff8800;
    color: #000;
    box-shadow: 3px 3px 0 #000;
}

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

.game-card {
    background: #dcdcdc;
    border: 3px solid #000;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-radius: 6px;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #000;
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 7px 7px 0 rgba(0,0,0,0.8);
}

.card-header {
    background: #0055aa;
    color: #fff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
    font-family: var(--font-amiga);
    font-size: 0.95rem;
    font-weight: bold;
}

.badge-genre {
    color: #fff;
}

.badge-year {
    color: var(--amiga-orange);
}

.card-thumb {
    height: 165px;
    background: #000;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border-bottom: 2px solid #000;
}

.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.2rem;
    font-weight: 800;
    color: #003366;
    margin-bottom: 6px;
    cursor: pointer;
}

.game-title:hover {
    color: #ff8800;
}

.game-dev {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 12px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px dashed #a0a0a0;
    font-family: var(--font-amiga);
    font-size: 0.9rem;
}

.stats-count {
    color: #444;
    display: flex;
    gap: 8px;
    font-weight: bold;
}

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

.btn-download:hover {
    background: #ffa733;
    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: #dcdcdc;
    border: 4px solid #000;
    border-top: 3px solid #fff;
    border-left: 3px solid #fff;
    border-radius: 10px;
    max-width: 760px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.8);
    color: #000;
}

.modal-close {
    position: absolute;
    top: 14px; right: 16px;
    background: #000;
    color: #ff3333;
    border: 2px solid #ff3333;
    font-size: 1.8rem;
    width: 36px; height: 36px;
    line-height: 30px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

/* Footer */
.amiga-footer {
    background: #003366;
    border-top: 3px solid #000;
    padding: 32px 0;
    text-align: center;
    font-family: var(--font-amiga);
    color: #cbd5e1;
}

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