/* ===================================
   PROFILE PAGE STYLES
   =================================== */

.profile-page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--light-bg) 0%, var(--white) 100%);
    padding: 2rem 0 4rem;
}

/* Profile Header */
.profile-header {
    background: var(--gradient-1);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    flex-shrink: 0;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.profile-header-info {
    flex: 1;
}

.profile-header-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.profile-level {
    margin: 0.5rem 0;
}

.level-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-block;
}

.profile-join-date {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.profile-header-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-action-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.profile-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.profile-action-btn.logout-btn {
    background: rgba(231, 76, 60, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.profile-action-btn.logout-btn:hover {
    background: #c0392b;
}

/* Profile Skill Level Section */
.profile-skill-level-section {
    margin-bottom: 3rem;
}

.skill-level-card {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.skill-level-badge {
    margin-bottom: 2rem;
}

.badge-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    font-size: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(88, 86, 214, 0.3);
}

.skill-level-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.skill-level-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* Profile Stats Section */
.profile-stats-section {
    margin-bottom: 3rem;
}

.profile-stats-section h2,
.profile-skills-section h2,
.profile-achievements-section h2,
.profile-activity-section h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.profile-stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.profile-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stat-card-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.stat-card-content {
    flex: 1;
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-card-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Skills Section */
.profile-skills-section {
    margin-bottom: 3rem;
}

.profile-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.profile-skill-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.profile-skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.skill-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.skill-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.skill-card-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.skill-card-bar {
    width: 100%;
    height: 12px;
    background: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
}

.skill-card-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 10px;
    transition: width 1s ease;
}

/* Achievements Section */
.profile-achievements-section {
    margin-bottom: 3rem;
}

.profile-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.profile-achievement-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.profile-achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.profile-achievement-card.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.profile-achievement-card.unlocked {
    background: var(--gradient-1);
    color: var(--white);
}

.achievement-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.achievement-card-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.achievement-card-desc {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Activity Section */
.profile-activity-section {
    margin-bottom: 3rem;
}

.profile-activity-list {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-bg);
    transition: all 0.3s ease;
}

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

.activity-item:hover {
    background: var(--light-bg);
    margin: 0 -1rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.activity-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.activity-description {
    font-size: 0.9rem;
    color: var(--text-light);
}

.activity-time {
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: nowrap;
}

.loading-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-style: italic;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .profile-header-info h1 {
        font-size: 2rem;
    }

    .profile-header-actions {
        width: 100%;
    }

    .profile-action-btn {
        width: 100%;
    }

    .profile-stats-grid {
        grid-template-columns: 1fr;
    }

    .profile-skills-grid {
        grid-template-columns: 1fr;
    }

    .profile-achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .activity-item {
        flex-direction: column;
        text-align: center;
    }

    .activity-time {
        margin-top: 0.5rem;
    }
}
