* { box-sizing: border-box; }
body {
    font-family: sans-serif;
    margin: 0;
    background: #f5f5f5;
    color: #222;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 30, 47, 0.60);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 20px 32px;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .logo {
    font-family: 'Russo One', sans-serif;
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 0.5px;
    color: #fff;
    text-decoration: none;
}

.site-header nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.site-header nav a {
    font-family: 'Russo One', sans-serif;
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.site-header nav a:hover {
    color: #fff;
}

.header-collapsible {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
}

.header-right a {
    color: #fff;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .header-collapsible {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-top: 12px;
    }

    .header-collapsible.open {
        display: flex;
    }

    .site-header nav {
        flex-direction: column;
        gap: 12px;
    }

    .header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
}

select.lang-switch {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    cursor: pointer;
}

select.lang-switch option {
    color: #000;
}

.site-footer {
    background: #1e1e2f;
    color: #ccc;
    margin-top: 40px;
    padding: 32px 24px 0;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    padding-bottom: 24px;
}

.footer-brand {
    flex: 1 1 220px;
}

.footer-brand .logo {
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 6px;
}

.footer-brand p {
    font-size: 13px;
    color: #999;
}

.footer-col {
    flex: 1 1 140px;
    display: flex;
    flex-direction: column;
}

.footer-col h4 {
    color: #fff;
    font-size: 14px;
    margin: 0 0 10px;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 13px;
    padding: 16px 0;
    color: #999;
}

.footer-bottom a {
    color: #999;
}

.footer-bottom a:hover {
    color: #fff;
}

.games-page { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.games-breadcrumb { font-size: 13px; color: #888; margin-bottom: 12px; }
.games-breadcrumb a { color: #888; }
.games-title { margin: 0 0 24px; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.game-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); text-decoration: none; color: inherit; display: block; transition: transform .15s; }
.game-card:hover { transform: translateY(-3px); }
.game-card-thumb { aspect-ratio: 16 / 9; display: flex; align-items: flex-end; padding: 10px; color: #fff; font-weight: bold; font-size: 14px; background-size: cover; background-position: center; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.game-card-body { padding: 12px 14px; }
.game-card-title { font-weight: bold; font-size: 14px; margin-bottom: 4px; }
.game-card-desc { font-size: 12px; color: #777; line-height: 1.4; margin: 0 0 6px; }
.game-card-plays { font-size: 12px; color: #999; }
.games-empty { color: #999; text-align: center; padding: 60px 20px; }

.header-search { display: flex; align-items: center; }
.header-search input {
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px 0 0 20px; padding: 6px 12px; font-size: 13px; color: #fff;
    width: 140px;
}
.header-search input::placeholder { color: rgba(255,255,255,0.6); }
.header-search button {
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3); border-left: none;
    border-radius: 0 20px 20px 0; padding: 6px 12px; cursor: pointer; color: #fff;
}

.cat-block {
    background: #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.cat-block h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.cat-games {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.cover {
    display: flex;
    align-items: flex-end;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    padding: 8px;
    background-size: cover;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    text-decoration: none;
}

.cat-featured {
    width: 260px;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    flex-shrink: 0;
    transition: transform .15s;
}

.cat-mini-wrap {
    display: grid;
    grid-template-columns: repeat(4, 120px);
    grid-auto-rows: auto;
    gap: 10px;
}

.cat-mini {
    width: 120px;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: transform .15s;
}

.cat-featured:hover,
.cat-mini:hover {
    transform: scale(1.05);
}

.carousel {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform .4s ease;
}

.carousel-slide {
    flex: 0 0 100%;
    height: 280px;
    align-items: flex-end;
    font-size: 18px;
    padding: 20px;
    text-decoration: none;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:hover {
    background: rgba(0,0,0,0.6);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background .15s;
}

.carousel-dot.active {
    background: #fff;
}

.home-layout {
    display: flex;
    gap: 24px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: flex-start;
}

.home-main {
    flex: 1;
    min-width: 0;
}

.home-sidebar-col {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.home-sidebar-left,
.sidebar-card {
    background: #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.home-players-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.home-player-tile {
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.home-player-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    font-weight: bold;
}

.home-player-name {
    font-size: 11px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-heading {
    font-size: 17px;
    margin: 0 0 16px;
}

.side-game-card {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.side-game-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.side-game-thumb {
    width: 80px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.side-game-info {
    min-width: 0;
}

.side-game-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
}

.side-game-plays {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.side-game-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 900px) {
    .home-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .home-sidebar-col {
        flex: 1 1 auto;
        width: 100%;
    }

    .home-main {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .cat-featured {
        width: 100%;
    }

    .cat-mini-wrap {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }

    .cat-mini {
        width: 100%;
    }
}

.cookie-banner[hidden] {
    display: none;
}

.friend-request-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ff5e5e;
    color: #fff !important;
    border-radius: 12px;
    padding: 2px 9px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}

.account-deleted-banner {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 14px 20px;
    background: #e6ffe6;
    border: 1px solid #0a0;
    border-radius: 8px;
    color: #060;
    font-size: 14px;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #1e1e2f;
    color: #fff;
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.cookie-banner p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    max-width: 700px;
}

.cookie-banner a {
    color: #fff;
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-banner-actions button {
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    background: transparent;
    color: #fff;
}

#cookie-accept {
    background: #fff;
    color: #1e1e2f;
    border-color: #fff;
    font-weight: bold;
}
