/* === PROFILE TAB ======================================================= */

#profile-tab {
    background: var(--bg);
    min-height: 100vh;
    padding: 18px 16px 100px;
    color: var(--white);
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}


#profile-tab h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 20px 4px 10px;
    letter-spacing: 0.02em;
}


.profile-section.main-block {
    background: var(--surface-light);
    border-radius: 22px;
    padding: 6px 0;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
}

.profile-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-field > span:first-child {
    font-size: 0.98rem;
    font-weight: 400;
}

.profile-value {
    font-size: 0.98rem;
    font-weight: 500;
    color: #f5f0ff;
    text-align: right;
}


.profile-field.editable {
    cursor: pointer;
}

.profile-field.editable:hover {
    background: rgba(255, 47, 146, 0.06);
}

.edit-btn {
    font-size: 0.9rem;
    margin-left: 6px;
    opacity: 0.7;
}

/* === SWITCH (notifications) =========================================== */

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: #3a3643;
    transition: 0.25s;
}

.slider:before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    background: var(--white);
    transition: 0.25s;
}

.switch input:checked + .slider {
    background: linear-gradient(90deg, var(--primary), #c66bff);
    box-shadow: 0 0 12px rgba(255, 47, 146, 0.6);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* === OTHER LINKS ======================================================= */

.profile-link {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.profile-link:last-child {
    border-bottom: none;
}

.profile-link:hover:not(.inactive) {
    background: rgba(255, 47, 146, 0.06);
}

.profile-link.inactive {
    opacity: 0.4;
    cursor: default;
}

.profile-link.report {
    color: #ff7c9e;
    font-weight: 600;
}

.external-link::before,
.support-link::before,
.report-link::before {
    content: "›";
    font-size: 1rem;
    opacity: 0.7;
}

/* === ACCOUNT / SUBSCRIPTION =========================================== */

.sub-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}


.sub-status.inactive {
    background: rgba(255, 255, 255, 0.04);
    color: #e0daff;
}

.sub-activate,
.sub-status.active{
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(90deg, var(--primary), #c66bff);
    box-shadow: 0 0 14px rgba(255, 47, 146, 0.6);
    cursor: pointer;
    white-space: nowrap;
}

.sub-status.active {
    padding: 4px 6px;
    cursor: none;

}

.sub-activate:active {
    transform: translateY(1px);
    box-shadow: 0 0 8px rgba(255, 47, 146, 0.4);
}


.profile-section.main-block .profile-field:nth-child(2) {
    cursor: pointer;
}

.profile-section.main-block .profile-field:nth-child(2):hover {
    background: rgba(255, 47, 146, 0.06);
}


#profile-tab .profile-section.main-block:last-of-type .profile-field {
    cursor: pointer;
}

#profile-tab .profile-section.main-block:last-of-type .profile-field:hover {
    background: rgba(255, 47, 146, 0.06);
}

/* === PROFILE EDIT MODAL =============================================== */

:root {
    --pe-bg: var(--surface-light);
    --pe-panel: #1f1e23;
    --pe-border: #35313a;
    --pe-text: #f5f0ff;
    --pe-muted: #b4adc9;
    --pe-grad-a: var(--primary);
    --pe-grad-b: #c66bff;
}

.profile-edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    z-index: 1000;
}

.profile-edit-overlay.hidden {
    display: none;
}

.profile-edit-shell {
    width: min(92vw, 420px);
    max-height: 460px;
    background: var(--pe-bg);
    color: var(--pe-text);
    border: 1px solid var(--pe-border);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-edit-shell,
.profile-edit-shell * {
    box-sizing: border-box;
}

/* header */

.profile-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--pe-border);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#pe-title {
    font-size: 1.02rem;
}

#pe-close {
    background: #2d2c31;
    color: var(--pe-text);
    border: 1px solid var(--pe-border);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}


.profile-edit-body {
    padding: 14px 18px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}


.pe-label {
    font-size: 0.78rem;
    color: var(--pe-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


.pe-current {
    background: var(--pe-panel);
    border: 1px solid var(--pe-border);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--pe-text);
    word-break: break-word;
    font-size: 0.96rem;
}

/* input */

#pe-input {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 2px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--pe-border);
    background: var(--pe-panel);
    color: var(--pe-text);
    font-size: 0.96rem;
    outline: none;
    font-family: inherit;
}

#pe-input::placeholder {
    color: #8f88a8;
}

#pe-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(255, 47, 146, 0.4);
}

/* language select */

.pe-select-row {
    position: relative;
    margin-top: 4px;
}

.pe-select {
    width: 100%;
    appearance: none;
    background: var(--pe-panel);
    color: var(--pe-text);
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid var(--pe-border);
    font-size: 0.96rem;
    font-weight: 500;
    outline: none;
}

.pe-select-row::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid #b9b3ff;
    pointer-events: none;
}

/* gender pills */

.pe-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.pe-radio {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--pe-panel);
    border: 1px solid var(--pe-border);
    border-radius: 999px;
    padding: 7px 12px;
    cursor: pointer;
    user-select: none;
    color: var(--pe-text);
}

.pe-radio input {
    display: none;
}

.pe-radio span {
    font-size: 0.9rem;
}

.pe-radio input:checked + span,
.pe-radio input:checked ~ span {
    background: linear-gradient(90deg, var(--pe-grad-a), var(--pe-grad-b));
    border-radius: 999px;
    padding: 3px 10px;
    box-shadow: var(--shadow-glow);
}


.profile-edit-actions {
    padding: 8px 18px 14px;
    flex-shrink: 0;
}

.pe-btn-gradient {
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 11px 0;
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background-image: linear-gradient(135deg, var(--pe-grad-a), var(--pe-grad-b));
    box-shadow: 0 8px 30px rgba(122, 107, 255, 0.45);
    cursor: pointer;
    transition: transform 0.06s ease;
}

.pe-btn-gradient:active {
    transform: translateY(1px);
}

.profile-value-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

#profile-copy {
    background-color: transparent;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

#profile-copy:hover {
    color: #4CAF50;
    transform: scale(1.1);
}

#profile-copy:active {
    transform: scale(0.9);
}

#profile-copy:before {
    content: "⧉";
}

#profile-copy[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
}

.profile-value-support {
    width: 100%;
    border: none;
    border-radius: 26px;
    padding: 4px 6px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background-image: linear-gradient(135deg, var(--pe-grad-a), var(--pe-grad-b));
    box-shadow: 0 8px 30px rgba(122, 107, 255, 0.45);
    cursor: pointer;
    transition: transform 0.06s ease;
}