/* KurilaBot - Темная тема для страницы профиля */

.profile-container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    background: #000000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #1a1a1a;
    padding-bottom: 60px; /* Отступ для нижнего меню */
    position: relative;
}

.profile-header {
    background: #1a1a1a;
    color: #ffffff;
    padding: 20px 15px;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, #00ffff, #ff00ff, #00ff00) 1;
    position: relative;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(0, 150, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0px;
}

.profile-details {
    flex: 1;
    text-align: left;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #666;
    border: 3px solid #333;
    position: relative;
    overflow: hidden;
}

.profile-avatar .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar-enhanced {
    transition: all 0.3s ease;
}

.profile-avatar-enhanced:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background-color: #28a745;
    z-index: 2;
}

.avatar-group {
    display: flex;
    align-items: center;
    gap: -15px;
}

.group-avatar {
    transition: transform 0.2s ease;
}

.group-avatar:hover {
    transform: scale(1.1);
    z-index: 10;
}

.avatar-count {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #6c757d;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #fff;
    border-radius: 50%;
}

.game-avatar {
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-avatar:hover {
    transform: scale(1.1);
    z-index: 10;
}

.animated-avatar {
    transition: all 0.3s ease;
}

.avatar-with-rating {
    position: relative;
}

.avatar-rating {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.avatar-rank {
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 10px;
    font-weight: bold;
    color: #666;
    background-color: white;
    padding: 2px 4px;
    border-radius: 3px;
}

.gradient-avatar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.gradient-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    animation: gradientShift 1s ease infinite;
}

.gradient-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.2), transparent, rgba(255,255,255,0.1));
    pointer-events: none;
    animation: shimmer 2s ease-in-out infinite;
}

.gradient-avatar::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 4s linear infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

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

.profile-avatar:hover {
    transform: scale(1.05);
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.profile-avatar img,
.profile-avatar video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    max-width: 100%;
    max-height: 100%;
}

.profile-avatar video {
    /* Дополнительные стили для видео аватарок */
    background: transparent;
    outline: none;
    border: none;
}

/* Анимация для анимированных аватарок */
.profile-avatar:hover video {
    transform: scale(1.02);
    transition: transform 0.15s ease; /* Ускорили с 0.3s до 0.15s */
}

/* Индикатор анимированной аватарки */
.profile-avatar[data-animated="true"]::after {
    content: '🎬';
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid #00ffff;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffffff;
}

.profile-username {
    font-size: 0.9rem;
    color: #cccccc;
}

/* Баланс в шапке */
.header-balance-section {
    display: flex;
    gap: 0;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-top: 15px;
}

.header-balance-card {
    background: rgb(42, 42, 42);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #00ffff;
    position: relative;
    flex: 1;
    max-width: 48%;
    transition: all 0.15s ease; /* Ускорили с 0.3s до 0.15s */
}

.header-balance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
    border-color: #00ff00;
}

.header-balance-card:last-child {
    border-color: #ffd700;
}

.header-balance-card:last-child:hover {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    border-color: #ff8c00;
}

.header-balance-card .balance-amount {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 2px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.header-balance-card .balance-label {
    font-size: 0.65rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Специальные стили для токенов в шапке */
.header-balance-card:last-child .balance-amount {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.header-balance-card:last-child::before {
    background: linear-gradient(90deg, #ffd700, #ff8c00, #ff4500);
}

/* Старые стили для баланса (если понадобятся) */
.balance-section {
    display: flex;
    gap: 15px;
    margin: 15px;
    flex-wrap: wrap;
}

.balance-card {
    background: #1a1a1a;
    color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #2a2a2a;
    position: relative;
    flex: 1;
    min-width: 150px;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #00ff00);
}

.balance-amount {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #00ffff;
}

.balance-label {
    font-size: 1rem;
    color: #cccccc;
}

/* Специальные стили для токенов */
.balance-card:last-child .balance-amount {
    color: #ffd700;
}

.balance-card:last-child::before {
    background: linear-gradient(90deg, #ffd700, #ff8c00, #ff4500);
}

/* Фиксированные стили для мобильных устройств */
@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }
    
    .profile-container {
        max-width: 100%;
        width: 100vw;
        margin: 0;
        border-radius: 0;
        border: none;
        overflow-x: hidden;
    }
    
    .profile-header {
        padding: 15px 10px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        border-radius: 0;
    }
    
    .profile-info {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
    }
    
    .profile-details {
        text-align: left;
        flex: 1;
        min-width: 0;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
        flex-shrink: 0;
    }
    
    .profile-name {
        font-size: 1rem;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .profile-username {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header-balance-section {
        display: flex;
        gap: 8px;
        margin-top: 10px;
        flex-wrap: nowrap;
    }
    
    .header-balance-card {
        padding: 6px 8px;
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 4px);
        box-sizing: border-box;
    }
    
    .header-balance-card .balance-amount {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header-balance-card .balance-label {
        font-size: 0.6rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Добавляем отступ для фиксированной шапки */
    .stats-grid {
        margin-top: 120px;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px;
}

.stat-card {
    background: #1a1a1a;
    border-radius: 6px;
    padding: 8px;
    text-align: left;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Убрали градиентную верхушку для stat-card */

.stat-card:hover {
    background: #2a2a2a;
}

.stat-icon {
    font-size: 1.2rem;
    color: #00ffff;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 1rem;
    font-weight: bold;
    color: #00ffff;
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: #cccccc;
    line-height: 1;
}

.achievements {
    margin: 15px;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #2a2a2a;
    position: relative;
}

/* Убрали градиентную верхушку для achievements */

.achievements h3 {
    color: #ffffff;
    margin-bottom: 8px;
    text-align: center;
    font-size: 1rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #2a2a2a;
    transition: all 0.15s ease; /* Ускорили с 0.3s до 0.15s */
}

.achievement-item:last-child {
    border-bottom: none;
}

.achievement-item:hover {
    background: #2a2a2a;
    border-radius: 6px;
    padding: 8px;
    margin: 0 -8px;
}

.achievement-icon {
    font-size: 1rem;
    margin-right: 8px;
    color: #ffffff;
}

.achievement-text {
    flex: 1;
}

.achievement-title {
    font-weight: bold;
    color: #ffffff;
    font-size: 0.8rem;
}

.achievement-desc {
    font-size: 0.7rem;
    color: #cccccc;
}

/* Back button styles are now in style.css */


/* Дополнительные мобильные стили */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 10px;
    }
    
    .achievements {
        margin: 10px;
        padding: 10px;
    }
    
    .achievement-item {
        padding: 4px 0;
    }
    
    .achievement-title {
        font-size: 0.75rem;
    }
    
    .achievement-desc {
        font-size: 0.65rem;
    }
}

/* Error State */
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #ffffff;
}

.error-message i {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 20px;
    display: block;
}

.error-message p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #cccccc;
}

.error-message .btn {
    background: #ff6b6b;
    border: none;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.error-message .btn:hover {
    background: #ff5252;
}