/* ==========================================================================
   Profile Page — Dark Theme
   ========================================================================== */

:root {
    font-size: 10px;
    --primarycolor: #f4a261;
    --secondarycolor: #0f3460;
    --bg-color: #1A1A2E;
    --text-white: #fff;
    --text-black: #000;
    --gradient: linear-gradient(to right, #f4a261, #b0c9d7);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    --transition: all 0.22s ease;
    --surface: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --radius-card: 8px;
    --radius-btn: 6px;
    --radius-badge: 4px;
}

html { scroll-behavior: smooth; }

body {
    background: linear-gradient(150deg, var(--bg-color) 0%, #16213e 100%);
    color: var(--text-white);
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

/* ── Page Layout ------------------------------------------------------------ */
.pf-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ── Hero Card -------------------------------------------------------------- */
.pf-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 36px 24px 28px;
    margin-bottom: 32px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.pf-hero__avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primarycolor);
    box-shadow: 0 0 0 5px rgba(244, 162, 97, 0.15);
    flex-shrink: 0;
}

.pf-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pf-hero__name {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
}

.pf-hero__email {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.45);
    margin: 0;
}

.pf-hero__coins {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,215,0,0.1);
    border: 1px solid rgba(255,215,0,0.25);
    border-radius: 100px;
    padding: 7px 18px;
    margin-top: 4px;
}

.pf-hero__coins i {
    color: #FFD700;
    font-size: 1.6rem;
}

.pf-hero__coins .pointcontainer {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFD700;
    line-height: 1;
}

.pf-hero__coins small {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.5);
}

/* ── Subscription Badge ---------------------------------------------------- */
.pf-sub {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: var(--radius-btn);
    margin-top: 4px;
    text-align: left;
}

.pf-sub--active {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
}

.pf-sub--pending {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
}

.pf-sub__icon {
    font-size: 2rem;
    flex-shrink: 0;
    color: #f59e0b;
}

.pf-sub__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-sub__text strong {
    font-size: 1.4rem;
    display: block;
}

.pf-sub--active  .pf-sub__text strong { color: #10b981; }
.pf-sub--pending .pf-sub__text strong { color: #f59e0b; }

.pf-sub__text span {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.55);
}

.pf-sub-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primarycolor);
    color: var(--text-black);
    font-weight: 700;
    font-size: 1.4rem;
    padding: 10px 22px;
    border-radius: var(--radius-btn);
    text-decoration: none;
    transition: var(--transition);
    margin-top: 4px;
}

.pf-sub-cta:hover {
    background: #e08830;
    color: var(--text-black);
    transform: translateY(-2px);
}

/* ── Settings Section ------------------------------------------------------ */
.pf-settings__title {
    font-size: 1.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pf-settings__title i { color: var(--primarycolor); }

/* ── Setting Card ---------------------------------------------------------- */
.pf-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
    transition: border-color 0.2s ease;
}

.pf-card:focus-within {
    border-color: rgba(244, 162, 97, 0.35);
}

.pf-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}

.pf-card__header i {
    color: var(--primarycolor);
    font-size: 1.4rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.pf-card__header span {
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}

.pf-card__body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pf-card__footer {
    padding: 12px 20px 16px;
    display: flex;
    justify-content: flex-end;
}

/* ── Form Elements --------------------------------------------------------- */
.pf-current-val {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    color: rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--border);
    border-radius: var(--radius-badge);
    padding: 8px 14px;
}

.pf-current-val strong {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
}

.pf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pf-label {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

.pf-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    color: var(--text-white);
    padding: 10px 14px;
    font-size: 1.4rem;
    font-family: inherit;
    transition: border-color 0.18s ease, background 0.18s ease;
    outline: none;
    box-sizing: border-box;
}

.pf-input::placeholder { color: rgba(255,255,255,0.25); }

.pf-input:focus {
    border-color: var(--primarycolor);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.12);
}

.pf-file-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: var(--radius-btn);
    color: rgba(255,255,255,0.6);
    padding: 10px 14px;
    font-size: 1.35rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    outline: none;
    box-sizing: border-box;
}

.pf-file-input:hover,
.pf-file-input:focus {
    border-color: var(--primarycolor);
    background: rgba(244,162,97,0.05);
}

.pf-hint {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.4);
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.5;
}

.pf-hint i { font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; color: rgba(255,255,255,0.3); }

/* ── Buttons --------------------------------------------------------------- */
.pf-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--primarycolor);
    color: var(--text-black);
    border: none;
    padding: 9px 22px;
    font-size: 1.35rem;
    font-weight: 700;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.pf-btn:hover {
    background: #e08830;
    color: var(--text-black);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(244,162,97,0.35);
}

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

.pf-btn--ghost {
    background: var(--surface);
    color: rgba(255,255,255,0.75);
    border: 1px solid var(--border);
}

.pf-btn--ghost:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-white);
    transform: none;
    box-shadow: none;
}

.pf-btn--danger {
    background: #e74c3c;
    color: #fff;
}

.pf-btn--danger:hover {
    background: #c0392b;
    color: #fff;
    box-shadow: 0 4px 14px rgba(231,76,60,0.35);
}

/* ── Modal ----------------------------------------------------------------- */
.pf-modal {
    background: #131c38;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    color: var(--text-white);
}

.pf-modal .modal-header {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
}

.pf-modal .modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-white);
}

.pf-modal .modal-body {
    padding: 20px;
}

.pf-modal .modal-footer {
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    gap: 8px;
}

.pf-modal__confirm {
    font-size: 1.4rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 16px;
}

/* ── Accessibility --------------------------------------------------------- */
*:focus-visible {
    outline: 2px solid var(--primarycolor);
    outline-offset: 2px;
}

.btn:focus,
.form-control:focus,
.pf-input:focus {
    outline: none;
}

/* ── Responsive ------------------------------------------------------------- */
@media (max-width: 600px) {
    .pf-page {
        padding: 20px 14px 50px;
    }

    .pf-hero {
        padding: 28px 16px 22px;
    }

    .pf-hero__avatar {
        width: 90px;
        height: 90px;
    }

    .pf-hero__name { font-size: 1.9rem; }

    .pf-card__header,
    .pf-card__body,
    .pf-card__footer { padding-left: 14px; padding-right: 14px; }

    .pf-sub { flex-direction: column; text-align: center; }
}

/* ── Spinner for loading state --------------------------------------------- */
.pf-btn.is-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.pf-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: var(--text-black);
    border-radius: 50%;
    animation: pfSpin 0.8s linear infinite;
}

@keyframes pfSpin {
    to { transform: rotate(360deg); }
}

/* Legacy compatibility (pointcontainer used in navbar JS) */
.pointcontainer {
    color: #FFD700;
    font-weight: 800;
}
