
/* =========================================
   1. RESET & VARIABLES
   ========================================= */
:root {
    /* Colors - Dark Theme Palette */
    --c-bg-main: #0b0e14;
    --c-bg-secondary: #151925;
    --c-bg-tertiary: #1e2337;
    
    --c-text-primary: #ffffff;
    --c-text-secondary: #94a3b8;
    --c-text-tertiary: #64748b;

    /* Accents */
    --c-accent-blue: #3b82f6;
    --c-accent-blue-hover: #60a5fa;
    --c-accent-purple: #8b5cf6;
    --c-accent-pink: #ec4899;
    --c-accent-yellow: #eab308;
    --c-accent-green: #22c55e;
    --c-accent-red: #ef4444;

    /* Gradients */
    --g-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --g-secondary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --g-gold: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    
    /* Spacing & Sizes */
    --header-height-top: 3.5rem;
    --header-height-mid: 4rem;
    --sidebar-width: 4.5rem;
    --chat-width: 20rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --trans-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-default: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-glow-blue: 0 0 15px rgba(59, 130, 246, 0.4);
    --shadow-glow-gold: 0 0 15px rgba(234, 179, 8, 0.4);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--c-bg-main);
    color: var(--c-text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--trans-fast);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

ul, ol {
    list-style: none;
}

/* =========================================
   2. UTILITIES
   ========================================= */
.flex { display: flex; }
.column { flex-direction: column; }
.a-center { align-items: center; }
.j-between { justify-content: space-between; }
.j-center { justify-content: center; }
.flex-shrink-0 { flex-shrink: 0; }
.unselectable { user-select: none; }

.f-bold { font-weight: 700; color: var(--c-text-primary); margin: 0 0.3em; }

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--c-bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--c-bg-tertiary);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--c-text-tertiary);
}

/* =========================================
   3. LAYOUT STRUCTURE
   ========================================= */
#__nuxt, #__layout, .layout-default {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.layout-default {
    padding-top: calc(var(--header-height-top) + var(--header-height-mid));
    padding-left: var(--sidebar-width);
    padding-right: var(--chat-width); /* Assuming chat is open by default on desktop */
    transition: padding var(--trans-default);
}

.main-content {
    flex: 1;
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* =========================================
   4. SIDEBAR
   ========================================= */
.AppSidebar {
    position: fixed;
    left: 0;
    top: calc(var(--header-height-top) + var(--header-height-mid));
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--c-bg-secondary);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 40;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.AppSidebar__bg {
    position: absolute;
    inset: 0;
    background: var(--c-bg-secondary);
    z-index: -1;
}

.sidebar-list {
    padding: 1rem 0;
    gap: 0.5rem;
    width: 100%;
}

.sidebar-item {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    background-color: var(--c-bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--trans-default);
    cursor: pointer;
    position: relative;
}

.sidebar-item:hover {
    background-color: var(--c-accent-blue);
    transform: translateX(4px);
    box-shadow: var(--shadow-glow-blue);
}

.sidebar-item a {
    display: block;
    width: 100%;
    height: 100%;
    /* Assuming background images for icons based on HTML emptiness */
    background-position: center;
    background-repeat: no-repeat;
    background-size: 1.5rem;
}

.sidebar-item__new {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--c-accent-red);
    font-size: 0.6rem;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

/* =========================================
   5. HEADER
   ========================================= */
.AppHeader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(11, 14, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-md);
}

/* Header Top Section */
.header-top {
    height: var(--header-height-top);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    font-size: 0.875rem;
    color: var(--c-text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.header-top__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1.5rem;
    cursor: pointer;
    transition: color var(--trans-fast);
}

.header-top__link:hover {
    color: var(--c-text-primary);
}

.header-top__link svg path {
    fill: currentColor;
    transition: fill var(--trans-fast);
}

.header-top__link.blue svg path {
    fill: var(--c-accent-blue);
}

.header-top__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-main {
    width: 100px;
    height: 40px;
    background: url('/path/to/logo.png') no-repeat center/contain; /* Placeholder for logo bg */
    z-index: 2;
}

.header-top__logo-trapezoid {
    position: absolute;
    top: 0;
    fill: var(--c-bg-secondary);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    z-index: 1;
}

/* Header Mid Section (Navigation) */
.header-mid {
    height: var(--header-height-mid);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: relative;
    /* Resetting the inline style for sticky behavior */
    top: 0 !important; 
    transition: none !important;
}

.header-mid__links {
    display: flex;
    gap: 0.5rem;
}

.header-mid__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--c-text-secondary);
    position: relative;
    overflow: hidden;
}

.header-mid__link:hover,
.header-mid__link.nuxt-link-active {
    background-color: var(--c-bg-tertiary);
    color: var(--c-text-primary);
}

.header-mid__link svg {
    width: 1.1rem;
    height: 1.1rem;
}

.header-mid__link svg path {
    fill: currentColor;
}

/* Bonus Link Special Style */
.header-mid__link.yellow {
    color: var(--c-accent-yellow);
}
.header-mid__link.yellow:hover {
    background: rgba(234, 179, 8, 0.1);
    box-shadow: var(--shadow-glow-gold);
}

.header-mid__link-counter {
    background: var(--c-accent-red);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius-sm);
    margin-left: 0.2rem;
}

/* Auth Buttons */
.header-mid__signIn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    background-color: var(--c-bg-tertiary);
    color: var(--c-text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.75rem;
    transition: all var(--trans-default);
}

.header-mid__signIn:hover {
    background-color: var(--c-bg-secondary);
    transform: translateY(-1px);
}

