/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --background: #FFFFFF;
    --border-color: #00A0C8;
    --box-color: #ECECEC;
    --button-color: #00A0C8;
    --content-max-width: 600px;
    --content-min-width: 360px;
    --font-family: 'Poppins', sans-serif;
    --game-color: #8200BF;
    --highlight: #224466;
    --price-color: #F1740E;
    --text-dark: #2A2A2A;
    --text-light: #FFFDDE;
    --title-color: #8200BF;
}

/* ============================================================
   RESET & BASE STYLES
   ============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text-dark);
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.4;
    padding-top: var(--header-height);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4 {
    line-height: 1.2;
    text-align: center;
}

h1 {
    font-size: 42px;
    font-weight: 100;
    letter-spacing: 2px;
    white-space: nowrap;
}

h2 {
    border-bottom: 2px solid var(--border-color);
    color: var(--title-color);
    display: block;
    font-size: 30px;
    font-weight: 300;
    letter-spacing: 0px;
    margin: 20px 0px;
    padding-bottom: 0px;
    text-align: left;
    text-transform: uppercase;
}

h3 {
    color: var(--highlight);
    font-size: 16px;
    font-weight: 700;
    margin: 12px 0px;
}

h4 {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    margin: 12px 0px;
}

small {
    color: var(--highlight);
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin: 12px 0px;
}

b {
    font-weight: 700;
}

p {
    margin-bottom: 6px;
}

p b,
li b {
    color: var(--highlight);
}

/* ============================================================
   LINKS & IMAGES
   ============================================================ */
a {
    color: var(--title-color);
    text-decoration: none;
}

img {
    height: auto;
    max-width: 100%;
}

/* ============================================================
   LAYOUT & STRUCTURE
   ============================================================ */
main {
    margin: 80px auto 20px;
    max-width: var(--content-max-width);
    min-width: var(--content-min-width);
    overflow: hidden;
    padding: 0 20px;
    text-align: center;
}

div {
    margin-bottom: 18px;
}

ul {
    margin-bottom: 18px;
    padding-left: 20px;
}

table {
    background-color: #f8fafd;
    border-collapse: collapse;
    border-spacing: 0;
    margin-right: auto;
    width: 100%;
}

tr {
    border-collapse: collapse;
    border-spacing: 0;
}

th,
td {
    border: 1px var(--highlight) solid;
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}

th {
    font-weight: 700;
    text-align: center;
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
form {
    background: var(--box-color);
    border: 1px #72787e solid;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

form label {
    display: block;
    margin: 5px auto;
}

form input,
form select {
    font-family: var(--font-family);
    font-size: 14px;
    max-width: 400px;
    padding: 3px 5px;
    width: 80vw;
}

input {
    display: block;
    margin: auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
button, .button {
    background-color: var(--button-color);
    border: none;
    border-radius: 5px;
    color: var(--text-light);
    cursor: pointer;
    display: inline-block;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    margin: 10px auto;
    padding: 6px 12px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
    align-items: center;
    background: url('img/header.png') repeat-x center;
    background-size: cover;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    display: flex;
    height: 80px;
    justify-content: center;
    left: 0;
    overflow: hidden;
    position: fixed;
    text-align: center;
    text-transform: uppercase;
    top: 0;
    width: 100%;
    z-index: 10000;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: linear-gradient(180deg, #555555 0%, #222222 100%);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 300;
    margin: 0px auto 0px auto;
    max-width: var(--content-max-width);
    min-width: var(--content-min-width);
    padding: 10px 20px;
    text-align: center;
}

footer p {
    margin: 0;
}

footer a {
    color: var(--text-light);
    transition: color 0.3s;
}

footer a:hover {
    color: var(--border-color);
}

footer .social-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0px;
}

footer .social-links a {
    display: flex;
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

footer .social-links a:hover {
    color: var(--border-color);
}

footer .icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* ============================================================
   SECTION
   ============================================================ */
section {
    text-align: center;
}

section p {
    padding-bottom: 8px;
    text-align: justify;
}

/* ============================================================
   COMPONENTS & UTILITIES
   ============================================================ */

/* Flags */
#flags {
    display: block;
    text-align: center;
}

#flags ul {
    align-items: center;
    display: inline-flex;
    gap: 20px;
    list-style: none;
    margin: 20px auto;
}

#flags li {
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    height: 30px;
    width: 60px;
}

/* Accept Checkbox */
#accept {
    align-items: left;
    display: flex;
    margin: auto;
    max-width: 400px;
    width: 80vw;
}

