/* ============================================
   Modern Minimalist Design - Game Portal
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

ul, ol {
    list-style: none !important;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   App Container & Layout
   ============================================ */

.app-container {
    width: 100%;
    min-height: 100vh;
}

#app {
    position: relative;
}

.main-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.content {
    padding: 40px 0 80px;
}

.content .main-section {
    margin-top: 0;
    margin-bottom: 0;
}

/* ============================================
   Header - Clean & Minimal
   ============================================ */

header.main {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header.main .main-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    padding-top: 0;
    padding-bottom: 0;
}

/* Logo */
header.main .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

header.main .logo svg {
    width: 180px;
    height: auto;
    margin: 0;
}

/* Navigation Trigger (Hamburger) */
header.main .menuHolder {
    position: relative;
}

header.main .menuHolder input[type="checkbox"] {
    position: absolute;
    width: 44px;
    height: 44px;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

header.main .menuHolder label[for="navigationTrigger"] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
}

header.main .menuHolder label[for="navigationTrigger"]:hover {
    background: #e2e8f0;
}

header.main .menuHolder label[for="navigationTrigger"] svg {
    width: 22px;
    height: 22px;
    fill: #475569;
    margin: 0;
}

header.main .menuHolder nav.main {
    position: fixed;
    top: 72px;
    left: 24px;
    right: 24px;
    bottom: 0;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
    padding: 20px;
    display: none;
    overflow-y: auto;
    max-height: calc(100vh - 72px - 20px);
    z-index: 99;
}

header.main .menuHolder nav.main ul {
    list-style: none;
}

header.main .menuHolder nav.main ul li {
    display: block;
    margin: 4px 0;
}

header.main .menuHolder nav.main ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.15s ease;
}

header.main .menuHolder nav.main ul li a:hover {
    background: #f1f5f9;
    color: #0f172a;
}

header.main .menuHolder nav.main ul li a img {
    width: 20px;
    height: 20px;
    margin: 0;
    vertical-align: middle;
}

header.main .menuHolder nav.main ul li a span {
    vertical-align: middle;
}

header.main .menuHolder input[type="checkbox"]:checked ~ nav.main {
    display: block;
}

/* Language Selector */
header.main .language-select {
    position: static;
    height: 40px;
    width: auto;
    overflow: visible;
}

header.main .language-select .value {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.5px;
}

header.main .language-select .value::before {
    display: none;
}

header.main .language-select select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ============================================
   Section Headers - Clean Typography
   ============================================ */

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.25rem;
    margin-bottom: 8px;
}

h2, .h1 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

h2 a, .h1 a, h2 img, .h1 img {
    color: inherit;
    text-decoration: none;
}

h2 a:hover, .h1 a:hover {
    opacity: 0.8;
}

h2 img, .h1 img {
    width: 24px;
    height: 24px;
}

/* ============================================
   Game Grid - Modern Card Design
   ============================================ */

ul.games {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin: 0;
}

