 /* ==================== БАЗОВЫЕ СТИЛИ ==================== */

:root {
    --bg: #121212;
    --card-bg: #1e1e1e;
    --text: #ffffff;
    --accent: #4a90e2;
    --error: #e74c3c;
    --border: #333;
    --success: #2ecc71;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:not(input):not(textarea):not([contenteditable]) {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Запрет перетаскивания для всех изображений */
img {
    -webkit-user-drag: none; /* Safari */
    -khtml-user-drag: none;  /* Konqueror */
    -moz-user-drag: none;    /* Firefox */
    -ms-user-drag: none;     /* IE/Edge */
    user-drag: none;         /* Standard */

    -webkit-touch-callout: none;  /* iOS Safari */

    /* Дополнительно: курсор не меняется при наведении */
    pointer-events: auto; /* чтобы клики работали */
}

.hidden {
    display: none !important;
}

 .textShadow {
     text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 !important;
 }

/* ==================== АДАПТИВНОСТЬ ==================== */

@media (max-height: 880px) and (min-height:600px) and (min-aspect-ratio:1280 / 850) {
    html {
        font-size:calc(0.98214vh + 1.35714px)
    }
}

@media (max-width: 1600px) and (min-width:1024px) and (max-aspect-ratio:1280 / 850) {
    html {
        font-size:calc(0.34722vw + 4.44444px)
    }
}

@media (max-height: 600px) and (min-aspect-ratio:1280 / 850),(max-width:1024px) and (max-aspect-ratio:1280 / 850) {
    html {
        font-size:7px
    }
}

/* Вертикальная раскладка (мобильные) */
@media (max-width: 480px) {
    .captcha-section img {
        margin-bottom: 8px;
        width: 100%;
        height: auto;
    }

    .captcha-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .captcha-container input {
        min-width: auto;
    }
}

/* Горизонтальная раскладка (десктоп) */
@media (min-width: 481px) {
    .captcha-section img {
        height: 40px;
        width: auto;
    }
}

/* Системная тема — наследует от prefers-color-scheme */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        --bg: #f5f7fa;
        --card-bg1: #ffffff;
        --text: #2c3e50;
        --border: #ddd;
    }
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg: #121212;
        --card-bg: #1e1e1e;
        --text: #ffffff;
        --border: #333;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    .hero h2 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .lang-switcher {
        position: static;
        text-align: center;
        margin-bottom: 10px;
    }
    .lang-switcher button {
        margin: 0 5px;
    }
}


/* ==================== ЦВЕТОВЫЕ ПЕРЕМЕННЫЕ ПО ТЕМАМ ==================== */

