/* --- SETTINGS & VARIABLES --- */
:root {
    /* Palette from your photo */
    --gold-primary: #C5A059;       /* Main gold text color */
    --gold-highlight: #FFECC0;     /* Light gold (highlights) */
    --gold-shadow: #8A6E30;        /* Dark gold (shadows) */
    
    --silver-primary: #A8A8A8;     /* Silver for ONLINE word */
    --silver-highlight: #E0E0E0;

    --bg-dark: #050505;            /* Almost black background */
    --bg-overlay: rgba(0, 0, 0, 0.75); /* Background overlay */
    
    --card-bg: rgba(20, 20, 20, 0.6); /* Translucent cards */
    --border-color: rgba(197, 160, 89, 0.3); /* Dim gold border */

    --font-title: 'Cinzel', serif; /* Font as in image */
    --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    --bg-offset-y: 80px;
    --bg-image: url('../images/background.jpg');
    --social-size: 48px;
    --container-max: 1200px;
    --container-pad: clamp(14px, 4vw, 22px);
    --tap-size: 44px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background-color: var(--bg-dark);
    color: #e0e0e0;
    font-family: var(--font-ui);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

img {
    max-width: 100%;
    height: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(197, 160, 89, 0.7);
    outline-offset: 2px;
}

/* --- BACKGROUND IMAGE --- */
/* Fixed background for the whole site */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    /* Ensure the file is named background.jpg */
    background-image: var(--bg-image);
    background-repeat: no-repeat;
    background-position: center calc(50% + var(--bg-offset-y));
    background-size: cover;
}

/* Затемняющий слой поверх фото, чтобы текст читался */
.background-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5,5,5,0.3), var(--bg-dark));
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

a { text-decoration: none; transition: 0.3s; color: inherit; }
ul { list-style: none; }

/* --- HEADER & LOGO --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background: rgba(5, 5, 5, 0.85); /* Полупрозрачный черный */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.35s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.navbar.navbar--scrolled {
    background: rgba(5, 5, 5, 0.95);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.navbar.navbar--hidden {
    transform: translateY(-110%);
}

.navbar__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ЛОГОТИП (СТИЛЬ КАК НА ФОТО) */
.logo-text {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 2px;
    /* Градиент золота */
    background: linear-gradient(180deg, var(--gold-highlight) 0%, var(--gold-primary) 40%, var(--gold-shadow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(197, 160, 89, 0.3));
    position: relative;
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.sub-logo {
    font-size: 0.9rem;
    letter-spacing: 6px;
    margin-top: 2px;
    /* Градиент серебра */
    background: linear-gradient(180deg, var(--silver-highlight) 0%, var(--silver-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    border-top: 1px solid rgba(168, 168, 168, 0.5); /* Линия между словами */
    padding-top: 2px;
}

/* --- NAV LINKS --- */
.nav-links { display: flex; gap: 30px; }
.nav-item {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ccc;
    position: relative;
    padding: 5px 0;
}
.nav-item:hover, .nav-item.active { color: var(--gold-primary); }
.nav-item.highlight { color: var(--gold-highlight); text-shadow: 0 0 10px rgba(197, 160, 89, 0.5); }

.text-gold { color: var(--gold-primary); }

/* --- BUTTONS --- */
.auth-buttons { display: flex; gap: 15px; }

.user-menu { position: relative; display: inline-flex; }

.user-menu__button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.4rem 0.9rem;
    min-height: var(--tap-size);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-menu__button:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(197, 160, 89, 0.55);
    box-shadow: 0 0 18px rgba(197, 160, 89, 0.15);
}

.user-menu__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(197, 160, 89, 0.75);
    box-shadow: 0 0 14px rgba(197, 160, 89, 0.22);
}

.user-menu__name {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.92);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: rgba(5,5,5,0.96);
    border: 1px solid rgba(197, 160, 89, 0.55);
    border-radius: 14px;
    padding: 8px;
    z-index: 1300;
    box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}

.user-menu.is-open .user-menu__dropdown { display: block; }

.user-menu__item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease;
}

.user-menu__item i { font-size: 1.1rem; }

.user-menu__item:hover {
    background: rgba(197, 160, 89, 0.16);
    color: var(--gold-primary);
}

.user-menu__item--danger:hover {
    background: rgba(231, 76, 60, 0.18);
    color: #e74c3c;
}

.user-menu__divider {
    height: 1px;
    margin: 6px 4px;
    background: rgba(255,255,255,0.12);
}

.btn {
    padding: 0.6rem 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%); /* Скошенные углы */
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: var(--tap-size);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.75rem;
}

