/* Стили для профиля пользователя и системы авторизации - OpenRust */

/* Avatar styles в верхнем меню */
.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 6px; /* Квадрат со скругленными углами */
    object-fit: cover;
    border: 1px solid white;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.user-avatar:hover {
    transform: scale(1.1);
}

/* User dropdown toggle (кнопка раскрытия с красной подложкой) */
.user-dropdown-toggle {
    padding: 0.5rem 1rem !important; /* Как в обычном nav-link */
    border-radius: 8px; /* Прямоугольник со скругленными углами */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 45px; /* Высота как у других кнопок навигации */
    background: var(--rust-primary) !important; /* Красная подложка */
}

.user-dropdown-toggle:hover {
    background: #b8361f !important; /* Темнее при наведении */
}

/* Имя пользователя в навигации - белым цветом на красном фоне */
.user-dropdown-toggle .user-name {
    color: white;
    font-weight: 500;
}

/* Стрелка выпадающего меню - белая */
.custom-dropdown-arrow {
    color: white;
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.show .custom-dropdown-arrow {
    transform: rotate(180deg); /* Переворачиваем при открытии */
}

/* User dropdown styles */
.nav-link.dropdown-toggle::after {
    display: none; /* Убираем стандартную стрелочку */
}

/* Убираем треугольник сверху в выпадающем меню */
.user-dropdown::before {
    display: none;
}

.user-dropdown {
    background: linear-gradient(135deg, 
        rgba(42, 42, 34, 0.95), 
        rgba(25, 30, 24, 0.95));
    border: 2px solid var(--rust-primary);
    border-radius: 12px;
    padding: 0;
    min-width: 280px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    margin-top: 12px;
    overflow: hidden;
    animation: dropdown-reveal 0.3s ease-out forwards;
}

@keyframes dropdown-reveal {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User header section */
.user-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid rgba(206, 66, 43, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
    background: rgba(25, 30, 24, 0.5);
}

.user-dropdown-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(206, 66, 43, 0.05) 0%, 
        rgba(115, 141, 69, 0.05) 100%);
    z-index: -1;
}

.username-avatar {
    width: 80px;
    height: 80px;
    border-radius: 10px; /* Квадрат со скругленными углами */
    object-fit: cover;
    border: 3px solid var(--rust-primary);
    margin: 0 auto 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.username-display {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
    margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.steamid-display {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 5px 0 0;
    opacity: 0.7;
}

/* User body section */
.user-dropdown-body {
    padding: 20px;
    position: relative;
}

/* User balance display */
.user-balance {
    background: linear-gradient(145deg, 
        rgba(25, 30, 24, 0.7) 0%, 
        rgba(42, 42, 34, 0.7) 100%);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 10px; /* Уменьшил отступ снизу */
    border: 1px solid rgba(150, 208, 49, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.4);
}

.balance-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.balance-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--rust-accent);
    text-shadow: 0 2px 8px rgba(150, 208, 49, 0.4);
    line-height: 1;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.balance-currency {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.8;
}

.balance-value .fa-coins {
    color: var(--rust-accent);
    font-size: 1.2rem;
    margin-right: 5px;
}

/* Уменьшил отступ у блока с кнопкой профиля */
.profile-btn-wrapper {
    margin-bottom: 5px;
}

/* User footer section */
.user-dropdown-footer {
    border-top: 1px solid rgba(206, 66, 43, 0.3);
    padding: 15px 20px;
    background: rgba(25, 30, 24, 0.5);
}

/* Responsive styles */
@media (max-width: 768px) {
    .user-dropdown {
        min-width: 260px;
        margin-right: 10px;
    }
    
    .username-display {
        font-size: 1.1rem;
    }
}