/* Светлая тема */
/* Светлая тема — современная, с синими акцентами */
.theme-light {
    /* Основной фон — светло-серый с холодным оттенком */
    --bg: #f0f4f8;           /* нежный серо-голубой */
    --main-bg: #ffffff;      /* чистый белый для карточек */

    /* Текст */
    --text: #2d3748;         /* тёмно-серый (мягче чёрного) */
    --text-secondary: #718096; /* средний серый */

    /* Границы */
    --border: #e2e8f0;       /* очень светлый серо-голубой */

    /* Шапка и футер — насыщенный синий */
    --header-bg: #2c5282;    /* глубокий синий (из палитры Blue Gray) */
    --footer-bg: #2c5282;

    /* Текст в шапке/футере — золотой/светлый */
    --header-text: #e1c543;  /* твой фирменный золотой */
    --header-text-hover: #ffd700; /* яркое золото при наведении */
    --header-text-active: #a0aec0; /* приглушённый серо-голубой для неактивных */

    /* Dropdown */
    --dropdown-bg: #3a5f8c;  /* чуть светлее шапки */
    --dropdown-border: #4a6d9a;
    --dropdown-item-hover: #4a6d9a;

    /* Кнопки — сохраним твою золотисто-коричневую палитру (стиль фэнтези) */
    --button-primary-bg: linear-gradient(to bottom, #8B4513, #5D4037);
    --button-primary-border: #a0522d;
    --button-primary-text: #e0c097;
    --button-primary-hover-bg: linear-gradient(to bottom, #a0522d, #6D4C41);
    --button-primary-hover-shadow: rgba(160, 82, 45, 0.95);

    /* Акцентный цвет */
    --accent-gold: #e1c543;

    /* Тени для кнопок (добавим, если было пусто) */
    --button-primary-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.theme-light {
    --bg: #121212;
    --main-bg: #1e1e1e;
    --text: #ffffff;
    --text-secondary: #6e6e6e;
    --border: #333;
    --header-bg: #303030;
    --header-text: #e1c543;
    --header-text-hover: #ffffff;
    --header-text-active: #666;
    --dropdown-bg: #303030;
    --dropdown-border: #444;
    --dropdown-item-hover: #444;
    --button-primary-bg: linear-gradient(to bottom, #8B4513, #5D4037);
    --button-primary-border: #a0522d;
    --button-primary-text: #e0c097;
    --button-primary-shadow: rgba(160, 82, 45, 0.7) ;
    --button-primary-hover-bg: linear-gradient(to bottom, #a0522d, #6D4C41);
    --button-primary-hover-shadow: rgba(160, 82, 45, 0.95);
    --footer-bg: #303030;
    --footer-text: #6e6e6e;
    --accent-gold: #e1c543;
}

/* Тёмная тема (по умолчанию) */
.theme-dark,
:root:not([data-theme]) {
    --bg: #121212;
    --main-bg: #1e1e1e;
    --text: #ffffff;
    --text-secondary: #6e6e6e;
    --border: #333;
    --header-bg: #303030;
    --header-text: #e1c543;
    --header-text-hover: #ffffff;
    --header-text-active: #666;
    --dropdown-bg: #303030;
    --dropdown-border: #444;
    --dropdown-item-hover: #444;
    --button-primary-bg: linear-gradient(to bottom, #8B4513, #5D4037);
    --button-primary-border: #a0522d;
    --button-primary-text: #e0c097;
    --button-primary-shadow: rgba(160, 82, 45, 0.7) ;
    --button-primary-hover-bg: linear-gradient(to bottom, #a0522d, #6D4C41);
    --button-primary-hover-shadow: rgba(160, 82, 45, 0.95);
    --footer-bg: #303030;
    --footer-text: #6e6e6e;
    --accent-gold: #e1c543;
}

/* ==================== НАЧАЛО СТРАНИЦЫ ==================== */
html {
    font-size: 10px
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

/* ==================== ШАПКА ==================== */
.header {
    display: block;
    left: 0;
    right: 0;
    top: 0;
    position: fixed;
    bottom: auto;
    background-color: var(--header-bg);
    z-index: 100;
}

.header-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    height: 6rem;
    width: 100rem;
    margin: 0 auto;
}

.header-logo {
    display: block;
    width: 30rem;
    margin-bottom: .1em;
}

.header-nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin-top: .1em;
    gap: 1.3rem;
}

.header-nav-item
{
    margin-right: 2.3rem;
    font-family: "Open Sans", sans-serif;
    display: block;
    color: var(--header-text);
    line-height: 1.1;
    text-transform: uppercase;
    background: none;
    border: none;
    font-weight: 400;
    font-size: 1.3rem;
    cursor: pointer;
}

.header-nav-item:hover {
    color: var(--header-text-hover);
    border-bottom-color: transparent
}

/* Неактивная (текущая) ссылка в навигации */
.header-nav-item.active,
.header-nav-item[aria-current="page"] {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    color: var(--header-text-active);
}

/* ==================== dropdown в шапке ==================== */

/* Контейнер dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

/* Основная ссылка dropdown */
.dropdown-toggle {
    padding-right: 2.4rem !important; /* место для стрелки */
    position: relative;
    margin-right: 0;
}

/* Стрелка (▼) */
.dropdown-toggle::after {
    content: "";
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #e1c543; /* цвет как у текста */
    transition: transform 0.3s ease;
}

/* Меню dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 0 0 6px 6px;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition:
            opacity 0.3s ease,
            visibility 0.3s ease,
            transform 0.3s ease;
    z-index: 101; /* выше хедера (z-index: 100) */
}

/* Элементы меню */
.dropdown-item {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--header-text);
    text-decoration: none;
    font-size: 1.1rem;
    font-family: "Open Sans", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.2s, color 0.2s;
}

/* Элементы меню при наведении */
.dropdown-item:hover {
    background: var(--dropdown-item-hover);
    color: var(--header-text-hover);
}

/* Показать меню при наведении */
.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Анимация стрелки */
.nav-dropdown:hover .dropdown-toggle::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Неактивное состояние для toggle */
.nav-dropdown:hover .dropdown-toggle,
.nav-dropdown .dropdown-toggle.active {
    color: #fff !important;
}

/* Стиль для активного пункта в dropdown */
.dropdown-item[aria-current="page"],
.dropdown-item.active {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.no-underline {
    text-decoration: none;
}

/* ==================== КНОПКА (ВХОД) В ШАПКЕ ==================== */
.auth {
    position: fixed;
    right: 3rem;
}

.auth-btn {
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    border: 2px solid var(--button-primary-border);
    box-shadow: 0 5px 22px var(--button-primary-shadow);
    padding: 1.0rem 1.0rem;
    font-size: 1.0rem;
    font-family: 'Cinzel', serif;
    font-weight: 300;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-btn:hover {
    background: var(--button-primary-hover-bg);
    box-shadow: 0 8px 30px var(--button-primary-hover-shadow);
    transform: scale(1.01) translateY(1px);
}

#logout-btn {
    background: var(--error); /* Красный цвет для опасных действий */
}

#logout-btn:hover {
    opacity: 0.8;
}

/* ==================== ГЛАВНЫЙ КОНТЕНТ ==================== */

.main {
    position: relative;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    width: 100%;
    min-height: 100vh;
}

/* Скрываем все секции, кроме активной */
.section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    padding: 0;
    margin: 0;
    animation: fadeIn 0.6s ease;

    height: calc(100vh - 9rem);
    overflow: hidden;
    /* Flexbox: колонка с распределением по вертикали */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    align-items: center;            /* ← Центрирует всё по горизонтали */

    box-sizing: border-box;
    margin-top: 6rem;
}

.section.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.content {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - 9rem);
    background: no-repeat center top;
    background-size: cover;
    z-index: 0;
}

.content .page {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    width: 70rem;
    margin: 0 auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ==================== ФУТЕР ==================== */

.footer {
    width: 100%;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    font-family: Arial, sans-serif;
    font-size: 1.2rem;
    height: 3rem;
    position: absolute;
    bottom: 0;
    z-index: 100;
}

.footer-logo {
    display: block;
    width: 7rem;
    margin-bottom: .1em;
}

.footer-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    height: 3rem;
    width: 100rem;
    margin: 0 auto;
}

/* ========== ВЫБОР ТЕМЫ В ФУТЕРЕ ========== */

.footer-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    float: right;
    right: 1rem;
    position: absolute;
}

.theme-dropdown {
    position: relative;
    display: inline-block;
}

.theme-toggle-btn {
    background: #303030;
    color: var(--accent-gold);
    border: 1px solid #444;
    padding: 0.5rem 1rem;
    font-family: "Open Sans", sans-serif;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.theme-toggle-btn:hover {
    background: #444;
}

.theme-dropdown-menu {
    position: absolute;
    bottom: 28px;
    left: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px 6px 0 0;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 101;
}

.theme-dropdown:hover .theme-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-dropdown-menu button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--accent-gold);
    text-align: left;
    font-family: "Open Sans", sans-serif;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.theme-dropdown-menu button:hover {
    background: #3a3a3a;
    color: white;
}

/* Основная ссылка dropdown */
.theme-dropdown-toggle {
    padding-right: 1.4rem !important; /* место для стрелки */
    position: relative;
    margin-right: 0;
}

/* Стрелка (▼) */
.theme-dropdown-toggle::after {
    content: "";
    position: absolute;
    right: 0.2rem;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid var(--accent-gold); /* цвет как у текста */
    transition: transform 0.3s ease;
}

/* Анимация стрелки */
.theme-dropdown:hover .theme-dropdown-toggle::after {
    transform: translateY(-50%) rotate(180deg);
}

/* ========== ВЫБОР ЯЗЫКА В ФУТЕРЕ ========== */

.lang-switcher {
    position: absolute;
    float: right;
    right: 2rem;
    z-index: 900;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-toggle {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #444;
    color: var(--accent-gold);
    height: 2.5rem;
    padding: 0 10px;
    border-radius: 20px; /* скруглённая "капсула" */
    font-family: "Open Sans", sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lang-toggle:hover {
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(225, 197, 67, 0.6);
}

.lang-icon {
    font-size: 1.7rem;
}

.lang-code {
    letter-spacing: 1px;
}

/* Меню dropdown */
.lang-dropdown-menu {
    position: absolute;
    bottom: 2.8rem;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 901;
    margin-top: 8px;
}

.lang-dropdown:hover .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #ccc;
    text-decoration: none;
    font-family: "Open Sans", sans-serif;
    font-size: 1.2rem;
    transition: background 0.2s, color 0.2s;
}

.lang-item:hover {
    background: #3a3a3a;
    color: var(--accent-gold);
}

/* ==================== СТРАНИЦА (ИГРАТЬ) ==================== */

#play {
    background:
            linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.0)),
            url('/css/img/1781149974.png') center/cover no-repeat;
}

