/* ================================
   STEPsART — ME
   ================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #F5FAFA;
    color: #302B3D;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}


/* ================================
   PAGE
   ================================ */

.screen {
    min-height: 100vh;
}

.me-screen {
    max-width: 430px;
    margin: 0 auto;
    padding: 28px 20px 95px;
}


/* ================================
   HEADER
   ================================ */

.me-header {
    margin-bottom: 28px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: #8B7AB8;
}

.tagline {
    margin-top: 6px;
    color: #72608B;
    font-size: 14px;
}


/* ================================
   CONTENT
   ================================ */

.me-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


/* ================================
   PROFILE CARD
   ================================ */

.profile-card {
    background: #302B3D;
    color: #FFFFFF;

    border-radius: 24px;
    padding: 22px;

    display: flex;
    align-items: center;
    gap: 14px;

    box-shadow: 0 8px 24px rgba(48, 43, 61, 0.08);
}

.profile-avatar {
    width: 58px;
    height: 58px;

    border-radius: 50%;

    background: #8B7AB8;
    color: #FFFFFF;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
    font-weight: 700;

    flex-shrink: 0;
}

.profile-info {
    min-width: 0;
    flex: 1;
}

.profile-info h1 {
    font-size: 20px;
    margin-bottom: 5px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-info p {
    color: #C9C3D2;
    font-size: 13px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edit-profile-btn {
    border: none;
    background: #FFFFFF;
    color: #302B3D;

    padding: 8px 14px;
    border-radius: 999px;

    font-size: 13px;
    font-weight: 600;

    flex-shrink: 0;
}


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

.stats-card {
    background: #FFFFFF;

    border: 1px solid #E5EEEE;
    border-radius: 20px;

    padding: 20px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    box-shadow: 0 6px 18px rgba(48, 43, 61, 0.04);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-item + .stat-item {
    border-left: 1px solid #E5EEEE;
    padding-left: 20px;
}

.stat-item strong {
    font-size: 24px;
    color: #302B3D;
}

.stat-item span {
    color: #72608B;
    font-size: 12px;
}


/* ================================
   SETTINGS SECTION
   ================================ */

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-section h2 {
    font-size: 15px;
    margin-left: 4px;
}


/* ================================
   SETTING ROW
   ================================ */

.setting-row {
    width: 100%;

    border: 1px solid #E5EEEE;
    border-radius: 18px;

    background: #FFFFFF;
    color: #302B3D;

    padding: 17px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    text-align: left;

    box-shadow: 0 5px 16px rgba(48, 43, 61, 0.03);
}

.setting-row > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-row strong {
    font-size: 14px;
}

.setting-row span {
    color: #A090AE;
    font-size: 12px;
}

.row-arrow {
    color: #8B7AB8 !important;
    font-size: 24px !important;
}

.logout-text {
    color: #8B7AB8;
}

/* ================================
   HISTORY DROPDOWN
   ================================ */

.history-dropdown {
    background: #FFFFFF;
    border: 1px solid #E5EEEE;
    border-radius: 18px;
    padding: 12px;
}

.history-tabs {
    display: flex;
    gap: 6px;
    background: #F5FAFA;
    border-radius: 12px;
    padding: 4px;
}

.history-tab {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 9px;
    padding: 9px 5px;
    font-size: 11px;
    color: #A090AE;
    cursor: pointer;
}

.history-tab.active {
    background: #8B7AB8;
    color: #FFFFFF;
}

.history-summary {
    text-align: center;
    padding: 18px 0 12px;
}

.history-summary strong {
    display: block;
    font-size: 25px;
    color: #302B3D;
}

.history-summary span {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    color: #A090AE;
}

.history-chart {
    height: 90px;
    display: flex;
    align-items: end;
    justify-content: space-around;
    gap: 6px;
    padding: 10px 4px;
}

.history-bar-wrap {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    gap: 5px;
}

.history-bar {
    width: 12px;
    min-height: 8px;
    border-radius: 5px 5px 3px 3px;
    background: #D8D0E8;
}

.history-bar.hot {
    background: #8B7AB8;
}

.history-bar-wrap span {
    font-size: 8px;
    color: #A090AE;
}

/* ================= SOUND ================= */

.sound-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sound-dropdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sound-option {
    width: 100%;
    border: none;
    background: transparent;
    border-radius: 13px;
    padding: 11px;
    display: flex;
    align-items: center;
    gap: 11px;
    text-align: left;
    cursor: pointer;
}

.sound-option:hover,
.sound-option.active {
    background: #F0ECF7;
}

.sound-option > span:first-child {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #F5FAFA;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-option div {
    flex: 1;
}

.sound-option strong {
    display: block;
    font-size: 12px;
    color: #302B3D;
}

.sound-option small {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    color: #A090AE;
}

.sound-check {
    color: #8B7AB8;
    font-weight: bold;
}

.custom-sound-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px;
    border-radius: 13px;
    background: #F5FAFA;
    cursor: pointer;
}

.custom-sound-btn > span {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #F0ECF7;
    color: #8B7AB8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.custom-sound-btn div {
    flex: 1;
}

.custom-sound-btn strong {
    display: block;
    font-size: 12px;
}

.custom-sound-btn small {
    display: block;
    margin-top: 3px;
    color: #A090AE;
    font-size: 9px;
}


/* TOGGLE */

.switch {
    position: relative;

    width: 44px;
    height: 24px;

    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;

    background: #E5EEEE;

    border-radius: 999px;

    transition: 0.2s;
}

.slider::before {
    content: "";

    position: absolute;

    width: 18px;
    height: 18px;

    left: 3px;
    top: 3px;

    background: #FFFFFF;

    border-radius: 50%;

    transition: 0.2s;

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.switch input:checked + .slider {
    background: #8B7AB8;
}

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


/* ================================
   BOTTOM NAV
   ================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;

    transform: translateX(-50%);

    width: 100%;
    max-width: 430px;

    height: 70px;

    background: #FFFFFF;

    border-top: 1px solid #E5EEEE;

    display: flex;
    align-items: center;
    justify-content: space-around;

    z-index: 100;
}

.nav-item {
                text-decoration: none;
                text-align: center;
                font-size: 12px;
                color: #a090ae;
                cursor: pointer;
                transition: color 0.2s ease;
            }

            .nav-icon {
                width: 23px;
                height: 23px;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .nav-icon svg {
                width: 23px;
                height: 23px;
                fill: none;
                stroke: currentColor;
                stroke-width: 1.7;
                stroke-linecap: round;
                stroke-linejoin: round;
            }

            .nav-item {
                color: #A090AE;
                text-decoration: none;
            }

            .nav-item.active {
                color: #8B7AB8;
            }

            .nav-item small {
                font-size: 10px;
                margin-top: 3px;
            }


/* ================================
   HIDDEN
   ================================ */

.hidden {
    display: none !important;
}


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

.edit-screen {
    max-width: 430px;
    margin: 0 auto;

    padding: 28px 20px 40px;
}

.form-wrap {
    width: 100%;
}

.back-btn {
    border: none;
    background: none;

    color: #72608B;

    font-size: 14px;

    margin-bottom: 24px;
}

.form-wrap h1 {
    margin-top: 28px;

    font-size: 28px;
    line-height: 1.15;
}

.subtext {
    margin-top: 8px;
    margin-bottom: 24px;

    color: #72608B;
    font-size: 14px;
}


/* ================================
   EDIT PHOTO
   ================================ */

.edit-photo {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 10px;

    margin-bottom: 24px;
}

.profile-avatar.large {
    width: 86px;
    height: 86px;

    font-size: 30px;
}

.text-btn {
    border: none;
    background: none;

    color: #8B7AB8;

    font-size: 13px;
    font-weight: 600;
}


/* ================================
   FORM FIELDS
   ================================ */

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;

    margin-bottom: 16px;
}

.field span {
    font-size: 13px;
    font-weight: 600;
}

.field input {
    width: 100%;

    border: 1px solid #E5EEEE;
    border-radius: 14px;

    background: #FFFFFF;
    color: #302B3D;

    padding: 13px 14px;

    outline: none;
}

.field input:focus {
    border-color: #8B7AB8;
}


/* ================================
   BUTTON
   ================================ */

.primary-btn {
    width: 100%;

    border: none;
    border-radius: 14px;

    padding: 14px;

    background: #302B3D;
    color: #FFFFFF;

    font-weight: 700;
}

.primary-btn.purple {
    background: #8B7AB8;
}

.message {
    min-height: 18px;

    margin-bottom: 10px;

    font-size: 13px;
    color: #8B7AB8;
}


/* ================================
   PHOTO OVERLAY — PROFILE PHOTO
   ================================ */

.profile-photo-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    background: rgba(48, 43, 61, 0.42);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.profile-photo-overlay.hidden {
    display: none !important;
}


/* ================================
   BOTTOM SHEET
   ================================ */

.profile-photo-sheet {
    width: 100%;
    max-width: 430px;

    background: #FFFFFF;

    border-radius: 28px 28px 0 0;

    padding: 10px 20px 24px;

    box-shadow:
        0 -10px 35px rgba(48, 43, 61, 0.16);

    animation: photoSheetUp 0.25s ease-out;

    color: #302B3D;
}


@keyframes photoSheetUp {

    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }

}


/* ================================
   HANDLE
   ================================ */

.photo-sheet-handle {
    width: 45px;
    height: 5px;

    margin: 2px auto 18px;

    border-radius: 10px;

    background: #DDD8E5;
}


/* ================================
   HEADER
   ================================ */

.photo-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 8px;
}

