/* ============================================
   Watch4Together — Profile Page Styles
   ============================================ */

.profile-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

/* ---- Profile Card ---- */
.profile-card {
    background: rgba(14, 14, 24, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: cardIn 0.6s ease;
    position: relative;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
}

/* ---- Profile Top Section ---- */
.profile-top {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px 28px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(224, 115, 74, 0.3);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-username {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--text-primary);
}

.profile-email {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 10px;
}

.profile-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
}

.meta-badge.meta-plan {
    color: var(--amber-400);
    border-color: rgba(224, 115, 74, 0.2);
    background: rgba(224, 115, 74, 0.06);
}

.meta-plan svg {
    stroke: var(--amber-400);
}

/* ---- Profile Sections ---- */
.profile-sections {
    padding: 4px 0;
}

.profile-section {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-section:last-child {
    border-bottom: none;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-title svg {
    color: var(--amber-400);
}

.section-title.danger {
    color: #e84545;
}

.section-title.danger svg {
    stroke: #e84545;
}

/* ---- Info Grid ---- */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.info-item label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-item .info-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

/* ---- Change Password Form ---- */
.change-pw-form .form-group {
    margin-bottom: 14px;
}

.change-pw-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-change-pw {
    margin-top: 4px;
}

/* ---- Danger Zone ---- */
.danger-zone {
    background: rgba(232, 69, 69, 0.03);
}

.danger-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.danger-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.danger-item strong {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.danger-item p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.btn-danger-outline,
.btn-danger {
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-danger-outline {
    background: none;
    border: 1px solid rgba(232, 69, 69, 0.3);
    color: #e84545;
}

.btn-danger-outline:hover {
    background: rgba(232, 69, 69, 0.1);
    border-color: #e84545;
}

.btn-danger {
    background: #e84545;
    border: none;
    color: #fff;
}

.btn-danger:hover {
    background: #d13838;
    box-shadow: 0 4px 16px rgba(232, 69, 69, 0.3);
}

/* ---- User Nav Menu Styles (injected by auth-guard) ---- */
.user-nav-menu {
    position: relative;
}

.user-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 5px 14px 5px 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary, #faf0e6);
}

.user-nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(224, 115, 74, 0.3);
}

.user-nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0734a, #e84545);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.user-nav-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
}

.user-nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: rgba(14, 14, 24, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.user-nav-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(250, 240, 230, 0.85);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background: rgba(224, 115, 74, 0.1);
    color: #e0734a;
}

.dropdown-item svg {
    flex-shrink: 0;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .profile-top {
        flex-direction: column;
        text-align: center;
    }

    .profile-meta {
        justify-content: center;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .change-pw-form .form-row {
        grid-template-columns: 1fr;
    }

    .danger-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}