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

:root{
    --bg:#111111;
    --surface:#181818;
    --card:#1c1c1c;
    --border:#303030;
    --accent:#ffc942;
    --accent-dark:#cba829;
    --text:#f2f2f2;
    --muted:#888;
}

#request-game {
    background: transparent;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Barlow Condensed";
}

body{
    min-height:100vh;
    background:var(--bg);
    color:var(--text);
    display:flex;
    flex-direction:column;
    overflow-x:hidden;
}

a{
    text-decoration:none;
}

.main{
    flex:1;
    max-width:1450px;
    width:100%;
    margin-left:auto;
    margin-right:auto;
}

#settings-open{
    cursor:pointer;
}


/* ==========================
        SETTINGS MENU
========================== */

.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.settings-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.settings-menu{
    width: 420px;
    max-width: calc(100vw - 30px);
    max-height: 88vh;
    overflow-y: auto;
    padding: 20px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.8);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    border-radius: 12px;
    z-index: 70;
    transition: all 0.1s ease;
}

.settings-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.settings-menu-title{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.settings-menu-title h2{
    font-size: 20px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-menu-title h2 i{
    color: var(--accent);
    font-size: 16px;
}

.close-settings-menu{
    cursor: pointer;
    color: var(--muted);
    font-size: 18px;
    transition: color 0.1s;
    line-height: 1;
}

.close-settings-menu:hover{
    color: var(--accent);
}

/* Sections */
.settings-section{
    margin-bottom: 14px;
}

.settings-section-label{
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.settings-row{
    display: flex;
    gap: 8px;
    width: 100%;
}

.settings-row.two-col .settings-field{
    flex: 1;
}

.settings-field{
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.settings-field label{
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
}

.settings-field input[type="text"],
.settings-field input[type="file"]{
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 8px 10px;
    color: white;
    width: 100%;
    font-size: 14px;
    font-family: "Barlow Condensed";
    transition: border-color 0.1s;
}

.settings-field input[type="text"]:focus{
    outline: none;
    border-color: var(--accent);
}

.settings-field input[type="file"]{
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
}

/* Icon grid */
.settings-icons-grid{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
}

.settings-icons-grid img{
    width: 30px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.1s;
    opacity: 0.75;
}

.settings-icons-grid img:hover{
    transform: scale(1.15);
    opacity: 1;
}

.settings-icons-grid img.selected{
    outline: 2px solid var(--accent);
    opacity: 1;
}

/* Toggle row */
.settings-toggle-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.settings-toggle{
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.settings-toggle input{
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-slider{
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 22px;
    transition: background 0.2s;
    cursor: pointer;
}

.settings-toggle-slider::before{
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.settings-toggle input:checked + .settings-toggle-slider{
    background: var(--accent);
}

.settings-toggle input:checked + .settings-toggle-slider::before{
    transform: translateX(18px);
}

/* Button grid — 2 per row */
.settings-btn-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.settings-btn-grid button{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    font-size: 14px;
    font-weight: 700;
    font-family: "Barlow Condensed";
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: border-color 0.1s, color 0.1s;
}

.settings-btn-grid button:hover{
    border-color: var(--accent);
    color: var(--accent);
}

.settings-btn-grid button i{
    font-size: 13px;
}

/* Key bind button */
.key-bind-btn{
    height: 38px;
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    font-family: "Barlow Condensed";
    cursor: pointer;
    transition: border-color 0.1s, color 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-bind-btn:hover{
    border-color: var(--accent);
}

.key-bind-btn.listening{
    border-color: var(--accent);
    color: var(--accent);
    animation: pulse-border 0.6s ease infinite alternate;
}

@keyframes pulse-border{
    from { box-shadow: 0 0 0 0 rgba(255,201,66,0.4); }
    to   { box-shadow: 0 0 0 4px rgba(255,201,66,0); }
}

/* ==========================
        FULLSCREEN
========================== */

.game-page.fullscreen .game-container{
    width:100vw !important;
    height:calc(100vh - 61px) !important;
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    border-radius:0 !important;
    z-index:40 !important;
}

.game-page.fullscreen .game-header div p{
    display:none !important;
}

.game-page.fullscreen .game-header div img{
    width:45px !important;
    height:45px !important;
    border-radius:7px !important;
}

.game-page.fullscreen .game-header{
    width:100vw !important;
    height:60px !important;
    border-radius:0 !important;
    transform:translateY(-1px) !important;
    position:fixed !important;
    bottom:0 !important;
    left:0 !important;
    z-index:50 !important;
}

.game-page.fullscreen body{
    overflow:hidden !important;
}


/* ==========================
        SETTINGS OVERLAY
========================== */

.settings-overlay{
    position:fixed;
    inset:0;
    background:rgba(0, 0, 0, 0.45);
    z-index:60;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity 0.2s ease;
}

.settings-overlay.active{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
}

.settings-menu{
    position:fixed;
    z-index:70;
}

/* ==========================
        AUTO ABBREVIATE
========================== */

.auto-abbreviate-setting{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-direction: row;
    width:100%;
    padding:12px 0;
}

.auto-abbreviate-setting p {
    margin-left: 15px;
}

.auto-abbreviate-setting p{
    font-size:18px;
    color:white;
    margin:0;
}

.auto-abbreviate-toggle{
    position:relative;
    width:46px;
    height:24px;
}

.auto-abbreviate-toggle input{
    opacity:0;
    width:0;
    height:0;
}




/* ==========================
        TOP BAR
========================== */

.topbar{
    width:100%;
    max-width:1398px;
    height:60px;
    margin-left:auto;
    margin-right:auto;
    background:#151515;
    border-left:1px solid var(--border);
    border-right:1px solid var(--border);
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 20px;
    position: relative;
    z-index: 20; 
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.topbar-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

footer{
    width:100%;
    max-width:1398px;
    height:120px;
    margin-left:auto;
    margin-right:auto;
    margin-top:auto;
    background:#151515;
    border-left:1px solid var(--border);
    border-right:1px solid var(--border);
    border-top:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:space-around;
    padding:0 20px;
    cursor:default;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

footer a:hover{
    color:var(--accent);
    text-decoration:underline;
    cursor:pointer;
}

footer a{
    color:white;
    text-decoration:none;
}

footer div{
    display:flex;
    justify-content:top;
    align-items:left;
    height:98px;
    gap:5px;
    flex-direction:column;
}

footer div p{
    color:#666;
    text-decoration:underline;
}

.logo{
    font-size:30px;
    font-weight:800;
    letter-spacing:.5px;
    color:white;
    text-decoration:none;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:row;
    gap:10px;
}

.logo img{
    width:40px;
}

.logo span{
    color:var(--accent);
}

.top-links{
    display:flex;
    gap:22px;
    margin-left:35px;
}

.top-links a{
    font-size:18px;
    font-weight:700;
    color:white;
    text-decoration:none;
    transition:.2s;
}

.top-links a:hover{
    color:var(--accent);
}


/* Add these updates or replace your existing dropdown CSS blocks in main.css */

/* ==========================
   HEADER CATEGORIES DROPDOWN
========================== */

.categories-dropdown {
    position: relative;
    display: inline-block;
    z-index: 30; /* dropdown above topbar */
}

.categories-dropbtn {
    background: var(--surface);
    color: white;
    padding: 7px 14px;
    font-size: 16px;
    font-weight: 700;
    border: 1px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    transition: all 0.2s ease;
}

.categories-dropbtn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.categories-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--surface);
    min-width: 340px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
    z-index: 30;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* Invisible bridge padding to prevent closing when moving mouse from button to dropdown */
.categories-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
}

.categories-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.categories-dropdown-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.categories-dropdown-content a {
    color: white;
    padding: 10px 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    background-color: var(--card);
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.categories-dropdown-content a i {
    width: 18px;
    text-align: center;
    color: var(--accent);
}

.categories-dropdown-content a:hover {
    background: #383838;
    color: var(--accent);
}

.categories-dropdown-content a.active {
    background: var(--accent);
    color: #111;
}

.categories-dropdown-content a.active i {
    color: #111;
}

.categories-dropdown:hover .categories-dropdown-content {
    display: grid;
}

.categories-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* ==========================
        SEARCH
========================== */

.search-form {
    display: flex;
}

.game-search{
    width:220px;
    height:36px;
    background:#111;
    border:1px solid var(--border);
    border-radius:7px;
    color:white;
    padding:0 15px;
    font-size:16px;
}

.game-search:focus{
    outline:none;
    border-color:var(--accent);
}


/* ==========================
        DISCORD
========================== */

.top-button{
    margin-left:15px;
    color:white;
    font-size:20px;
    transition:.2s;
}

.top-button:hover{
    color:var(--accent);
}


/* ==========================
        SORT
========================== */

.sort-bar{
    max-width:1400px;
    margin-left:auto;
    margin-right:auto;
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:16px 15px 14px;
}

.sort-bar > span{
    font-size:17px;
    color:var(--muted);
}

.sort-bar button{
    background:var(--surface);
    border:1px solid var(--border);
    color:white;
    padding:7px 14px;
    border-radius:7px;
    font-size:15px;
    font-weight:700;
    transition:.15s;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.sort-bar button:hover{
    cursor:pointer;
    border-color:var(--accent);
}

.sort-bar .selected{
    background:var(--accent);
    border-color:var(--accent);
    color:#111;
}

.sort-bar .category-title-display{
    font-size:26px;
    font-weight:800;
    color:var(--accent);
    letter-spacing:0.5px;
    text-transform:uppercase;
}

.sort-bar p{
    color:var(--muted);
    font-size:15px;
    font-weight:600;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:6px;
    padding:4px 10px;
    margin:0;
}

.sort-bar-quicklinks {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

.sort-quicklink {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.sort-quicklink img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.sort-quicklink:hover { opacity: 0.8; }

.sort-quicklink--orange {
    background: #e8720c;
    color: #fff;
}

.sort-quicklink--white {
    background: #fff;
    color: #111;
}

.sort-quicklink--green {
    background: #1db954;
    color: #fff;
}


/* ==========================
        GAME GRID
========================== */

.game-card-container{
    width:100%;
    max-width:1400px;
    margin:0 auto;
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
    gap:10px;
    padding:0 15px 30px;
}

.game-card{
    background:var(--card);
    border-radius:7px;
    cursor:pointer;
    transition:.2s;
    color:white;
    position:relative;
    text-decoration:none !important;
}


.game-img-container {
    position: relative;
}

.game-img {
    transition: transform 0.2s ease;
}

.game-card:hover .game-img {
    transform: scale(1.1);
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}


.game-card:hover{
    transform:translateY(-6px);
}

.game-img-container{
    width:100%;
    height:150px;
    overflow:hidden;
}

.game-img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    overflow:hidden;
    border-top-left-radius:7px;
    border-top-right-radius:7px;
    transition:.25s;
}

.game-title{
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#181818;
    font-size:19px;
    border-bottom-left-radius:7px;
    border-bottom-right-radius:7px;
    font-weight:700;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    min-width:0;
}

/* ==========================
        HOME GAME GRID
========================== */

.home-game-grid{
    width:100%;
    max-width:1400px;
    margin:0 auto;
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
    gap:8px;
    padding:0 15px 30px;
}

.home-game-wrap{
    position:relative;
}

.home-game-card{
    position:relative;
    display:block;
    border-radius:8px;
    overflow:hidden;
    cursor:pointer;
    text-decoration:none !important;
    aspect-ratio:1 / 1;
    transition:transform 0.15s ease-in-out;
    width:100%;
    height:100%;
}

.home-game-card img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transition:transform 0.15s ease-in-out;
}

.home-game-card:hover{
    transform:translateY(-5px);
}

.home-game-card:hover img{
    transform:scale(1.07);
}


.home-game-title{
    position:absolute;
    bottom:0;
    font-weight: bolder;
    width:100%;
    margin:0;
    padding:5px;
    text-align:center;
    text-shadow:2px 2px 4px #000;
    background-color:#00000080;
    color:white !important;
    white-space:nowrap;
    font-size: 20px;
    overflow:hidden;
    text-overflow:ellipsis;
    opacity:0;
    
    transition:.15s ease;
}

.home-game-card:hover .home-game-title{
    opacity:1;

}


/* ==========================
        FOOTER
========================== */

.credits-footer{
    text-align:center;
    padding:40px;
    color:#666;
}


/* ==========================
        SETTINGS PAGE
========================== */

.settings-title{
    text-align:center;
    font-size:42px;
    font-weight:700;
    color:white;
    margin:30px 0;
}

.settings-container{
    max-width:900px;
    margin-left:auto;
    margin-right:auto;
    padding:0 15px;
}

.settings-card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:8px;
    padding:20px;
    margin-bottom:10px;
    text-align:center;
}

.settings-card h2{
    font-size:24px;
    font-weight:700;
    color:#aaa;
    margin-bottom:15px;
}

.settings-card input[type="text"]{
    background:#111;
    border:1px solid var(--border);
    border-radius:7px;
    padding:8px 12px;
    color:white;
    width:220px;
    font-size:16px;
}

.settings-card input[type="text"]:focus{
    outline:none;
    border-color:var(--accent);
}

.settings-card button{
    display:block;
    margin:10px auto;
    padding:8px 16px;
    border-radius:7px;
    background:var(--surface);
    border:1px solid var(--border);
    color:white;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    transition:.15s;
}

.settings-card button:hover{
    border-color:var(--accent);
}

.settings-card p{
    font-size:18px;
}

.settings-card small{
    color:var(--muted);
    font-size:15px;
}

.cloak-icons{
    display:flex;
    justify-content:center;
    gap:10px;
    margin-top:15px;
}

.cloak-icons img{
    width:45px;
    height:45px;
    object-fit:cover;
}

.toggle-card label{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:12px;
    color:#aaa;
    font-size:18px;
}

.toggle-card input{
    accent-color:var(--accent);
}


/* ==========================
        LEGAL PAGES
========================== */

.legal-container{
    max-width:900px;
    margin:40px auto;
    padding:0 15px;
}

.error-page{
    max-width:900px;
    margin:40px auto;
    padding:30px;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:8px;
    font-size:30px;
    color:#666;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:column;
}

.legal-card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:8px;
    padding:30px;
}

.legal-title{
    text-align:center;
    font-size:42px;
    font-weight:800;
    color:white;
    margin-bottom:10px;
}

.legal-updated{
    text-align:center;
    color:var(--muted);
    font-size:16px;
    margin-bottom:35px;
}

.legal-card h2{
    font-size:26px;
    font-weight:700;
    color:var(--accent);
    margin-top:30px;
    margin-bottom:10px;
}

.legal-card p{
    color:#ddd;
    font-size:18px;
    line-height:1.5;
    margin-bottom:15px;
}

.legal-card ul{
    margin:10px 0 20px 25px;
    color:#ddd;
    font-size:18px;
}

.legal-card li{
    margin-bottom:8px;
}

.legal-card a{
    color:var(--accent);
    text-decoration:none;
}

.legal-card a:hover{
    text-decoration:underline;
}


/*
GAME PAGE ITSELF .php
*/

/* Outer wrapper */
.game-page{
    width:100%;
    max-width:1400px;
    margin:10px auto 30px;
    position:relative;
    padding:0 10px;
}
/* Three-column row: left 2-col grid | game | right 2-col grid */
.game-layout{
    display:flex;
    flex-direction:row;
    align-items:flex-start;
    gap:8px;
    width:100%;
}

/* Side cols — 2-col grid, 6 rows of 83px.
   Total: 6*83 + 5*8 = 538px */
/* Side cols — 3-col grid, 6 rows of 83px.
   Width: 3*83 + 2*8 = 265px. Height: 6*83 + 5*8 = 538px */
.game-side-col{
    display:grid;
    grid-template-columns:83px 83px 83px;
    grid-template-rows:repeat(6, 83px);
    grid-auto-flow:dense;
    gap:8px;
    flex-shrink:0;
    overflow:hidden;
    height:calc(6 * 83px + 5 * 8px);
}

/* Big card: spans 2 cols × 2 rows = square */
.mini-game-card--big{
    grid-column:span 2;
    grid-row:span 2;
    width:100% !important;
    height:100% !important;
    min-height:unset !important;
    max-height:unset !important;
    align-self:stretch;
    justify-self:stretch;
    margin:0;
}

.mini-game-card--big p {
    font-size: 20px;
}

/* Center column — fills remaining space */
.game-center{
    flex:1;
    min-width:0;
    margin-left: auto;
    margin-right: auto;
    max-width: 850px;
}

/* When game-center is fullscreened, fill the screen and stack game + header */
.game-center:-webkit-full-screen { max-width:100%; width:100%; height:100%; display:flex; flex-direction:column; background:#000; }
.game-center:-moz-full-screen    { max-width:100%; width:100%; height:100%; display:flex; flex-direction:column; background:#000; }
.game-center:fullscreen          { max-width:100%; width:100%; height:100%; display:flex; flex-direction:column; background:#000; }

.game-center:fullscreen .game-container          { flex:1; height:0; }
.game-center:fullscreen .game-container iframe,
.game-center:fullscreen .game-container object   { width:100%; height:100%; }

.game-container{
    width:100%;
    height:457px;
    background:#000;
    overflow:hidden;
    border-top-left-radius:8px;
    border-top-right-radius:8px;
}

.game-container iframe,
.game-container object{
    width:100%;
    height:100%;
    display:block;
    border:0;
}

.game-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:15px;
    background:var(--surface);
    border-bottom-left-radius:8px;
    border-bottom-right-radius:8px;
    height:81px;
}

.game-info{
    display:flex;
    align-items:center;
    gap:15px;
    min-width:0;
}

.game-info > div{
    min-width:0;
    overflow:hidden;
}

.game-info h1{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.game-info p{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    color:var(--muted);
    font-size:15px;
}

.game-page-icon{
    width:50px;
    height:50px;
    border-radius:8px;
    object-fit:cover;
    flex-shrink:0;
}

/* Bottom row — 3 rows, big cards span rows 1-2, smalls fill all 3 rows. */
.game-bottom-row{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(83px, 1fr));
    grid-template-rows:repeat(3, 83px);
    grid-auto-rows:83px;
    grid-auto-flow:dense;
    gap:8px;
    padding-top:8px;
}

.fullscreen-btn{
    width:36px;
    height:36px;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
    border:none;
    background-color:var(--bg);
    color:white;
    cursor:pointer;
    font-size:18px;
    border-radius:6px;
    transition:all 0.05s ease-in-out;
}



.fullscreen-btn:hover{
    background-color:rgba(52, 52, 52, 0.482);
}

.fullscreen-btn i{
    pointer-events:none;
}

.panel-exmaple{
    width:100%;
    margin-top:20px;
}

.sort-bar button i{
    margin-right:8px;
}


/* ==========================
        NEW GAME TAG
========================== */

.new-game-tag{
    background-color:var(--accent);
    color:black !important;
    border-radius:5px;
    display:flex;
    justify-content:center;
    align-items:center;
    width:auto;
    height:fit-content;
    padding:5px;
    font-size:16px !important;
    cursor:default;
    position:absolute;
    transform:translateX(-8px) translateY(-8px);
    z-index:10;
    font-weight:bolder;
    transition:transform 0.15s ease-in-out;
}

.home-game-wrap:hover .new-game-tag{
    transform:translateX(-8px) translateY(-13px);
}


/* ==========================
        GAME INFO SECTION
========================== */

.game-info-section{
    max-width:1400px;
    width:100%;
    margin:8px auto 30px;
    padding:0 10px;
}

.game-info-top{
    display:flex;
    align-items:flex-start;
    gap:20px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:8px;
    padding:20px;
    margin-bottom:8px;
}

.game-info-icon{
    width:90px;
    height:90px;
    border-radius:10px;
    object-fit:cover;
    flex-shrink:0;
}

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

.game-info-text h2{
    font-size:26px;
    font-weight:800;
    color:white;
    margin-bottom:2px;
}

.game-info-author{
    font-size:15px;
    color:var(--muted);
    margin-bottom:8px;
}

.game-info-description{
    font-size:16px;
    color:#ccc;
    line-height:1.5;
}

.game-info-about{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:8px;
    padding:20px;
}

.game-info-about h3{
    font-size:20px;
    font-weight:800;
    color:white;
    margin-bottom:16px;
    padding-bottom:12px;
    border-bottom:1px solid var(--border);
}

.game-info-rows{
    display:flex;
    flex-direction:column;
}

.game-info-row{
    display:flex;
    align-items:center;
    padding:12px 0;
    border-bottom:1px solid var(--border);
    gap:20px;
}

.game-info-row:last-child{
    border-bottom:none;
}

.game-info-label{
    font-size:15px;
    font-weight:700;
    color:white;
    width:160px;
    flex-shrink:0;
    display:flex;
    align-items:center;
    gap:8px;
}

.game-info-label i{
    color:var(--accent);
    width:16px;
    text-align:center;
}

.game-info-value{
    font-size:15px;
    color:#bbb;
}


/* ==========================
        MINI GAME CARDS
========================== */

.mini-game-card{
    width:83px;
    height:83px;
    overflow:hidden;
    border-radius:6px;
    cursor:pointer;
    border:none;
    position:relative;
    display:flex;
    justify-content:center;
    align-items:center;
    margin:auto;
    transition:all 0.15s ease-in-out;
}

.mini-game-card:hover{
    border:none;
    transform:translateY(-5px);
}

.mini-game-card:hover img{
    transform:scale(1.1);
}
.mini-game-card img{
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    display:block;
    transition:all 0.15s ease-in-out;
}

.mini-game-card p{
    position:absolute;
    bottom:0;
    font-weight: bolder;
    width:100%;
    margin:0;
    padding:5px;
    text-align:center;
    text-shadow:2px 2px 4px #000;
    background-color:#00000080;
    color:white !important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    opacity:0;
    transform:translateY(10px);
    transition:.15s ease;
}

.mini-game-card:hover p{
    opacity:1;
    transform:translateY(0);
}

.mini-game-container{
    display:grid;
    grid-template-columns:repeat(auto-fill, 83px);
    max-width:1300px;
    margin-left:auto;
    margin-right:auto;
    gap:10px;
    margin-bottom:50px;
    justify-content:center;
}


/* ==========================
        SETTINGS INPUTS
========================== */

.settings-buttonputs{
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:row;
    gap:10px;
}

.settings-inputs input[type="text"]{
    max-width:140px;
}

.settings-buttonputs button{
    margin:10px 0px;
}


/* ==========================
        STAFF
========================== */

.staff-image-container{
    display:flex;
    flex-direction:row;
    gap:20px;
    justify-content:center;
}

.staff-container{
    display:flex;
    flex-direction:column;
    align-items:center;
    cursor:pointer;
}

.staff-container:hover p{
    text-decoration:underline;
}

.staff-image{
    width:100px;
    height:100px;
    border:1px solid #aaa;
    border-radius:7px;
    margin-bottom:8px;
    object-fit:cover;
}

.staff-container p{
    margin:0;
    text-align:center;
}


/* ==========================
        RESPONSIVE
========================== */

/* Drop side cols to 2 columns when there isn't room for 3 */
@media(max-width:1100px){

    .game-side-col{
        grid-template-columns:83px 83px;
        height:calc(6 * 83px + 5 * 8px);
    }

    .mini-game-card--big{
        grid-column:span 2;
        grid-row:span 2;
    }
}

/* Drop to 1 column */
@media(max-width:900px){

    .game-side-col{
        grid-template-columns:83px;
        grid-template-rows:repeat(6, 83px);
        width:83px;
        height:calc(6 * 83px + 5 * 8px);
    }

    .mini-game-card--big{
        grid-column:span 1;
        grid-row:span 1;
        width:83px !important;
        height:83px !important;
        min-height:83px !important;
        max-height:83px !important;
    }

}

/* Hide side columns entirely when too narrow */
@media(max-width:750px){

    .game-side-col{
        display:none;
    }

}


/* ==========================
        FIRST VISIT POPUP
========================== */

.welcome-overlay{
    position:fixed;
    inset:0;
    background:rgba(0, 0, 0, 0.45);
    z-index:60;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
}


.welcome-overlay.active{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
}


.welcome-popup{
    width:470px;
    max-width:calc(100vw - 30px);
    min-height:300px;
    padding:30px;

    background:var(--bg);
    border:1px solid var(--accent);

    position:fixed;
    top:50%;
    left:50%;

    transform:translate(-50%, -50%);

    pointer-events:none;
    opacity:0;
    visibility:hidden;

    border-radius:8px;

    z-index:70;
}


.welcome-popup.active{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translate(-50%, -50%);
}


.welcome-popup-title{
    display:flex !important;
    flex-direction:row !important;
    justify-content:space-between !important;
    align-items:center !important;

    width:100%;
    margin-top:0 !important;
}


.welcome-popup-title h2{
    font-size:26px;
    font-weight:700;
    color:white;
    text-decoration:underline;
    text-decoration-thickness:2px;
}


.close-welcome-popup{
    margin:0 !important;
    color:white;
    font-size:20px;
    cursor:pointer;
    transition:.15s;
}


.close-welcome-popup:hover{
    color:var(--accent);
}


.welcome-popup-content{
    display:flex;
    flex-direction:column;
    gap:12px;

    width:100%;
    margin-top:25px;
}


.welcome-popup-content p{
    color:#ddd;
    font-size:18px;
    line-height:1.4;
}


.welcome-popup-content strong{
    color:var(--accent);
}


.welcome-popup-button{
    width:100%;
    height:42px;

    margin-top:25px;

    background:var(--accent);
    border:1px solid var(--accent);

    border-radius:7px;

    color:#111;

    font-family:"Barlow Condensed";
    font-size:19px;
    font-weight:700;

    cursor:pointer;

    transition:.15s;
}


.welcome-popup-button:hover{
    background:var(--accent-dark);
    border-color:var(--accent-dark);
}

.welcome-popup a {
    color: var(--accent) !important;
}



/* ===========================
   2x2 Quad Block
   =========================== */
.home-game-wrap--quad {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.home-game-card--quad-mini {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    position: relative;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.15s ease-in-out;
    width: 100%;
}

.home-game-card--quad-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.15s ease-in-out;
}

.home-game-card--quad-mini:hover { transform: translateY(-3px); }
.home-game-card--quad-mini:hover img { transform: scale(1.07); }

.home-game-card--quad-mini .home-game-title {
    font-size: 14px;
}

/* ===========================
   Big card — fixed 314x314
   =========================== */
.home-game-wrap--big {
    grid-column: span 2;
    grid-row: span 2;
    position: relative;
    width: 314px;
    height: 314px;
}

.home-game-card--big {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none !important;
    width: 314px;
    height: 314px;
    transition: transform 0.15s ease-in-out;
}

.home-game-card--big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.15s ease-in-out;
}

.home-game-card--big:hover { transform: translateY(-4px); }
.home-game-card--big:hover img { transform: scale(1.04); }
