/* character_profile.css */
.profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    z-index: 2000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    /* overlay itself doesn't scroll */
    color: #fff;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.profile-overlay.active {
    display: flex;
    opacity: 1;
}

.profile-container {
    flex: 1 1 auto;
    overflow-y: auto;
    max-width: 800px;
    width: 100%;
    margin: 40px auto 0;
    padding: 0 24px 24px;
    position: relative;
}

.profile-close-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2100;
    transition: all 0.3s ease;
}

.profile-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Header Section */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
}

.profile-avatar-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 48px;
    object-fit: cover;
    border: 4px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.profile-avatar-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 48px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, transparent 70%);
    z-index: -1;
    filter: blur(30px);
}

.profile-info h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-tagline {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    max-width: 500px;
}

/* Stats Section */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.3);
}

.stat-icon {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--gold, #ffd700);
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Details Section */
.profile-bio-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 32px;
    padding: 32px;
    margin-bottom: 40px;
}

.profile-bio-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bio-content {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    white-space: pre-line;
}

/* Recent Performances */
.recent-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 12px;
    width: 16px;
    height: 16px;
    background: #000;
    border: 3px solid var(--gold);
    border-radius: 50%;
    z-index: 1;
}

.timeline-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s ease;
}

.timeline-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.room-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}

.room-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.room-summary {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Actions - unified horizontal bar at the bottom */
.profile-actions {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2200;
}

.btn-profile {
    padding: 0 40px;
    height: 56px;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-profile-primary {
    background: var(--gold);
    color: #000;
    border: none;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.btn-profile-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

.btn-profile-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-profile-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}