/* profile.css - Inner World profile page */

/* ==================== AUTH GATE ==================== */

.profile-auth-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 40px 20px;
    text-align: center;
    color: #333;
}

.profile-auth-gate h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.profile-auth-gate p {
    color: #666;
    font-size: 15px;
    margin-bottom: 28px;
}

.profile-signin-btn {
    padding: 12px 28px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.profile-signin-btn:hover {
    background: #4f46e5;
}

/* ==================== LAYOUT ==================== */

.profile-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

.profile-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 28px;
    transition: opacity 0.15s;
}

.profile-back-link:hover {
    opacity: 0.75;
}

.profile-header {
    margin-bottom: 36px;
}

.profile-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.profile-header-sub {
    color: #64748b;
    font-size: 16px;
    line-height: 1.5;
}

/* ==================== LOADING ==================== */

.profile-loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.profile-loading p {
    margin-top: 16px;
    font-size: 15px;
}

.profile-loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.profile-loading-dots span {
    width: 8px;
    height: 8px;
    background: #6366f1;
    border-radius: 50%;
    animation: bounce 1.2s infinite ease-in-out;
}

.profile-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.profile-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ==================== EMPTY STATE ==================== */

.profile-empty {
    text-align: center;
    padding: 60px 20px;
    color: #555;
}

.profile-empty i {
    font-size: 48px;
    color: #6366f1;
    margin-bottom: 20px;
    display: block;
}

.profile-empty h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.profile-empty p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 28px;
}

.profile-cta-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #6366f1;
    color: #fff;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.profile-cta-btn:hover {
    background: #4f46e5;
}

/* ==================== SECTIONS ==================== */

.profile-section {
    margin-bottom: 24px;
}

.profile-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-section-title i {
    color: #6366f1;
    font-size: 16px;
}

.profile-section-desc {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ==================== REFLECTION ==================== */

.reflection-section {
    margin-bottom: 28px;
}

.reflection-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 16px;
    padding: 32px;
}

.reflection-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6366f1;
    margin-bottom: 16px;
}

.reflection-text {
    font-size: 16px;
    line-height: 1.8;
    color: #2d3748;
    white-space: pre-wrap;
}

.reflection-text p {
    margin-bottom: 14px;
}

.reflection-text p:last-child {
    margin-bottom: 0;
}

.reflection-updated {
    margin-top: 20px;
    font-size: 12px;
    color: #94a3b8;
}

/* ==================== PARTS ==================== */

.parts-empty {
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    color: #64748b;
    font-size: 14px;
    text-align: center;
    line-height: 1.6;
}

.parts-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.parts-group {
    margin-bottom: 8px;
}

.parts-group-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.parts-group-label.managers { color: #0284c7; }
.parts-group-label.firefighters { color: #dc2626; }
.parts-group-label.exiles { color: #7c3aed; }

.parts-group-label .group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.parts-group-label.managers .group-dot { background: #0284c7; }
.parts-group-label.firefighters .group-dot { background: #dc2626; }
.parts-group-label.exiles .group-dot { background: #7c3aed; }

.parts-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.part-card {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.part-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.part-card.managers { border-left: 3px solid #0284c7; }
.part-card.firefighters { border-left: 3px solid #dc2626; }
.part-card.exiles { border-left: 3px solid #7c3aed; }

.part-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.part-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin-top: 6px;
    display: none;
}

.part-card.expanded .part-desc {
    display: block;
}

.part-expand-icon {
    float: right;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 2px;
    transition: transform 0.2s;
}

.part-card.expanded .part-expand-icon {
    transform: rotate(180deg);
}

/* ==================== STATS ==================== */

.stats-row {
    display: flex;
    gap: 16px;
}

.stat-card {
    flex: 1;
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #6366f1;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
}

/* ==================== DISCLAIMER ==================== */

.profile-disclaimer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.profile-disclaimer i {
    color: #94a3b8;
    margin-top: 2px;
    flex-shrink: 0;
}

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

@media (max-width: 600px) {
    .profile-container {
        padding: 24px 16px 60px;
    }

    .profile-header h1 {
        font-size: 26px;
    }

    .reflection-card {
        padding: 24px 20px;
    }

    .stats-row {
        flex-direction: column;
    }
}