.btn-outline-gold {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(197, 160, 89, 0.45);
    color: var(--gold-highlight);
    box-shadow: 0 0 0 rgba(197, 160, 89, 0);
}

.btn-outline-gold:hover {
    background: linear-gradient(45deg, var(--gold-shadow), var(--gold-primary));
    color: #000;
    box-shadow: 0 0 25px rgba(197, 160, 89, 0.35);
}

.btn-login {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}
.btn-login:hover { background: rgba(255,255,255,0.15); border-color: var(--gold-primary); }

.btn-register, .btn-gold {
    background: linear-gradient(45deg, var(--gold-shadow), var(--gold-primary));
    color: #000;
    border: none;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.2);
}
.btn-register:hover, .btn-gold:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.4);
}

.mobile-toggle { display: none; background: none; border: none; color: #fff; font-size: 2rem; }
.mobile-toggle { width: var(--tap-size); height: var(--tap-size); touch-action: manipulation; }

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
}

.hero-subtitle {
    color: var(--gold-primary);
    font-family: var(--font-title);
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(2.2rem, 6vw, 4rem);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: clamp(2px, 0.7vw, 5px);
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
    background: linear-gradient(to bottom, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    max-width: 600px;
    margin: 0 auto 40px;
    color: #aaa;
    font-size: clamp(0.98rem, 2.2vw, 1.1rem);
    line-height: 1.6;
}

.hero__actions { display: flex; gap: 20px; justify-content: center; }
.btn-xl { padding: 1rem 3rem; font-size: 1rem; }
.btn-glass {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}
.btn-glass:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

#about {
    scroll-margin-top: 110px;
}

/* --- NEWS --- */
.news-section { padding: 80px 0; background: linear-gradient(to top, #000, transparent); }

/* --- Section Header (Updated from Topup) --- */
.section-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title {
    font-family: var(--font-title);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    /* Золотой градиент текста */
    background: linear-gradient(180deg, #EBD5A0 0%, #C5A059 60%, #8E7036 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(197, 160, 89, 0.3));
    margin-bottom: 15px;
}

.gold-divider {
    height: 3px;
    width: 100px;
    background: linear-gradient(90deg, transparent, #C5A059, transparent);
    margin: 0 auto 20px;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.4);
}

.auth-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
}



/* --- AUTH COMMON --- */
:root {
    --auth-surface: rgba(20, 20, 20, 0.65);
    --auth-border: rgba(197, 160, 89, 0.25);
    --auth-muted: rgba(255, 255, 255, 0.72);
    --auth-ring: rgba(197, 160, 89, 0.46);
    --auth-danger: rgba(255, 120, 120, 0.95);
}

.auth-card {
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    padding: clamp(16px, 4vw, 22px);
    backdrop-filter: blur(10px);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.46);
}

.field {
    display: grid;
    gap: 8px;
}

.field-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.field input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--auth-border);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.field input:focus {
    outline: none;
    border-color: var(--auth-ring);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.18);
}

.field input.is-invalid {
    border-color: rgba(255, 120, 120, 0.75);
    box-shadow: 0 0 0 4px rgba(255, 120, 120, 0.12);
}

.field-error {
    min-height: 18px;
    font-size: 0.9rem;
    color: var(--auth-danger);
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.86);
}

.check input {
    width: 20px;
    height: 20px;
    accent-color: var(--gold-primary);
}

.form-status {
    margin-top: 12px;
    min-height: 20px;
    color: rgba(255, 255, 255, 0.85);
}

.form-status:not(:empty) {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-card .btn {
    width: 100%;
    clip-path: none;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    text-transform: none;
    min-height: 48px;
}

.auth-card .btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 2px;
}

.auth-card .btn.btn-gold {
    background: linear-gradient(45deg, var(--gold-shadow), var(--gold-primary));
    color: #000;
    border: none;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.2);
}

.auth-card .btn.btn-gold:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.4);
}

.auth-card .btn.btn-glass {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-card .btn.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
}