ul.games li {
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

ul.games li a {
    display: block;
    text-decoration: none;
    color: inherit;
}

ul.games li .icon {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #ffffff;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

ul.games li .icon:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

ul.games li .icon img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

ul.games li .name-container {
    padding: 14px 8px;
    height: auto;
    justify-content: flex-start;
}

ul.games li .name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-align: left;
    line-height: 1.4;
}

/* ============================================
   Buttons - Clean & Modern
   ============================================ */

.btn, .btn-highlight, .btn-primary, .btn-neutral {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-highlight {
    background: #6366f1;
    color: #ffffff;
}

.btn-highlight:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.btn-primary {
    background: #1e293b;
    color: #ffffff;
}

.btn-primary:hover {
    background: #0f172a;
}

.btn-neutral {
    background: #f1f5f9;
    color: #334155;
}

.btn-neutral:hover {
    background: #e2e8f0;
}

.btn-container {
    margin: 40px 0 0;
    text-align: center;
}

/* ============================================
   Footer - Minimal & Clean
   ============================================ */

footer.main {
    margin-top: 60px;
    padding: 40px 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

footer.main .footer-content {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

footer.main .footer-content section.tags nav.main {
    background: none;
    float: none;
    width: 100%;
    min-height: auto;
    margin: 0;
    padding: 0;
}

footer.main .footer-content section.tags nav.main ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

footer.main .footer-content section.tags nav.main ul li {
    padding: 0;
}

footer.main .footer-content section.tags nav.main ul li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #475569;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    color: #ffffff;
    text-transform: none;
}

footer.main .footer-content section.tags nav.main ul li a:hover {
    background: #e2e8f0;
    color: #1e293b;
}

footer.main .footer-content section.tags nav.main ul li a img {
    width: 16px;
    height: 16px;
}

footer.main .copyright {
    margin-top: 30px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

footer.main .copyright a {
    color: #6366f1;
    text-decoration: none;
}

footer.main .copyright a:hover {
    text-decoration: underline;
}

/* ============================================
   Back To Top Button
   ============================================ */

.backToTop {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    position: fixed;
    bottom: 20px;
    right: 16px;
    z-index: 1000;
    overflow: hidden;
    display: table;
}

.backToTop:hover {
    background: #f8fafc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.backToTop svg {
    color: #475569;
    width: 18px;
    height: 18px;
    display: table-cell;
    vertical-align: middle;
    margin: 0 auto;
}

/* ============================================
   Loading Animation - Minimal
   ============================================ */

.AFSJx.dgmlwU {
    background: rgba(255, 255, 255, 0.9);
}

.AFSJx div {
    background: #6366f1;
}

/* ============================================
   Consent Box - Modern Style
   ============================================ */

.consent-box-holder {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.consent-box {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 32px;
    max-width: 440px;
    margin: 20px;
    text-align: center;
}

.consent-box-logo {
    display: inline-block;
    width: 60px;
    height: 24px;
    margin-bottom: 20px;
}

.consent-box-message {
    text-align: left;
    font-size: 14px;
    color: #475569;
    line-height: 1.7;
}

.consent-box-message strong {
    color: #1e293b;
    font-weight: 600;
}

.consent-box-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: #6366f1;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s ease;
}

.consent-box-button:hover {
    background: #4f46e5;
}

.consent-box-links {
    margin-top: 20px;
    font-size: 13px;
    color: #64748b;
}

.consent-box-links a {
    color: #6366f1;
    text-decoration: none;
}

.consent-box-links a:hover {
    text-decoration: underline;
}

/* ============================================
   Responsive Design
   ============================================ */

@media only screen and (max-width: 750px) {
    html {
        font-size: 15px;
    }

    .main-section {
        padding: 0 16px;
    }

    header.main .main-section {
        height: 64px;
    }

    header.main .logo svg {
        width: 140px;
    }

    .content {
        padding: 24px 0 60px;
    }

    h2, .h1 {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }

    ul.games {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    ul.games li .icon {
        border-radius: 12px;
    }

    ul.games li .name-container {
        padding: 10px 4px;
    }

    ul.games li .name {
        font-size: 13px;
    }

    .btn-container {
        margin: 24px 0 0;
    }

    footer.main {
        margin-top: 40px;
        padding: 30px 0;
    }

    footer.main .footer-content section.tags nav.main ul {
        gap: 8px;
    }

    footer.main .footer-content section.tags nav.main ul li a {
        padding: 8px 12px;
        font-size: 12px;
    }

}

@media only screen and (max-width: 400px) {
    ul.games {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ============================================
   Detail Page Styles
   ============================================ */

.game {
    width: 100%;
}

.game header {
    margin-bottom: 40px;
}

.game header .background {
    position: relative;
    background-size: cover;
    background-position: center center;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game header .background .backgroundDarken {
    width: 100%;
    padding: 40px 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.game header .background .backgroundDarken .main-section {
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game header .icon {
    display: block;
    width: 150px;
    max-width: 100%;
    margin: 0 auto 20px;
    border: 3px solid #fff;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border-radius: 16px;
}

.game header .icon img {
    width: 100%;
    display: block;
}

.game header h1 {
    color: #fff;
    margin-bottom: 0;
    font-size: 2rem;
    text-align: center;
}

.game .play-btn-container {
    margin: 20px 0 0;
    display: flex;
    justify-content: center;
}

.game .play-btn-container .play-btn {
    display: inline-block;
    padding: 14px 40px;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.game .game-infos {
    margin-left: -10px;
    margin-right: -10px;
}

.game .game-infos::before,
.game .game-infos::after {
    content: " ";
    display: table;
}

.game .game-infos::after {
    clear: both;
}

.game .game-description {
    box-sizing: border-box;
    padding: 1px 10px;
    margin-bottom: 40px;
}

.game .game-description p {
    margin: 0;
    text-align: center;
}

.game .game-categories {
    margin-top: 40px;
}

.game .game-categories ul {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.game .game-categories ul li {
    background-color: #f1f5f9;
    margin: 0 5px 5px 0;
    border-radius: 8px;
    overflow: hidden;
}

.game .game-categories ul li a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: #475569;
    font-weight: 500;
}

.game .similarGames {
    margin: 40px 0;
}

.game .similarGames h2 {
    margin-bottom: 20px;
    text-align: center;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

ul.games li {
    animation: fadeIn 0.4s ease forwards;
}

ul.games li:nth-child(1) { animation-delay: 0.05s; }
ul.games li:nth-child(2) { animation-delay: 0.1s; }
ul.games li:nth-child(3) { animation-delay: 0.15s; }
ul.games li:nth-child(4) { animation-delay: 0.2s; }
ul.games li:nth-child(5) { animation-delay: 0.25s; }
ul.games li:nth-child(6) { animation-delay: 0.3s; }
ul.games li:nth-child(7) { animation-delay: 0.35s; }
ul.games li:nth-child(8) { animation-delay: 0.4s; }

/* ============================================
   Game Fullscreen Mode
   ============================================ */

.app-module,
.game-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #000;
}

.app-module iframe,
.game-fullscreen iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.app-module .setting,
.game-fullscreen .setting {
    position: fixed;
    top: 10px;
    left: 10px;
    right: auto;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 10px;
    box-sizing: border-box;
}

/* ============================================
   Category Sections
   ============================================ */

.main-section {
    margin-bottom: 48px;
}

.main-section:last-child {
    margin-bottom: 0;
}

/* ============================================
   Links
   ============================================ */

a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #4f46e5;
}
