/* Profile Page */
#screen-profile {
    position: relative;
}

.profile-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
}

.avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.user-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--text-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 20px;
    color: #ffd700;
}

.stats i {
    font-size: 18px;
}

/* Level Progress Bar */
.level-progress-container {
    background: var(--app-bg-secondary, #1a1a2e);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
}

.level-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.level-badge {
    color: #ffd700;
}

.xp-text {
    font-size: 12px;
    color: var(--text-muted);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Base Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--card-border);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Favorite Slots */
.favorite-slots-container {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.favorite-slot {
    width: 100px;
    height: auto;
    aspect-ratio: 2/3;
    background: var(--card-bg);
    border: 2px dashed var(--card-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.favorite-slot.empty::after {
    content: '+';
    font-size: 32px;
    color: var(--text-muted);
}

.favorite-slot:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.favorite-slot-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    font-size: 10px;
    color: white;
    text-align: center;
    pointer-events: none;
}

/* Profile Settings Button */
.profile-settings-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 5;
}

.profile-settings-btn:hover {
    color: var(--primary-light);
    border-color: var(--primary-color);
    background: rgba(108, 92, 231, 0.15);
}

.profile-settings-btn:hover i {
    animation: settingsRotate 2s linear infinite;
}

.profile-settings-btn:active {
    transform: scale(0.92);
}

@keyframes settingsRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}