/* --- FOOTER (СВЕТЯЩИЕСЯ ИКОНКИ) --- */
.footer {
    background: #020202;
    border-top: 1px solid #1a1a1a;
    padding: 50px 0;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo { font-family: var(--font-title); color: #444; font-size: 1.5rem; margin-bottom: 10px; }
.copyright { color: #555; font-size: 0.9rem; }
.legal { font-size: 0.8rem; opacity: 0.6; }

.social-links { display: flex; gap: 15px; }
.social-btn {
    width: var(--social-size);
    height: var(--social-size);
    display: flex; align-items: center; justify-content: center;
    background: #111;
    border-radius: 8px;
    color: #666;
    border: 1px solid #333;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    touch-action: manipulation;
}

.social-btn img {
    width: 22px;
    height: 22px;
    display: block;
}

.social-btn:hover { transform: translateY(-5px) scale(1.1); color: #fff; border-color: transparent; }

/* Discord (Фиолетовый неон) */
.social-btn.discord:hover { background: #5865F2; box-shadow: 0 0 20px rgba(88, 101, 242, 0.6); }
.social-btn.facebook:hover { background: #1877F2; box-shadow: 0 0 20px rgba(24, 119, 242, 0.6); }
/* Telegram (Голубой неон) */
.social-btn.telegram:hover { background: #0088cc; box-shadow: 0 0 20px rgba(0, 136, 204, 0.6); }
/* YouTube (Красный неон) */
.social-btn.youtube:hover { background: #FF0000; box-shadow: 0 0 20px rgba(255, 0, 0, 0.6); }
/* VK (Синий неон) */
.social-btn.vk:hover { background: #0077FF; box-shadow: 0 0 20px rgba(0, 119, 255, 0.6); }

.scroll-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(197, 160, 89, 0.45);
    color: var(--gold-highlight);
    border-radius: 10px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    z-index: 1200;
    touch-action: manipulation;
}

.scroll-top:hover {
    background: rgba(197, 160, 89, 0.16);
    box-shadow: 0 0 22px rgba(197, 160, 89, 0.25);
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (hover: none) {
    .btn:hover,
    .download-card:hover,
    .news-card:hover,
    .social-btn:hover,
    .tab-btn:hover,
    .filter-chip:hover,
    .carousel-btn:hover {
        transform: none;
    }
}

@media (max-width: 992px) {
    .nav-links { gap: 18px; }
    .auth-buttons { gap: 10px; }
    .hero__actions { flex-wrap: wrap; }
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    :root { --bg-offset-y: 50px; --bg-image: url('../images/background_mobile.png'); }

    .btn-all-news {
        position: static;
        margin-top: 18px;
    }

    .news-toolbar {
        justify-content: flex-start;
    }

    .news-search {
        min-width: 100%;
    }

    .tab-panels {
        padding: 16px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #0a0a0a;
        padding: 20px;
        border-bottom: 1px solid var(--gold-primary);
        text-align: center;
        gap: 14px;
    }

    .nav-links.active { display: flex; }

    .auth-buttons {
        display: none;
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links.active .auth-buttons {
        display: flex;
        margin-top: 12px;
    }

    .user-menu__dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        min-width: 240px;
    }

    .mobile-toggle { display: block; }
    .navbar { backdrop-filter: none; }
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { width: 100%; }
    .footer__content { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    :root { --social-size: 44px; }
    .navbar { padding: 12px 0; }
    .logo-text { font-size: 1.55rem; }
    .sub-logo { letter-spacing: 5px; }
    .news-image { height: 170px; }
    .tab-panels { padding: 14px; }
}

@media (min-width: 1440px) {
    :root { --container-max: 1320px; }
}

@media (min-width: 1920px) {
    :root { --container-max: 1440px; }
}

/* --- NOTIFICATIONS --- */
:root {
    --color-danger: #e74c3c;
}

.notifications-container {
    position: fixed;
    top: 90px; /* Below navbar roughly */
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

.notification-toast {
    pointer-events: auto;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #888;
    padding: 16px 18px;
    border-radius: 8px;
    color: #f0f0f0;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.notification-toast:hover {
    transform: translateX(-5px);
}

.notification-toast.success {
    border-left-color: var(--gold-primary);
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    border-right: 1px solid rgba(197, 160, 89, 0.2);
    background: linear-gradient(90deg, rgba(197, 160, 89, 0.1) 0%, rgba(15, 15, 15, 0.95) 100%);
}

.notification-toast.error {
    border-left-color: var(--color-danger);
    border-top: 1px solid rgba(231, 76, 60, 0.2);
    border-bottom: 1px solid rgba(231, 76, 60, 0.2);
    border-right: 1px solid rgba(231, 76, 60, 0.2);
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.1) 0%, rgba(15, 15, 15, 0.95) 100%);
}

.notification-toast.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

.notification-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    margin-left: 14px;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.notification-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

@media (max-width: 480px) {
    .notifications-container {
        top: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
}


.btn-outline-danger {
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.45);
    color: #e74c3c;
    box-shadow: 0 0 0 rgba(231, 76, 60, 0);
}

.btn-outline-danger:hover {
    background: linear-gradient(45deg, rgba(231, 76, 60, 0.8), #c0392b);
    color: #fff;
    border-color: #c0392b;
    box-shadow: 0 0 25px rgba(231, 76, 60, 0.35);
}

.btn-block {
    display: flex;
    width: 100%;
}

