/* ===== PROFILE SCREEN ===== */

.profile-container {
    width: 100%;
    height: 100%;
    padding: 30px;
    overflow-y: auto;
    background: radial-gradient(ellipse at 50% 0%,
        rgba(255, 0, 110, 0.05) 0%,
        transparent 70%);
    position: relative;
}

.close-button {
    position: sticky;
    top: 20px;
    z-index: 100;
}

/* ===== PROFILE MAIN ===== */

.profile-main {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    margin-bottom: 60px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Profile Info */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: slideInLeft var(--transition-slow) ease-out;
}

/* Energy Core Large */
.profile-energy-core {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle,
        rgba(255, 0, 110, 0.1) 0%,
        rgba(0, 0, 0, 0.4) 100%);
    border: 2px solid var(--neon-pink);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 
        inset 0 0 40px rgba(255, 0, 110, 0.15),
        0 0 60px rgba(255, 0, 110, 0.3);
}

.core-large {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(255, 0, 110, 0.6));
    animation: corePulse 3s ease-in-out infinite;
}

/* Profile Stats */
.profile-stats {
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    box-shadow: 
        inset 0 0 25px rgba(0, 212, 255, 0.1),
        0 0 40px rgba(0, 212, 255, 0.2);
}

.profile-name {
    text-align: center;
    color: var(--neon-pink);
    text-shadow: 0 0 15px var(--neon-pink);
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--neon-pink);
    padding-bottom: 15px;
}

.profile-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.profile-stat-row:last-child {
    border-bottom: none;
}

.profile-stat-row .value {
    color: var(--neon-cyan);
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* Profile Sessions */
.profile-sessions {
    animation: slideInRight var(--transition-slow) ease-out;
}

.profile-sessions h3 {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    border-bottom: 2px solid var(--neon-cyan);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.session-item {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--neon-cyan);
    border-radius: 8px;
    display: grid;
    grid-template-columns: auto auto auto auto 1fr auto;
    gap: 15px;
    align-items: center;
    transition: all var(--transition-normal);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}

.session-item:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.2);
    transform: translateX(5px);
}

.session-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.session-type {
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
}

.session-type.fuse {
    background: rgba(255, 0, 110, 0.2);
    color: var(--neon-pink);
    border-left: 2px solid var(--neon-pink);
}

.session-type.voltage {
    background: rgba(255, 215, 0, 0.2);
    color: var(--neon-gold);
    border-left: 2px solid var(--neon-gold);
}

.session-type.circuit {
    background: rgba(0, 255, 136, 0.2);
    color: var(--neon-green);
    border-left: 2px solid var(--neon-green);
}

.session-accuracy {
    text-align: center;
    font-weight: 700;
    color: var(--neon-gold);
}

.session-rewards {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.reward-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.reward-badge.hearts {
    color: var(--neon-pink);
}

.reward-badge.diamonds {
    color: var(--neon-cyan);
}

/* ===== EVOLUTION PREVIEW ===== */

.evolution-preview {
    padding: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--neon-gold);
    border-radius: 15px;
    box-shadow: 
        inset 0 0 30px rgba(255, 215, 0, 0.1),
        0 0 50px rgba(255, 215, 0, 0.2);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.evolution-preview h3 {
    text-align: center;
    color: var(--neon-gold);
    text-shadow: 0 0 15px var(--neon-gold);
    margin-bottom: 30px;
    font-size: 1.3rem;
}

.evolution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.evolution-level {
    position: relative;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--neon-gold);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.evolution-level::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(0, 212, 255, 0.1) 0%,
        transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.evolution-level:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    transform: translateY(-5px);
}

.evolution-level:hover::before {
    opacity: 1;
}

.evolution-level.current {
    background: rgba(255, 0, 110, 0.2);
    border-color: var(--neon-pink);
    box-shadow: 
        inset 0 0 25px rgba(255, 0, 110, 0.2),
        0 0 40px rgba(255, 0, 110, 0.4);
    animation: glow 1.5s ease-in-out infinite;
}

.evolution-core {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.evolution-core svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 15px currentColor);
}

.evolution-label {
    text-align: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--neon-gold);
    position: relative;
    z-index: 1;
}

.evolution-hearts {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.evolution-level.locked {
    opacity: 0.4;
    pointer-events: none;
    border-color: var(--text-dark);
    background: rgba(0, 0, 0, 0.6);
}

/* Tooltip for evolution */
.evolution-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.9);
    color: var(--neon-gold);
    padding: 10px 15px;
    border: 1px solid var(--neon-gold);
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    z-index: 1000;
    box-shadow: 0 0 15px var(--neon-gold);
}

.evolution-level:hover .evolution-tooltip {
    opacity: 1;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1200px) {
    .profile-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .evolution-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    .profile-container {
        padding: 15px;
    }
    
    .profile-main {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .profile-info {
        gap: 20px;
    }
    
    .profile-sessions h3 {
        font-size: 1.1rem;
    }
    
    .session-item {
        grid-template-columns: auto auto;
        gap: 10px;
    }
    
    .session-time {
        grid-column: 1 / -1;
    }
    
    .evolution-preview {
        padding: 25px;
    }
    
    .evolution-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 15px;
    }
    
    .evolution-core {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 10px;
    }
    
    .profile-name {
        font-size: 1.2rem;
    }
    
    .evolution-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .evolution-level {
        padding: 10px;
    }
    
    .evolution-label {
        font-size: 0.65rem;
    }
    
    .session-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }
}