#play .page {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    width: 70rem;
    margin: 0 auto;
}
/* Картинка слева с обтеканием */
.play-image {
    float: left;           /* ← Ключевое свойство */
    width: 35rem;
    height: auto;
    margin: 0 2rem 1.5rem 0; /* отступы: справа и снизу */
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    shape-outside: inset(0); /* для плавного обтекания (опционально) */
}

/* Текст */
#play p {
    font-size: 1.8rem;
    line-height: 1.7;
    color: #000000;
    margin: 0;
    text-align: justify;        /* ← Выравнивание по ширине */
    text-justify: inter-word;   /* ← Лучше работает в старых браузерах */
    hyphens: auto;              /* ← Перенос слов с дефисами (опционально) */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Очистка float после контента */
#play::after {
    content: "";
    display: table;
    clear: both;
}

/* Кнопка */
#play .intro-button {
    /* Пустой контейнер — нужен только для flex-распределения */
}

#play .start-btn {
    background: linear-gradient(to bottom, #8B4513, #5D4037);
    color: #e0c097;
    border: 2px solid #a0522d;
    padding: 1.5rem 2.2rem;
    font-size: 1.9rem;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.08em;
    box-shadow: 0 5px 22px rgba(160, 82, 45, 0.7);
    text-transform: uppercase;
}

