/* ================== GAMES HERO ================== */
.games-hero {
    text-align: center;
    padding: 80px 20px 30px;
    animation: fadeIn 1.2s ease;
    position: relative;
    z-index: 1;
}

.games-hero h1 {
    font-size: 52px;
    color: red;
    text-shadow: 0 0 20px red;
    margin-bottom: 12px;
}

.games-hero p {
    font-size: 18px;
    opacity: 0.75;
}

/* ================== CONTROLS ================== */
.games-controls {
    max-width: 1100px;
    margin: 0 auto 12px;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 420px;
}

.search-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    color: white;
    font-size: 15px;
    outline: none;
    transition: border-color 0.25s;
}

.search-wrapper input:focus {
    border-color: red;
    box-shadow: 0 0 8px rgba(255,0,0,0.3);
}

.search-wrapper input::placeholder {
    color: #555;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 16px;
    pointer-events: none;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid #333;
    color: #aaa;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: red;
    color: white;
}

.filter-btn.active {
    background: red;
    border-color: red;
    color: white;
    box-shadow: 0 0 12px rgba(255,0,0,0.5);
}

/* ================== GAME COUNT ================== */
.games-count {
    text-align: center;
    color: #555;
    font-size: 13px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

/* ================== GAMES GRID ================== */
.games-grid {
    max-width: 1100px;
    margin: 0 auto 80px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    position: relative;
    z-index: 1;
}

.loading-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: #555;
    padding: 60px 0;
    font-size: 18px;
}

/* ================== GAME CARD ================== */
.game-card {
    background: #0d0d0d;
    border: 1px solid #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: red;
    box-shadow: 0 0 20px rgba(255,0,0,0.25);
}

.game-card-img-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    background: #111;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s;
}

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

.game-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    font-weight: bold;
    color: #1a1a1a;
    background: #0d0d0d;
}

.game-card-decade {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(200,0,0,0.85);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.game-card-playable {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.75);
    color: #ff4444;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,68,68,0.4);
}

