/* profile-responsive.css - Адаптивные стили для страницы профиля */

/* Бургер-меню для профиля */
.burger-menu {
    display: none;
}
.profile-nav ul {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

/* ============================================
   СТИЛИ ДЛЯ ИЗБРАННОГО (WISHLIST)
   Стиль: компактный список, без анимаций
   ============================================ */

/* Сетка избранного — список строк */
.wishlist-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    min-height: 200px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

/* Карточка товара — горизонтальная строка */
.wishlist-item {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    background: #ffffff;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.wishlist-item:last-child {
    border-bottom: none;
}

/* Кнопка удаления — всегда видна */
.wishlist-item .remove-wishlist {
    position: static;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
}

.wishlist-item .remove-wishlist:hover {
    background: #fee;
    color: #c00;
    border-color: #fcc;
}

/* Изображение товара — компактное */
.wishlist-item-image {
    width: 100px;
    height: 100px;
    min-width: 100px;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 6px;
}

.wishlist-item-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.wishlist-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Контент — в ряд */
.wishlist-item-content {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
}

.wishlist-item-content h4 {
    margin: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    min-height: auto;
}

.wishlist-item-content h4 a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wishlist-item-content h4 a:hover {
    color: #000;
    text-decoration: underline;
}

/* Цена — фиксированная ширина */
.wishlist-item-content .item-price {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    min-width: 90px;
    text-align: right;
}

/* Кнопка в корзину */
.wishlist-item-content .add-to-cart-wishlist {
    margin: 0;
    padding: 10px 18px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.wishlist-item-content .add-to-cart-wishlist:hover {
    background: #000;
}

.wishlist-item-content .add-to-cart-wishlist i {
    font-size: 14px;
}

.wishlist-item-content .add-to-cart-wishlist.btn-success {
    background: #2d7a3e;
    color: #fff;
}

.wishlist-item-content .add-to-cart-wishlist.btn-success:hover {
    background: #256b33;
}

/* Заголовок секции — лаконичный */
#wishlist .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

#wishlist .section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    color: #333;
    margin: 0;
    font-weight: 600;
}

#wishlist .section-header h2 i {
    color: #666;
    font-size: 20px;
}

#wishlist .section-header .btn,
#wishlist .section-header .add-all-to-cart-btn {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

#wishlist .section-header .btn:hover,
#wishlist .section-header .add-all-to-cart-btn:hover {
    background: #000;
}

#wishlist .section-header .btn:disabled,
#wishlist .section-header .add-all-to-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Пустое состояние — без анимаций */
.wishlist-grid .empty-state {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
}

.wishlist-grid .empty-state i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
    display: block;
}

.wishlist-grid .empty-state h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.wishlist-grid .empty-state p {
    font-size: 15px;
    color: #666;
    margin-bottom: 24px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.wishlist-grid .empty-state .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
}