#accept input {
    transform: scale(1.5);
    width: 50px;
}

/* Barion */
#barion {
    margin-top: 50px;
}

/* Code Input */
#code {
    background: var(--text-light);
    border: 3px var(--border-color) solid;
    color: var(--text-dark);
    font-family: monospace;
    font-size: 50px;
    margin-bottom: 20px;
    padding: 5px;
    text-align: center;
    text-transform: uppercase;
    width: 300px;
}

/* Email Input */
#email {
    background: var(--text-light);
    border: 1px var(--border-color) solid;
    color: var(--text-dark);
    font-family: monospace;
    font-size: 15px;
    margin-bottom: 20px;
    padding: 5px;
    text-align: center;
    width: 300px;
}

/* Error Code */
#errorcode {
    color: red;
    font-size: 18px;
}

/* Form Title */
#form-title {
    color: var(--text-dark);
    font-size: 24px;
    margin: 20px 0px;
}

/* Voucher */
#voucher {
    background: var(--text-light);
    border: 3px var(--border-color) solid;
    color: var(--text-dark);
    font-family: monospace;
    font-size: 24px;
    margin-bottom: 20px;
    padding: 5px;
    text-align: center;
    text-transform: uppercase;
    width: 200px;
}

/* Game Comments */
#gamecomments {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    list-style: none;
    margin: 0;
    max-width: 100%;
    padding: 0;
}

#gamecomments li {
    background: var(--text-light);
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    padding: 10px;
    transition: background-color 0.3s ease;
}

.comment-author {
    color: var(--game-color);
    text-align: left;
    font-weight: 500;
}

.comment-text {
    text-align: left;
    font-weight: 300;
}

/* Game List */
#gamelist {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    list-style: none;
    margin: 30px 0px 50px 0px;
    padding: 0px;
}

#gamelist .gamebox {
    background: var(--box-color);
    background-position: top center;
    background-repeat: no-repeat;
    border: 1px var(--text-dark) solid;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    margin: 0px;
    padding: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#gamelist .gamebox:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

#gamelist .new {
    color: var(--price-color);
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 3px 30px;
    text-transform: uppercase;
}

#gamelist .overlay {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    color: var(--text-light);
    height: 60px;
    margin-top: 120px;
    overflow: hidden;
    padding: 5px;
    width: 100%;
}

#gamelist .gametitle {
    color: white;
    font-size: 21px;
    font-weight: 300;
    margin: 0px;
}

#gamelist .gamelocation {
    color: var(--text-light);
    font-size: 16px;
    font-weight: 500;
    margin: 0px;
}

#gamelist .gameprice,
#pricetext {
    color: var(--price-color);
    font-size: 24px;
    font-weight: 700;
    margin: 12px 0px;
}

#gamelist .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    list-style: none;
    margin: 0 auto 20px;
    padding: 0;
}

#gamelist .tags li {
    background: var(--highlight);
    border-radius: 9999px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 300;
    padding: 4px 8px;
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (min-width: 768px) {
    :root {
        --content-max-width: 820px;
        --content-min-width: 760px;
    }

    body {
        font-size: 18px;
    }

    main {
        margin: 160px auto 20px;
    }

    header {
        background: url('img/header.png') repeat-x center;
        color: rgba(255, 255, 255, 0.75);
        font-size: 200px;
        height: 160px;
    }

    h1 {
        font-size: 96px;
        font-weight: 100;
    }

    h2 {
        font-size: 36px;
    }

    h3 {
        font-size: 21px;
    }

    h4 {
        font-size: 18px;
    }

    button, .button {
        margin: 40px auto;
        font-size: 22px;
    }

    #gamelist,
    #gamecomments {
        grid-template-columns: repeat(2, 1fr);
    }

    footer .social-links {
        flex-direction: row;
        gap: 15px;
        justify-content: center;
    }
}