#play .start-btn:hover {
    background: linear-gradient(to bottom, #a0522d, #6D4C41);
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 8px 30px rgba(160, 82, 45, 0.95);
}

#play .butt {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: end;    /* ← Выравнивание по правому краю */
    -ms-flex-align: end;
    align-items: flex-end;     /* ← Ключевое свойство */
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    height: 8rem;
}

/* ==================== СТРАНИЦА (НОВОСТИ) ==================== */

/* Новости */
.news-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.news-date {
    display: block;
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.news-card h3 {
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 1.4rem;
}
.news-card p {
    opacity: 0.9;
}

/* Skeleton loader */
.skeleton-news {
    height: 120px;
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}


.modal h2 {

}




/* ========== ПРОФИЛЬ ВИДЖЕТ ========== */
.profile-widget {
    position: relative;
    display: inline-block;
}

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #444;
    color: #e1c543;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-family: "Open Sans", sans-serif;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.profile-toggle:hover {
    background: rgba(50, 50, 50, 0.9);
}

.profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #444;
}

.profile-info {
    text-align: left;
    min-width: 0;
}

.profile-name {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.profile-arrow {
    transition: transform 0.2s;
    margin-left: 4px;
}

.profile-toggle[aria-expanded="true"] .profile-arrow {
    transform: rotate(180deg);
}

/* Dropdown меню */
.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 101;
    margin-top: 4px;
}

.profile-widget:hover .profile-dropdown,
.profile-widget:focus-within .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #ccc;
    text-decoration: none;
    font-family: "Open Sans", sans-serif;
    font-size: 1.2rem;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

.profile-menu-item:hover {
    background: #3a3a3a;
    color: #e1c543;
}

.profile-menu-item svg {
    flex-shrink: 0;
}

.profile-divider {
    border: none;
    border-top: 1px solid #444;
    margin: 4px 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .profile-name {
        max-width: 80px;
        font-size: 1rem;
    }

    .profile-toggle {
        padding: 4px 8px;
    }

    .profile-avatar {
        width: 24px;
        height: 24px;
    }
}