.header-mid__signIn svg path {
    fill: var(--c-text-primary);
}

.btn.btn--signUp {
    background: var(--g-primary);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    transition: all var(--trans-default);
}

.btn.btn--signUp:hover {
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn.btn--signUp:active {
    transform: translateY(0);
}

/* Language & Sound Switchers */
.select-language, .sound-switcher {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background-color: var(--c-bg-tertiary);
    margin-right: 0.75rem;
    cursor: pointer;
    transition: background-color var(--trans-fast);
}

.select-language:hover, .sound-switcher button:hover {
    background-color: rgba(255,255,255,0.1);
}

.select-language__country-chosen {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sound-switcher button svg path {
    fill: var(--c-text-secondary);
}

.sound-switcher button.active svg path {
    fill: var(--c-accent-green);
}

/* =========================================
   6. MAIN CONTENT & LOADER
   ========================================= */
.index-page__container {
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.loaderThink {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--c-bg-tertiary);
    border-top-color: var(--c-accent-blue);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================
   7. CHAT SIDEBAR
   ========================================= */
.AppChat {
    position: fixed;
    right: 0;
    top: calc(var(--header-height-top) + var(--header-height-mid));
    bottom: 0;
    width: var(--chat-width);
    background-color: var(--c-bg-secondary);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 45;
    display: flex;
    flex-direction: column;
}

.chat-head {
    height: 3.5rem;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--c-bg-tertiary);
}

.chat-head__title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--c-text-primary);
}

.chat-head__rules-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--c-text-tertiary);
    transition: color var(--trans-fast);
}

.chat-head__rules-btn:hover {
    color: var(--c-text-primary);
}

.chat-head__rules-btn svg path {
    fill: currentColor;
}

.chat-container-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.chat-container {
    height: 100%;
    overflow-y: auto;
}

.chat__input-fixed {
    padding: 1rem;
    background-color: var(--c-bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--c-text-tertiary);
    font-size: 0.85rem;
}

.chat__auth-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    margin-right: 0.5rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--c-accent-blue);
    color: white;
}

/* Open Chat Button (Mobile/Collapsed) */
.chat-wrap__open-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--g-primary);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    cursor: pointer;
    transition: transform var(--trans-bounce);
}

.chat-wrap__open-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

/* =========================================
   8. RESPONSIVE DESIGN
   ========================================= */

/* Burger Menu */
.burger-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.burger-menu__burger {
    width: 24px;
    height: 2px;
    background: var(--c-text-primary);
    position: relative;
}

.burger-menu__burger::before,
.burger-menu__burger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--c-text-primary);
    left: 0;
    transition: all var(--trans-fast);
}

.burger-menu__burger::before { top: -8px; }
.burger-menu__burger::after { top: 8px; }

/* Mobile Game Links */
.header-games-mobile {
    display: none; /* Default hidden */
}

@media (max-width: 1024px) {
    .d-desktop-none { display: flex !important; }
    .d-tablet-none { display: none !important; }
    
    .layout-default {
        padding-left: 0;
        padding-right: 0;
    }

    .AppSidebar { display: none; }
    .AppChat { display: none; } /* Assuming chat is hidden or toggled */
    
    .header-top { display: none; } /* Hide top bar on smaller screens usually */
    
    .header-mid {
        justify-content: space-between;
        padding: 0 1rem;
    }

    .header-mid__signIn span { display: none; } /* Hide text, show icon only on tablet */
}

@media (max-width: 768px) {
    :root {
        --header-height-mid: 3.5rem;
    }

    .d-mobile-none { display: none !important; }
    .d-mobile-only { display: flex !important; }

    .header-mid__logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Mobile Games Navigation (Horizontal Scroll) */
    .header-games-mobile {
        display: block;
        background: var(--c-bg-secondary);
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header-games-mobile__wrap {
        display: flex;
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .header-games-mobile__item {
        white-space: nowrap;
        padding: 0.5rem 1rem;
        background: var(--c-bg-tertiary);
        border-radius: var(--radius-full);
        font-size: 0.8rem;
        color: var(--c-text-secondary);
        font-weight: 500;
    }

    .header-games-mobile__item:hover,
    .header-games-mobile__item.nuxt-link-active {
        background: var(--c-text-primary);
        color: var(--c-bg-main);
    }

    /* Adjust main content padding for mobile header + subheader */
    .layout-default {
        padding-top: calc(var(--header-height-mid) + 3rem); /* rough estimate */
        padding-left: 0;
        padding-right: 0;
    }

    .main-content {
        padding: 1rem;
    }

    .chat-wrap__open-btn {
        display: flex !important; /* Force show chat button on mobile */
    }
}

/* =========================================
   9. FORM ELEMENTS (General Styles)
   ========================================= */
input[type="text"], input[type="password"], input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--c-bg-main);
    border: 1px solid var(--c-bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--c-text-primary);
    font-size: 0.95rem;
    transition: border-color var(--trans-fast);
}

input:focus {
    outline: none;
    border-color: var(--c-accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Tooltip (based on aria-describedby) */
[aria-describedby="tooltip"] {
    position: relative;
}

/* =========================================
   10. SVG & MICRO-ANIMATIONS
   ========================================= */
svg {
    display: block;
}

/* Pulse animation for live/online dots */
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.header-top__link span.f-bold + span {
    /* "in network" text container */
    position: relative;
}
/* Assuming the HTML structure had a specific indicator class, 
   but we can style the SVG context */
.header-top__link svg[data-name="socials"] + .f-bold {
    color: var(--c-accent-green);
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}