.photo-sheet-header h2 {
    margin: 0;

    font-size: 20px;
    font-weight: 700;

    color: #302B3D;
}

.photo-sheet-close {
    width: 36px;
    height: 36px;

    border: none;
    border-radius: 50%;

    background: transparent;

    color: #72608B;

    font-size: 28px;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.photo-sheet-close:hover {
    background: #F0ECF7;
}


/* ================================
   OPTIONS
   ================================ */

.profile-photo-sheet .photo-options {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 0;

    border-top: 1px solid #E5EEEE;
}

.profile-photo-sheet .instagram-option {
    width: 100%;
    min-height: 78px;

    display: flex;
    align-items: center;

    gap: 14px;

    padding: 13px 2px;

    border: none;
    border-bottom: 1px solid #E5EEEE;

    background: transparent;

    text-align: left;

    cursor: pointer;

    font-family: inherit;
}

.profile-photo-sheet .instagram-option:hover {
    background: #FAF8FC;
}

.profile-photo-sheet .instagram-option:active {
    transform: scale(0.985);
}


/* ================================
   ICON
   ================================ */

.photo-option-icon {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
}

.photo-option-icon svg {
    width: 22px;
    height: 22px;

    fill: none;

    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}

.purple-icon {
    background: #F0ECF7;
}

.purple-icon svg {
    stroke: #8B7AB8;
}

.red-icon {
    background: #FFF0F2;
}

.red-icon svg {
    stroke: #DF5360;
}


/* ================================
   TEXT
   ================================ */

.photo-option-text {
    flex: 1;
    min-width: 0;
}

.photo-option-text strong {
    display: block;

    font-size: 14px;
    font-weight: 650;

    color: #302B3D;

    line-height: 1.3;
}

.photo-option-text small {
    display: block;

    margin-top: 4px;

    font-size: 11px;

    color: #A090AE;

    line-height: 1.3;
}


/* REMOVE PHOTO */

.remove-option .photo-option-text strong {
    color: #DF5360;
}


/* ARROW */

.photo-option-arrow {
    color: #A090AE;

    font-size: 24px;
    font-weight: 300;

    margin-right: 4px;
}


/* ================================
   CANCEL BUTTON
   ================================ */

.photo-cancel-btn {
    width: 100%;
    height: 50px;

    margin-top: 14px;

    border: none;
    border-radius: 15px;

    background: #F0ECF7;

    color: #302B3D;

    font-size: 14px;
    font-weight: 650;

    cursor: pointer;
}

.photo-cancel-btn:hover {
    background: #E5DEEF;
}


/* ================================
   DARK MODE PHOTO SHEET
   ================================ */

body.dark .profile-photo-sheet {
    background: #3B3549;
    color: #FFFFFF;
}

body.dark .photo-sheet-header h2 {
    color: #FFFFFF;
}

body.dark .photo-sheet-close {
    color: #C9C3D2;
}

body.dark .profile-photo-sheet .instagram-option {
    border-color: #514A60;
}

body.dark .profile-photo-sheet .instagram-option:hover {
    background: #443D52;
}

body.dark .photo-option-text strong {
    color: #FFFFFF;
}

body.dark .photo-option-text small {
    color: #C9C3D2;
}

body.dark .purple-icon {
    background: #514A60;
}

body.dark .photo-cancel-btn {
    background: #514A60;
    color: #FFFFFF;
}


/* ================================
   MOBILE
   ================================ */

@media (max-width: 360px) {

    .profile-photo-sheet {
        padding-left: 16px;
        padding-right: 16px;
    }

    .photo-sheet-header h2 {
        font-size: 19px;
    }

    .profile-photo-sheet .instagram-option {
        min-height: 72px;
    }

}


/* ================================
   DARK MODE
   ================================ */

body.dark {
    background: #302B3D;
    color: #FFFFFF;
}

body.dark .tagline,
body.dark .subtext {
    color: #C9C3D2;
}

body.dark .stats-card,
body.dark .setting-row,
body.dark .field input,
body.dark .modal {
    background: #3B3549;
    border-color: #514A60;
    color: #FFFFFF;
}

body.dark .profile-card {
    background: #3B3549;
    color: #FFFFFF;
}

body.dark .stat-item strong,
body.dark .setting-row,
body.dark .field input {
    color: #FFFFFF;
}

body.dark .stat-item + .stat-item {
    border-color: #514A60;
}

body.dark .bottom-nav {
    background: #3B3549;
    border-color: #514A60;
}

body.dark .slider {
    background: #514A60;
}


/* ================================
   SMALL SCREENS
   ================================ */

@media (max-width: 360px) {

    .me-screen {
        padding-left: 16px;
        padding-right: 16px;
    }

    .profile-card {
        padding: 18px;
    }

    .profile-avatar {
        width: 50px;
        height: 50px;
    }

    .profile-info h1 {
        font-size: 17px;
    }

    .edit-profile-btn {
        padding: 7px 11px;
    }

}