* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

:root {
    --main-bg:   #12181b; 
    --card-bg:   rgba(84, 110, 122, 0.85); 
    --backNav:   #18323e;
    --border:    #78909c; 
    --white:     #eceff1; 
    --text:      #b0bec5; 
    --blue:      #649cb7; 
    --blue-dark: #455a64; 
    --hover:     #263238; 
    --colorBrand: #b0bec5;
    --shadow:    0 0 25px rgba(100, 156, 183, 0.4);
    --blend:     overlay; 
}

html {
    font-size: 67.5%;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    background-image: url(pic/light\ theme.jfif);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}

.theme-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--white);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.theme-btn:hover {
    transform: translateY(-3px);
    border-color: var(--blue);
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 2rem .5rem;
    position: fixed;
    left: 0;
    top: 0;
    width: 150px;
    height: 100vh;
    z-index: 100;
    background: var(--backNav);
    backdrop-filter: blur(20px);
}

.nav-brand {margin-bottom: 3rem; font-size: 1.5rem; font-weight: bold; color: var(--colorBrand);}
.nav-brand span { opacity: 0.5; }
.nav-links{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: auto;
}
.nav-links a {
    color: var(--text);
    text-decoration: none;
    margin: 0 ;
    font-size: 1.2rem;
    transition: 0.3s;
}
.nav-links a:hover { color: var(--blue); }

.btn-login {
    margin-top: 2rem;
    background: white;
    color: black;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.4s;
    cursor: pointer;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

main {
    flex: 1;
}
.back {
    padding-top: 7rem;
    background-color: rgba(100, 156, 183, 0.3);
    backdrop-filter: blur(4rem);
    min-height: 30vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: black;
    font-weight: bold;
    text-transform: uppercase;
}
.back h1 {
    margin-bottom: 1rem;
    max-width: 70rem;
    text-align: center;
}
.back-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    margin-bottom: 2rem;
}
.back button a {
    color: white;
    text-decoration: none;
}
.back button {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    background-color: #649cb7;
    padding: 0.7rem;
    width: 12rem;
    border-radius: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease
}
.back button:hover {
    transform: scale(1.01);
    border: none;
    box-shadow: 0 0 1rem #649cb7;
}
.container {
    width: 80%;
    max-width: 120rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}
h2 {
    color: black;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-left: 0.2rem;
    text-transform: uppercase;
}
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    padding: 2.4rem;
    border-radius: 1.5rem;
}
.card {
    background-color: #546E7A;
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: none;
}
.card:hover {
    transform: translateX(-1rem);
    box-shadow: 0 0 4rem rgba(154, 196, 215, 0.7);
}
.card img {
    width: 100%;
    height: 30rem;
    object-fit: cover;
    border-radius: 1.5rem;
}
.card h3 {
    color: rgb(212, 206, 206);
    margin: 1.5rem 0 1rem;
    font-weight: bold;
    font-size: 1.5rem;
}
.card p {
    color: white;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.hid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 1.5rem;
}
.hid button {
    background-color: #455a64;
    color: white;
    padding: 0.7rem;
    margin-bottom: 2.5rem;
    border-radius: 0.8rem;
    border: none;
    width: 12rem;
    width: 80%;
    cursor: pointer;
    transition: all 0.4s;
}
.hid button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 2rem rgba(144, 185, 208, 0.39);
}
.v {
    display: block;
    margin: 2rem;
    padding: 1rem;
    border-radius: 1rem;
    border: 0.3rem solid #649cb7;
    width: 15rem;
    background-color: transparent;
    color: #649cb7;
    font-weight: bold;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}
.v:hover {
    background: #649cb7;
    color: white;
    border: none;
    box-shadow: 0 0 1rem #546E7A;
}

footer {
    font-size: 1.3rem;
    background-color: #455a64;
    border-top: 1px solid var(--border);
    padding: 3rem;
    margin-top: 4rem;
    margin-left: 150px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.footer-box h3 {
    color: var(--blue);
    margin-bottom: 15px;
    border: none;
    padding: 0;
}

.footer-box p,
.footer-box a {
    color: var(--text);
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    transition: 0.3s;
}

.footer-box a:hover {
    color: var(--blue);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.social-links a {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 1rem;
    transition: 0.3s;
}

.social-links a:hover {
    color: white;
    border-color: var(--blue);
    background: rgba(56, 189, 248, 0.15);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    margin-top: 35px;
    color: var(--text);
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

@media screen and (max-width: 768px) {
    html {
        font-size: 60%;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        text-align: center;
    }

    .back {
        padding-top: 12rem;
    }
    .back h1 {
        font-size: 2.5rem;
        padding: 0 2rem;
    }

    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    html {
        font-size: 55%;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        text-align: center;
    }


    .back {
        padding-top: 10rem;
        min-height: 50vh;
    }

    .back h1 {
        font-size: 2.2rem;
        line-height: 1.4;
    }

    .back-links {
        flex-direction: column; 
        width: 100%;
        align-items: center;
    }

    .back button {
        width: 80%; 
        padding: 1.2rem;
    }

    .game-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 1rem;
    }

    .card {
        max-width: 100%;
    }

    .card img {
        height: 20rem;
    }

    .hid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .hid button {
        width: 100%;
    }

    .v {
        width: 90%;
        margin: 2rem auto;
    }

    footer p {
        font-size: 1.2rem;
    }
}