.wishlist-grid .empty-state .btn:hover {
    background: #000;
}
/* Медиа-запросы для адаптивности профиля */
@media (max-width: 992px) {
    .profile-container {
        display: flex;
        
        flex-direction: column-reverse;
        gap: 30px;
    }

    
    .profile-sidebar {
        width: 100%;
        order: 2;
    }
    
    .profile-content {
        width: 100%;
        order: 1;
    }
    
    .profile-nav ul {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 10px;
    }
    
    .profile-nav li {
        margin-bottom: 0;
    }
    
    .profile-nav a {
        padding: 12px 15px;
        text-align: center;
        justify-content: center;
        border-radius: 8px;
        background-color: #f8f9fa;
        transition: all 0.3s;
    }
    
    .profile-nav a:hover,
    .profile-nav a.active {
        background-color: #f0f7d5;
        color: #313131;
    }
    
    .profile-stats {
        gap: 10px;
        margin-top: 25px;
        padding-top: 25px;
    }
    
    .profile-stats .stat-item {
        padding: 10px 12px;
        min-width: 70px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .order-filter {
        width: 100%;
        overflow-x: auto;
        display: flex;
        gap: 5px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        white-space: nowrap;
        padding: 8px 15px;
        font-size: 14px;
        background-color: #f0f0f0;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.3s;
    }
    
    .filter-btn:hover,
    .filter-btn.active {
        background-color: #d5e300;
        color: #313131;
    }
    
    .info-row {
        flex-direction: column;
        gap: 5px;
        padding: 12px 0;
    }
    
    .info-label {
        flex: none;
        font-weight: 600;
        color: #313131;
        font-size: 15px;
    }
    
    .info-value {
        flex: none;
        font-size: 16px;
        color: #555;
    }
    
    .preferences-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .pref-tag {
        padding: 6px 12px;
        background-color: #f0f0f0;
        border-radius: 20px;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s;
    }
    
    .pref-tag:hover,
    .pref-tag.active {
        background-color: #d5e300;
        color: #313131;
    }
    
    .order-card {
        padding: 20px;
        background-color: #f8f9fa;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .order-header {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 15px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
    }
    
    .order-id {
        font-weight: 600;
        color: #313131;
    }
    
    .order-date {
        color: #777;
        font-size: 14px;
    }
    
    .order-status {
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .status-processing {
        background-color: #fff3cd;
        color: #856404;
    }
    
    .status-delivered {
        background-color: #d4edda;
        color: #155724;
    }
    
    .order-total {
        font-weight: 700;
        color: #313131;
        margin-left: auto;
    }
    
    .order-actions {
        display: flex;
        gap: 10px;
        margin-top: 15px;
    }
    
    .btn-small {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .btn-outline {
        background-color: transparent;
        border: 2px solid #d5e300;
        color: #313131;
    }
    
    .wishlist-item {
        gap: 16px;
        padding: 12px 16px;
    }
    
    .wishlist-item-image {
        width: 80px;
        height: 80px;
        min-width: 80px;
    }
    
    .wishlist-item-content h4 {
        font-size: 15px;
    }
    
    .wishlist-item-content .item-price {
        font-size: 16px;
        min-width: 70px;
    }
    
    #wishlist .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    #wishlist .section-header h2 {
        font-size: 22px;
    }
    
    #wishlist .section-header .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }
    
    .header-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .logol {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    /* Панель навигации — согласовано с main.css */
    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
        z-index: 999;
        padding: 90px 28px 28px;
        padding-top: calc(90px + env(safe-area-inset-top, 0px));
        padding-bottom: 220px;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-left: 1px solid rgba(213, 227, 0, 0.15);
    }
    
    nav.show {
        right: 0;
    }
    
    nav.hide {
        right: -100%;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        margin-top: 8px;
    }
    
    nav ul li {
        margin-left: 0;
        width: 100%;
        padding: 0;
    }
    
    nav ul li a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 16px 0 16px 12px;
        color: rgba(255, 255, 255, 0.92);
        text-decoration: none;
        font-weight: 500;
        font-size: 1.05rem;
        letter-spacing: 0.02em;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        transition: color 0.25s ease, padding-left 0.25s ease, background-color 0.2s ease;
        border-left: 3px solid transparent;
        margin-left: -12px;
        padding-left: 12px;
    }
    nav ul li a i {
        width: 20px;
        text-align: center;
        opacity: 0.9;
    }
    nav ul li a:hover {
        color: #d5e300;
        padding-left: 16px;
        background-color: rgba(213, 227, 0, 0.06);
        border-left-color: #d5e300;
    }
    
    .cart-icon, .wishlist-icon {
        margin-left: 0 !important;
        display: flex;
        align-items: center;
    }
    .cart-icon a, .wishlist-icon a {
        flex: 1;
    }
    .cart-icon .cart-count, .wishlist-icon .wishlist-count {
        position: static;
        margin-left: 6px;
        flex-shrink: 0;
    }
    
    .user {
        position: fixed;
        bottom: 0;
        right: -100%;
        width: min(320px, 85vw);
        max-width: 320px;
        background: linear-gradient(0deg, #252525 0%, #1f1f1f 100%);
        padding: 20px 28px 28px;
        padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
        z-index: 1000;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    }
    
    .user.show {
        right: 0;
    }
    
    .user.hide {
        right: -100%;
    }
    
    /* Одна ссылка без dropdown — весь блок как кнопка */
    .user > a {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
        padding: 14px 20px;
        background-color: #d5e300;
        color: #1a1a1a;
        font-weight: 600;
        font-size: 1rem;
        border-radius: 8px;
        text-decoration: none;
        transition: background-color 0.2s ease, transform 0.2s ease;
        box-sizing: border-box;
    }
    .user > a:hover {
        background-color: #c4d000;
        transform: translateY(-1px);
    }
    
    /* Шапка: подменю профиля — как в main.css (сначала только строка с именем) */
    body > header .user .user-dropdown .dropdown-menu {
        display: none !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        min-width: unset !important;
        width: 100%;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        border-radius: 0;
        border: none;
        opacity: 0;
        pointer-events: none;
        transition: margin-top 0.2s ease, max-height 0.28s ease, opacity 0.2s ease;
    }
    body > header .user .user-dropdown--mobile-open .dropdown-menu {
        display: block !important;
        margin-top: 12px;
        max-height: 480px;
        opacity: 1;
        pointer-events: auto;
        overflow: visible;
    }

    body > header .user .user-dropdown {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
        padding: 0;
        background: transparent;
        gap: 0;
    }

    body > header .user .user-dropdown .user-link {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        min-height: 48px;
        padding: 14px 40px 14px 20px;
        box-sizing: border-box;
        border-radius: 8px;
        font-weight: 600;
        font-size: 1rem;
        text-decoration: none;
        transition: background-color 0.2s ease, color 0.2s ease;
        position: relative;
        background-color: #d5e300;
        color: #1a1a1a;
    }
    body > header .user .user-dropdown .user-link::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        right: 16px;
        font-size: 0.75rem;
        opacity: 0.85;
        transition: transform 0.2s ease;
    }
    body > header .user .user-dropdown--mobile-open .user-link {
        justify-content: flex-start;
        padding: 12px 40px 12px 14px;
        min-height: unset;
        background: rgba(213, 227, 0, 0.12);
        color: #d5e300;
    }
    body > header .user .user-dropdown--mobile-open .user-link::after {
        transform: rotate(180deg);
    }
    body > header .user .user-dropdown .user-link i {
        font-size: 1.25rem;
        opacity: 0.95;
    }
    body > header .user .user-dropdown .user-link:hover {
        filter: brightness(1.03);
    }
    body > header .user .user-dropdown--mobile-open .user-link:hover {
        background: rgba(213, 227, 0, 0.18);
        color: #e5f000;
    }
    
    .user .dropdown-menu a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px 12px 16px;
        color: rgba(255, 255, 255, 0.88);
        font-weight: 500;
        font-size: 0.95rem;
        text-decoration: none;
        border-radius: 6px;
        margin-top: 4px;
        border-left: 3px solid transparent;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }
    .user .dropdown-menu a i {
        width: 20px;
        text-align: center;
        opacity: 0.85;
    }
    .user .dropdown-menu a:hover {
        color: #d5e300;
        background: rgba(213, 227, 0, 0.08);
        border-left-color: #d5e300;
    }
    .user .dropdown-menu .divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
        margin: 10px 0;
        padding: 0;
    }
    .user .dropdown-menu .logout:hover {
        color: #ff6b6b;
        background: rgba(255, 107, 107, 0.1);
        border-left-color: #ff6b6b;
    }
    
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.55);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    .profile-nav ul {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        gap: 8px;
    }
    
    .profile-stats .stat-item {
        padding: 8px 10px;
        min-width: 60px;
    }
    
    .profile-stats .stat-value {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 2px;
    }
    
    .profile-stats .stat-label {
        font-size: 11px;
        color: #777;
    }
    
    .order-filter {
        gap: 5px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .wishlist-item {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
    }
    
    .wishlist-item-image {
        width: 70px;
        height: 70px;
        min-width: 70px;
    }
    
    .wishlist-item-content {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .wishlist-item-content h4 {
        font-size: 14px;
        flex: 1 1 100%;
    }
    
    .wishlist-item-content .item-price {
        font-size: 16px;
        min-width: auto;
        text-align: left;
    }
    
    #wishlist .section-header h2 {
        font-size: 20px;
    }
    
    .wishlist-grid .empty-state {
        padding: 50px 16px;
    }
    
    .wishlist-grid .empty-state i {
        font-size: 56px;
    }
    
    .wishlist-grid .empty-state h3 {
        font-size: 18px;
    }
    
    .wishlist-grid .empty-state p {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .profile-sidebar {
        padding: 20px;
    }
    
    .profile-content {
        padding: 20px;
    }
    
    .user-avatar {
        width: 80px;
        height: 80px;
    }
    
    .user-avatar i {
        font-size: 80px;
    }

    .avatar-change {
        width: 24px;
        height: 24px;
        font-size: 9px;
        right: -3px;
        bottom: -3px;
    }
    .avatar-change i {
        font-size: inherit;
    }

    .avatar-edit-hint {
        font-size: 10px;
        bottom: -16px;
        padding: 2px 7px;
    }
    
    .user-name {
        font-size: 20px;
    }
    
    .profile-nav ul {
        grid-template-columns: 1fr;
    }
    
    .profile-nav a {
        padding: 10px;
        font-size: 14px;
    }
    
    .profile-stats .stat-item {
        min-width: 0;
        flex: 1 1 80px;
    }
    
    .section-header h2 {
        font-size: 22px;
    }
    
    .order-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .order-total {
        margin-left: 0;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-edit {
        width: 100%;
    }
    
    .info-row {
        padding: 10px 0;
    }
    
    .preferences-tags {
        gap: 6px;
    }
    
    .pref-tag {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .wishlist-item-image {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }
    
    .wishlist-item-content h4 {
        font-size: 13px;
    }
    
    .wishlist-item-content .item-price {
        font-size: 15px;
    }
    
    .wishlist-item-content .add-to-cart-wishlist {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .wishlist-item .remove-wishlist {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .wishlist-grid .empty-state {
        padding: 40px 15px;
    }
    
    .wishlist-grid .empty-state i {
        font-size: 56px;
    }
    
    .wishlist-grid .empty-state h3 {
        font-size: 18px;
    }
    
    .wishlist-grid .empty-state p {
        font-size: 13px;
    }
    
    .wishlist-grid .empty-state .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .footer-column h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .profile-sidebar,
    .profile-content {
        padding: 15px;
    }
    
    .user-avatar {
        width: 70px;
        height: 70px;
    }
    
    .user-avatar i {
        font-size: 70px;
    }
    
    .avatar-change {
        width: 22px;
        height: 22px;
        font-size: 8px;
        right: -3px;
        bottom: -3px;
    }
    .avatar-change i {
        font-size: inherit;
    }

    .avatar-edit-hint {
        font-size: 9px;
        bottom: -14px;
        padding: 2px 6px;
    }
    
    .user-name {
        font-size: 18px;
    }
    
    .user-email {
        font-size: 13px;
    }
    
    .level-label {
        font-size: 11px;
    }
    
    .level-text {
        font-size: 11px;
    }
    
    .profile-nav a {
        padding: 8px;
        font-size: 13px;
    }
    
    .badge {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .btn-small {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .order-card {
        padding: 15px;
    }
    
    .order-id {
        font-size: 14px;
    }
    
    .order-date {
        font-size: 12px;
    }
    
    .order-status {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .order-total {
        font-size: 16px;
    }
    
    .item-price {
        font-size: 16px;
    }
    
    .item-meta {
        font-size: 13px;
    }
}

/* Стили для анимации появления элементов профиля */
.profile-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для активного состояния вкладок профиля */
.profile-nav a.active {
    background-color: #f0f7d5;
    color: #313131;
    font-weight: 600;
}
.editing-mode .info-value {
    padding: 5px 0;
}

.edit-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #d5e300;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
}

.edit-input:focus {
    outline: none;
    border-color: #313131;
}

.btn-save {
    background-color: #4CAF50 !important;
}

.btn-success {
    background-color: #4CAF50 !important;
    color: white !important;
}



.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    background: #f5f5f5;
}

.dropdown-menu .divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #666;
}

.empty-state p {
    color: #999;
    margin-bottom: 20px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
}

.dropdown-menu .divider {
    height: 1px;
    background-color: #f0f0f0;
    margin: 5px 0;
}

.logout {
    color: #dc3545;
}

.logout:hover {
    background-color: #fff5f5;
}

/* ============================================
   ТАБЛИЦА ЛИДЕРОВ
   ============================================ */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 4px;
}

.leaderboard-list::-webkit-scrollbar {
    width: 6px;
}

.leaderboard-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.leaderboard-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.leaderboard-card:hover {
    border-color: #d5e300;
    box-shadow: 0 4px 16px rgba(213, 227, 0, 0.15);
    transform: translateY(-2px);
}

.leaderboard-place {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    color: #555;
    flex-shrink: 0;
}

.leaderboard-place-1 .leaderboard-place { background: linear-gradient(135deg, #ffd700, #ffb300); color: #5d4e00; }
.leaderboard-place-2 .leaderboard-place { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #333; }
.leaderboard-place-3 .leaderboard-place { background: linear-gradient(135deg, #cd7f32, #b87333); color: #fff; }

.leaderboard-avatar-wrap {
    flex-shrink: 0;
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
}

.leaderboard-avatar-placeholder {
    width: 40px;
    height: 40px;
    font-size: 28px;
    color: #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaderboard-username {
    flex: 1;
    font-weight: 600;
    color: #333;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-level-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.leaderboard-me-badge {
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #d5e300, #b8cc00);
    color: #333;
    flex-shrink: 0;
}

.leaderboard-card-me {
    border-color: #d5e300;
    background: linear-gradient(135deg, rgba(213, 227, 0, 0.12) 0%, rgba(213, 227, 0, 0.05) 100%);
    box-shadow: 0 2px 12px rgba(213, 227, 0, 0.2);
}

.leaderboard-card-me:hover {
    border-color: #b8cc00;
    box-shadow: 0 4px 16px rgba(213, 227, 0, 0.25);
}

.leaderboard-loading,
.leaderboard-empty,
.leaderboard-error {
    text-align: center;
    padding: 3rem;
    color: #888;
}

.leaderboard-loading i,
.leaderboard-empty i,
.leaderboard-error i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
    color: #bbb;
}

.leaderboard-error {
    color: #c62828;
}

.leaderboard-error i {
    color: #c62828;
}

/* ============================================
   О УРОВНЕ
   ============================================ */
.about-level-content {
    --level-color: #95a5a6;
}

.about-level-card {
    background: linear-gradient(135deg, color-mix(in srgb, var(--level-color) 12%, #fff) 0%, color-mix(in srgb, var(--level-color) 6%, #fafafa) 100%);
    border-radius: 16px;
    padding: 24px;
    border-left: 4px solid var(--level-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.about-level-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.about-level-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.about-level-badge {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.about-level-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 28px;
    margin-bottom: 20px;
}

.about-level-stat {
    font-size: 14px;
    color: #555;
}

.about-level-stat i {
    margin-right: 8px;
    color: var(--level-color);
    width: 18px;
}

.level-progress-bar-wrapper {
    margin-top: 16px;
}

.about-level-card .level-progress-bar {
    height: 10px;
    background: color-mix(in srgb, var(--level-color) 18%, #e8e8e8);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.about-level-card .level-progress-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.5s ease;
}

.about-level-card .level-next-display {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.about-level-description,
.about-level-rewards {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.08);
}
.about-level-description h4,
.about-level-rewards h4 {
    font-size: 14px;
    margin: 0 0 8px;
    color: #444;
}
.about-level-description .level-rewards-text,
.about-level-rewards p,
.about-level-rewards .rewards-intro {
    font-size: 14px;
    color: #555;
    margin: 0 0 12px;
    line-height: 1.5;
}
.about-level-rewards .rewards-list {
    margin: 0 0 16px;
    padding-left: 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}
.about-level-rewards .rewards-list li {
    margin-bottom: 6px;
}
.about-level-rewards .rewards-list li.reward-with-code {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.about-level-rewards .rewards-list .reward-code {
    padding: 4px 8px;
    background: rgba(124,58,237,0.1);
    border: 1px dashed #7c3aed;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #5b21b6;
}
.about-level-rewards .rewards-list .btn-copy-inline {
    padding: 4px 8px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}
.about-level-rewards .rewards-list .btn-copy-inline:hover {
    background: #6d28d9;
}