/* =========================================================
   YOM-B-YOM PROFILE & PRIVACY STYLESHEET
   - User Profile Header & Statistics
   - Social Privacy & Visibility Controller
   - Showcase Preferences (Hobbies, Tasks, Projects, Habits)
   - Account Details & Settings
   - Responsive & Dark-Mode Optimized
   ========================================================= */

/* ================= 1. MAIN CONTAINER ================= */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= 2. PROFILE CARDS ================= */
.profile-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.profile-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(184, 115, 51, 0.35);
}

.profile-card-header {
    margin-bottom: 22px;
}

.profile-card h3 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-card p.card-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* ================= 3. PROFILE HEADER & AVATAR ================= */
.profile-header-flex {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    padding-bottom: 24px;
    border-bottom: 1.5px solid var(--border-light);
}

.profile-big-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--swatch-mocha), var(--swatch-umber));
    color: var(--swatch-pale-sand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 700;
    font-family: var(--font-title);
    box-shadow: 0 8px 20px rgba(43, 24, 9, 0.25);
    border: 3px solid rgba(255, 236, 198, 0.4);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-big-avatar:hover {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 12px 28px rgba(184, 115, 51, 0.35);
}

body.dark-mode .profile-big-avatar {
    background: linear-gradient(135deg, var(--swatch-sand), var(--swatch-chamois));
    color: var(--swatch-mahogany);
    border-color: rgba(255, 236, 198, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.profile-title-area {
    flex: 1;
    min-width: 220px;
}

.profile-title-area h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.profile-title-area p {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 1.05rem;
    font-weight: 500;
}

.profile-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.badge-tag {
    padding: 6px 14px;
    background: rgba(43, 24, 9, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.25s ease;
}

body.dark-mode .badge-tag {
    background: rgba(255, 236, 198, 0.08);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.privacy-badge {
    transition: all 0.3s ease;
    font-weight: 600;
}

/* ================= 4. STATS GRID ================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.stat-item {
    background: var(--bg-main);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.stat-item i {
    font-size: 26px;
    color: var(--accent);
    margin-bottom: 10px;
    display: inline-block;
    transition: transform 0.25s ease;
}

.stat-item:hover i {
    transform: scale(1.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-title);
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: capitalize;
}

/* ================= 5. PRIVACY & SOCIAL VISIBILITY ================= */
.privacy-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 14px;
}

.privacy-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-main);
    transition: all 0.25s ease;
    user-select: none;
    position: relative;
}

.privacy-card input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--accent);
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.privacy-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.privacy-card.selected,
.privacy-card:has(input[type="radio"]:checked) {
    border-color: var(--accent);
    background: rgba(184, 115, 51, 0.12);
    box-shadow: 0 0 0 1px var(--accent);
}

.privacy-card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.privacy-card-desc strong {
    color: var(--text-primary);
}

/* ================= 6. SHOWCASE ITEMS ================= */
.showcase-item-box {
    background: var(--bg-main);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.showcase-item-box:last-child {
    margin-bottom: 0;
}

.showcase-item-box:hover {
    border-color: rgba(184, 115, 51, 0.4);
}

.showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.showcase-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.showcase-title i {
    font-size: 1.2rem;
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    user-select: none;
    transition: color 0.2s ease;
}

.toggle-switch:hover {
    color: var(--text-primary);
}

.toggle-switch input {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ================= 7. FORMS & INPUT CONTROLS ================= */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.94rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background: #FAF4EB;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

body.dark-mode .form-control {
    background: var(--bg-card-alt);
    border-color: rgba(255, 236, 198, 0.18);
    color: #FFECC6;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.22);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* ================= 8. ACTIONS & BUTTONS ================= */
.profile-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
}

.btn-save-profile {
    background: var(--primary);
    color: #FFFFFF;
    padding: 13px 32px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(43, 24, 9, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .btn-save-profile {
    background: var(--accent);
    color: #2B1809;
}

.btn-save-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 24, 9, 0.28);
    filter: brightness(1.05);
}

.btn-save-profile:active {
    transform: translateY(0);
}

.btn-save-profile:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.profile-logout-btn {
    background: transparent;
    border: none;
    color: #C8615D;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.profile-logout-btn:hover {
    background: rgba(200, 97, 93, 0.12);
    transform: translateX(2px);
}

/* ================= 9. TOAST NOTIFICATION ================= */
.profile-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2E5339;
    color: #FFFFFF;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    z-index: 2000;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.profile-toast.show {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.profile-toast i {
    font-size: 1.25rem;
    color: #A9DFBF;
}

/* ================= 10. RESPONSIVE DESIGN ================= */
@media (max-width: 768px) {
    .profile-container {
        padding: 10px 14px 40px;
    }

    .profile-card {
        padding: 22px 18px;
    }

    .profile-header-flex {
        flex-direction: column;
        text-align: center;
        gap: 18px;
    }

    .profile-title-area {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profile-badges {
        justify-content: center;
    }

    .privacy-options-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-actions-bar {
        flex-direction: column;
        width: 100%;
    }

    .btn-save-profile {
        width: 100%;
        justify-content: center;
    }

    .profile-logout-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-item {
        padding: 14px 10px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .profile-toast {
        left: 15px;
        right: 15px;
        bottom: 20px;
        justify-content: center;
    }
}
