/* css/style.css */
/* --- RESET & BASIC SETUP --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tahoma', 'Verdana', sans-serif;
    background-color: #004080;
    color: #000;
    line-height: 1.4;
    font-size: 13px;
    overflow-x: hidden;
}

/* CRT EFFECT */
body::after {
    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.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: #0000FF;
}

a:hover {
    color: #FF0000;
    text-decoration: underline;
    cursor: pointer;
}

/* --- LAYOUT --- */
.wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: #FFF;
    border-left: 3px solid #000;
    border-right: 3px solid #000;
    min-height: 100vh;
    box-shadow: 10px 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

.header {
    background: #124191;
    color: white;
    padding: 10px;
    text-align: center;
    border-bottom: 4px solid #000;
}

.header h1 {
    font-size: 20px;
    text-transform: capitalize;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-shadow: 2px 2px 0px #000;
}

.marquee-container {
    background: #FFF;
    color: #000;
    border: 2px inset #CCC;
    padding: 2px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* --- NAVIGATION --- */
.nav-bar {
    background: #C0C0C0;
    border-top: 2px solid #FFF;
    border-bottom: 2px solid #808080;
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.nav-btn {
    background: #C0C0C0;
    border: 2px outset #FFF;
    padding: 4px 10px;
    font-family: 'Tahoma', sans-serif;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    color: #000;
    text-transform: uppercase;
}

.nav-btn:active,
.nav-btn.active {
    border: 2px inset #808080;
    background: #E0E0E0;
    color: #800000;
}

/* --- SEARCH & FILTERS --- */
.search-area {
    background: #EFEFEF;
    padding: 10px;
    text-align: center;
    border-bottom: 1px dashed #999;
}

.search-input {
    border: 2px inset #CCC;
    padding: 3px;
    font-family: 'Courier New', monospace;
    width: 70%;
}

.search-btn {
    border: 2px outset #FFF;
    background: #C0C0C0;
    font-weight: bold;
    cursor: pointer;
    padding: 3px 8px;
}

.filters {
    text-align: center;
    margin-bottom: 10px;
}

.filter-tag {
    display: inline-block;
    border: 1px solid #000;
    background: #FFF;
    padding: 2px 6px;
    margin: 2px;
    font-size: 11px;
    cursor: pointer;
}

.filter-tag.active {
    background: #000;
    color: #FFF;
}

/* --- GAME CARD --- */
.content {
    padding: 10px;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIklEQVQIW2NkQAKrVq36zwjjgzhhYWGMYAEYB8RmROaABADeOQ8CXl/xfgAAAABJRU5ErkJggg==');
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-card {
    background: #FFF;
    border: 2px solid #000;
    padding: 5px;
}

.game-header {
    background: #124191;
    color: white;
    padding: 2px 5px;
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.game-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.game-thumb {
    width: 120px;
    border: 2px inset #CCC;
    cursor: pointer;
    position: relative;
}

.game-thumb img {
    width: 100%;
    display: block;
}

.game-thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.game-thumb:hover .game-thumb-overlay {
    opacity: 1;
}

.game-info {
    flex: 1;
    min-width: 200px;
}

.platform-links {
    margin-top: 5px;
    border-top: 1px dotted #CCC;
    padding-top: 5px;
    font-size: 12px;
}

.platform-item {
    margin-bottom: 3px;
    background: #F0F0F0;
    padding: 2px;
    border: 1px solid #CCC;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-btn {
    background: #EEE;
    border: 1px outset #FFF;
    color: blue;
    padding: 1px 5px;
    font-size: 11px;
}

.download-btn:hover {
    background: #CCC;
    border-style: inset;
    color: red;
}

/* --- RATINGS (New Feature) --- */
.star-rating {
    color: #FFD700;
    font-size: 12px;
    margin-right: 5px;
}

/* --- TABS --- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --- FOOTER --- */
.footer {
    background: #EFEFEF;
    border-top: 2px solid #999;
    padding: 10px;
    text-align: center;
    font-size: 11px;
    margin-top: 20px;
}

.hit-counter {
    background: #000;
    color: red;
    font-family: 'Courier New', monospace;
    padding: 2px 5px;
    letter-spacing: 2px;
    border: 2px inset #555;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    border: 2px outset #FFF;
    background: #C0C0C0;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.5);
    font-family: 'Tahoma', sans-serif;
}

.modal-title-bar {
    background: #000080;
    color: white;
    padding: 3px 5px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.modal-close-btn {
    background: #C0C0C0;
    border: 1px outset #FFF;
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: black;
    font-weight: bold;
}

.modal-body {
    padding: 10px;
    background: #FFF;
    border: 2px inset #CCC;
}

.modal-body iframe {
    width: 100%;
    height: 200px;
    border: none;
    background: #000;
}

/* --- FORM STYLES (Submit Page) --- */
.form-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border: 2px inset #CCC;
    background: #E0E0E0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 5px;
    border: 2px inset #FFF;
    font-family: inherit;
}

.btn-submit {
    background: #124191;
    color: white;
    border: 2px outset #444;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-submit:active {
    border-style: inset;
}

@media (max-width: 600px) {
    .game-layout {
        flex-direction: column;
    }

    .game-thumb {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .modal {
        width: 95%;
    }
}