.game-card-body {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.game-card-title {
    font-size: 17px;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.game-card-meta {
    font-size: 13px;
    color: #cc0000;
    display: flex;
    gap: 6px;
    align-items: center;
}

.dot {
    opacity: 0.5;
}

.game-card-platform {
    font-size: 12px;
    color: #555;
    margin: 0;
}

.game-card-desc {
    font-size: 13px;
    color: #888;
    margin: 6px 0 0;
    line-height: 1.5;
}

/* ================== NO RESULTS ================== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #555;
    position: relative;
    z-index: 1;
}

.no-results p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* ================== ACTIVE NAV ================== */
.nav-links a.active {
    color: red;
}

.nav-links a.active::after {
    width: 100%;
}

/* ================== GAME DETAIL PAGE ================== */
.game-detail-wrapper {
    max-width: 1050px;
    margin: 0 auto 80px;
    padding: 30px 20px 0;
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-block;
    color: #888;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover {
    color: red;
}

.game-detail-card {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.game-detail-image-col {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-detail-img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #222;
    box-shadow: 0 0 30px rgba(255,0,0,0.1);
}

.game-meta {
    background: #0d0d0d;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 8px;
}

.meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meta-label {
    color: #555;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.meta-value {
    color: #ccc;
    text-align: right;
}

.game-detail-info-col {
    flex: 1;
    min-width: 0;
}

.game-decade-badge {
    display: inline-block;
    background: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(255,0,0,0.4);
}

.game-detail-title {
    font-size: 44px;
    color: white;
    text-shadow: 0 0 20px rgba(255,0,0,0.3);
    margin: 0 0 6px;
    line-height: 1.1;
}

.game-detail-year {
    color: #cc0000;
    font-size: 15px;
    margin: 0 0 30px;
}

.game-detail-desc {
    margin-bottom: 28px;
}

.game-detail-desc h2 {
    font-size: 18px;
    color: red;
    text-shadow: 0 0 8px rgba(255,0,0,0.4);
    margin-bottom: 10px;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 8px;
}

.game-detail-desc p {
    font-size: 15px;
    color: #ccc;
    line-height: 1.75;
}

/* ================== MOBILE ================== */
@media (max-width: 768px) {
    .games-hero h1 { font-size: 32px; }
    .games-controls { flex-direction: column; }
    .search-wrapper { max-width: 100%; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .game-card-img-wrap { height: 130px; }

    .game-detail-card {
        flex-direction: column;
        gap: 24px;
    }

    .game-detail-image-col {
        flex: none;
        width: 100%;
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }

    .game-detail-img {
        width: 140px;
        flex-shrink: 0;
    }

    .game-meta {
        flex: 1;
    }

    .game-detail-title { font-size: 28px; }
}

@media (max-width: 480px) {
    .games-grid { grid-template-columns: 1fr 1fr; }
    .game-detail-image-col { flex-direction: column; }
    .game-detail-img { width: 100%; }
}

/* ================== NAV EXTRAS ================== */
.nav-random {
    color: #aaa;
    font-size: 14px;
    letter-spacing: 0.3px;
}
.nav-random:hover { color: red !important; }

/* ================== PLAY / DOWNLOAD ACTIONS ================== */
.game-play-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
    margin-bottom: 4px;
}
.btn-play, .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-play {
    background: red;
    color: white;
    border: 1px solid red;
}
.btn-play:hover {
    background: #cc0000;
    box-shadow: 0 0 16px rgba(255,0,0,0.5);
}
.btn-download {
    background: transparent;
    color: #ccc;
    border: 1px solid #444;
}
.btn-download:hover {
    border-color: red;
    color: white;
    box-shadow: 0 0 10px rgba(255,0,0,0.2);
}

/* ================== SHARE BUTTON ================== */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1px solid #333;
    color: #aaa;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    margin-top: 16px;
}
.share-btn:hover {
    border-color: red;
    color: white;
    box-shadow: 0 0 10px rgba(255,0,0,0.2);
}

/* ================== RELATED GAMES ================== */
.related-section {
    max-width: 1050px;
    margin: 48px auto 80px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}
.related-section h2 {
    font-size: 22px;
    color: red;
    text-shadow: 0 0 8px rgba(255,0,0,0.4);
    margin-bottom: 20px;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 10px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

/* ================== GAME OF THE DAY (index.html) ================== */
.gotd-section {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}
.gotd-section h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #555;
    margin-bottom: 16px;
}
.gotd-card {
    display: flex;
    gap: 28px;
    background: #0d0d0d;
    border: 1px solid #cc0000;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    box-shadow: 0 0 30px rgba(200,0,0,0.15);
    transition: box-shadow 0.3s, border-color 0.3s;
}
.gotd-card:hover {
    box-shadow: 0 0 40px rgba(255,0,0,0.3);
    border-color: red;
}
.gotd-img {
    width: 160px;
    min-height: 160px;
    object-fit: cover;
    object-position: top;
    flex-shrink: 0;
}
.gotd-body {
    padding: 22px 22px 22px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}
.gotd-badge {
    display: inline-block;
    background: red;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    width: fit-content;
}
.gotd-title {
    font-size: 26px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 12px rgba(255,0,0,0.2);
    line-height: 1.15;
    margin: 0;
}
.gotd-meta {
    font-size: 13px;
    color: #cc0000;
}
.gotd-desc {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 600px) {
    .gotd-card { flex-direction: column; }
    .gotd-img { width: 100%; min-height: 140px; }
    .gotd-body { padding: 16px; }
}

/* ================== PLATFORM LIST PAGE ================== */
.platforms-hero {
    text-align: center;
    padding: 80px 20px 40px;
    position: relative;
    z-index: 1;
}
.platforms-hero h1 {
    font-size: 48px;
    color: red;
    text-shadow: 0 0 20px red;
    margin-bottom: 12px;
}
.platforms-hero p { font-size: 17px; opacity: 0.7; }
.platforms-grid {
    max-width: 1050px;
    margin: 0 auto 80px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    position: relative;
    z-index: 1;
}
.platform-card {
    background: #0d0d0d;
    border: 1px solid #1a1a1a;
    border-radius: 10px;
    padding: 24px;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.platform-card:hover {
    border-color: red;
    box-shadow: 0 0 20px rgba(255,0,0,0.2);
    transform: translateY(-3px);
}
.platform-card-name {
    font-size: 20px;
    font-weight: bold;
    color: white;
}
.platform-card-era {
    font-size: 12px;
    color: red;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.platform-card-count {
    font-size: 13px;
    color: #555;
}
.platform-card-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================== PLATFORM DETAIL PAGE ================== */
.platform-detail-wrapper {
    max-width: 1050px;
    margin: 0 auto;
    padding: 30px 20px 0;
    position: relative;
    z-index: 1;
}
.platform-detail-header {
    margin-bottom: 40px;
}
.platform-detail-header h1 {
    font-size: 42px;
    color: white;
    text-shadow: 0 0 20px rgba(255,0,0,0.3);
    margin: 0 0 6px;
}
.platform-detail-era {
    color: red;
    font-size: 14px;
    margin: 0 0 24px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.platform-detail-desc {
    font-size: 15px;
    color: #ccc;
    line-height: 1.75;
    margin-bottom: 16px;
    max-width: 780px;
}
.platform-games-heading {
    font-size: 22px;
    color: red;
    text-shadow: 0 0 8px rgba(255,0,0,0.4);
    margin: 40px 0 20px;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 10px;
}
