/* ============================================
   MY PROFILE PAGE STYLES
   ============================================ */

/* ---------- OVERLAY ---------- */
.my-profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    background: var(--bg-primary);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
    will-change: transform, opacity;
}

.my-profile-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Ambient background */


/* Content wrapper */
.my-profile-overlay-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--bg-primary) 30%,
        var(--bg-primary) 100%
    );
}

/* ---------- TOP BAR ---------- */
.my-profile-top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: calc(var(--safe-top) + 8px) 16px 8px 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.my-profile-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.my-profile-back-btn:hover {
    background-color: var(--bg-hover);
}

.my-profile-back-btn:active {
    background-color: var(--bg-active);
}

.my-profile-back-btn .material-icons-round {
    font-size: 2rem;    color: var(--text-primary);
    pointer-events: none;
}

.my-profile-top-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ---------- SCROLLABLE CONTENT ---------- */
.my-profile-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 32px 24px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* ---------- PROFILE HEADER ---------- */
.my-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    text-align: center;
}

.my-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: .4rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #b71c1c 100%);
    flex-shrink: 0;
}

.my-profile-avatar-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
}

.my-profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.my-profile-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.my-profile-username {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.my-profile-gender {
    font-size: 1.1rem;
    color: var(--text-tertiary);
}

/* ---------- EIQ SECTION ---------- */
.eiq-section {
    margin-bottom: 24px;
}

.eiq-score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--divider-color);
    border-radius: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.eiq-score-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.eiq-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.eiq-help {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    cursor: help;
}

.eiq-score-display {
    margin: 8px 0;
}

.eiq-score-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.eiq-rank-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent-light);
    border-radius: 20px;
}

.eiq-rank-icon {
    font-size: 1.5rem;
}

.eiq-rank-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* ---------- RANK SCALE ---------- */
.rank-scale {
    background: var(--bg-surface);
    border: 1px solid var(--divider-color);
    border-radius: 16px;
    padding: 20px;
}

.rank-scale-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.rank-scale-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rank-scale-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--divider-color);
    transition: all var(--transition-fast);
    border-radius: 6px;
}

.rank-scale-item:last-child {
    border-bottom: none;
}

.rank-scale-item:hover {
    background: var(--bg-hover);
}

.rank-scale-item.active-rank {
    background: var(--accent-light);
    border-bottom: 1px solid var(--accent-color);
}

.rank-scale-icon {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.rank-scale-range {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    min-width: 80px;
    flex-shrink: 0;
}

.rank-scale-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.rank-scale-item.active-rank .rank-scale-name {
    font-weight: 700;
    color: var(--accent-color);
}

/* ---------- POSITION CARD ---------- */
.position-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--divider-color);
    border-radius: 12px;
    margin-bottom: 24px;
}

.position-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: var(--accent-light);
    flex-shrink: 0;
}

.position-icon .material-icons-round {
    font-size: 2rem;    color: var(--accent-color);
}

.position-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.position-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.position-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.position-total {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ---------- ACADEMIC DETAILS ---------- */
.academic-details {
    margin-bottom: 24px;
}

.academic-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.academic-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.academic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--divider-color);
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.academic-item:hover {
    background: var(--bg-hover);
}

.academic-icon {
    font-size: 1.875rem;    color: var(--accent-color);
    flex-shrink: 0;
}

.academic-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 100px;
    flex-shrink: 0;
}

.academic-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
    flex: 1;
}

/* ---------- DESKTOP LAYOUT ---------- */
@media (min-width: 711px) {
    .my-profile-scroll {
        margin: 0 auto;
        width: 100%;
        padding: 0 48px 32px 48px;
    }
    
    .my-profile-header {
        flex-direction: row;
        gap: 24px;
        padding: 32px 0;
        text-align: left;
    }
    
    .my-profile-avatar {
        width: 100px;
        height: 100px;
        min-width: 100px;
    }
    
    .my-profile-info {
        text-align: left;
    }
    
    .academic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet */
@media (min-width: 711px) and (max-width: 1024px) {
    .my-profile-scroll {
        padding: 0 1rem 32px 1rem;
    }
    
    .academic-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- MOBILE RESPONSIVE ---------- */
@media (max-width: 710px) {
    .my-profile-scroll {
        padding: 0 .5rem 24px .5rem;
    }
    
    .my-profile-avatar {
        width: 72px;
        height: 72px;
    }
    
    .my-profile-avatar-text {
        font-size: 2.25rem;
    }
    
    .my-profile-name {
        font-size: 1.4rem;
    }
    
    .eiq-score-number {
        font-size: 2.6rem;
    }
    
    .rank-scale-item {
        padding: 8px 4px;
        gap: 8px;
    }
    
    .rank-scale-range {
        font-size: .9rem;
        min-width: 60px;
    }
    
    .rank-scale-name {
        font-size: 1.05rem;
    }
    
    .academic-item {
        padding: 12px;
        gap: 8px;
    }
    
    .academic-label {
        min-width: 80px;
        font-size: 0.95rem;
    }
    
    .academic-value {
        font-size: 0.95rem;
    }
}