/**
 * Frontend Account CSS for 75 Challenge - Peach Design
 */

/* Global Account Styles */
.peach-account {
    min-height: 100vh;
    background-color: #FFE8F9;
}

/* Top Bar (same as app) */
.peach-topbar {
    height: 70px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.peach-topbar__logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.peach-topbar__logo:hover {
    opacity: 0.8;
}

.peach-topbar__logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.peach-topbar__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.peach-topbar__brand:hover {
    opacity: 0.8;
}

.peach-topbar__brand img {
    height: 35px;
    width: auto !important;
    max-width: none !important;
    object-fit: contain;
}

.peach-topbar__profile {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: #2D2D2D;
    transition: background-color 0.2s ease;
}

.peach-topbar__profile:hover {
    background-color: #F3F4F6;
}

.peach-topbar__profile svg {
    width: 24px;
    height: 24px;
}

/* Mobile Wrapper */
.peach-wrap {
    max-width: 390px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px 30px;
}

/* Base Card */
.peach-card {
    background: #FFFFFF;
    border-radius: 15px;
    margin-bottom: 10px;
    padding: 18px 22px;
}

/* Progress Card */
.peach-progress {
    width: 350px;
    max-width: 100%;
    height: 80px;
    padding: 18px;
    box-sizing: border-box;
}

.peach-progress__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.peach-progress__label {
    color: #6B7280;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.peach-progress__meta {
    color: #6B7280;
    font-weight: 600;
    font-size: 11px;
}

/* Progress Bar */
.peach-bar {
    width: 100%;
}

.peach-bar__track {
    width: 320px;
    max-width: 100%;
    height: 10px;
    background: #FFD3F2;
    border-radius: 50px;
    overflow: hidden;
    position: relative;
}

.peach-bar__fill {
    height: 100%;
    background: #EB56AC;
    border-radius: 50px;
    transition: width 0.3s ease;
    min-width: 0;
}

/* Stats Row (same as homepage) */
.peach-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.peach-stat {
    flex: 1;
    max-width: 110px;
    background: #FFFFFF;
    border-radius: 15px;
    padding: 12px 8px;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.peach-stat__title {
    color: #6B7280;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-align: center;
}

.peach-stat__value {
    color: #2D2D2D;
    font-weight: 600;
    font-size: 35px;
    letter-spacing: -0.03em;
    line-height: 1;
    text-align: center;
}

/* Section Label */
.peach-sectionlabel {
    color: #6B7280;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: block;
}

/* Account Card */
.peach-accountcard__name {
    color: #2D2D2D;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.peach-accountcard__email {
    color: #6B7280;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
}

/* Peach Club Card */
.peach-club__text {
    color: #2D2D2D;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.peach-btn--link {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    line-height: 52px;
}

/* Form */
.peach-form {
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

.peach-field {
    margin-bottom: 14px;
}

.peach-field:last-of-type {
    margin-bottom: 20px;
}

.peach-input {
    width: 100%;
    height: 48px;
    border-radius: 50px;
    border: 1px solid #9CA3AF;
    background: #FFFFFF;
    color: #2D2D2D;
    padding: 0 18px;
    font-size: 16px;
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.peach-input::placeholder {
    color: #9CA3AF;
}

.peach-input:focus {
    outline: none;
    border-color: #EB56AC;
}

.peach-input:hover {
    border-color: #D1D5DB;
}

/* Password inputs - ensure they have the same rounded style as select */
input[type="password"].peach-input,
#peach-current-password,
#peach-new-password {
    border-radius: 50px !important;
}

/* Email inputs - ensure they have the same rounded style */
input[type="email"].peach-input,
#peach-new-email {
    border-radius: 50px !important;
}

/* Select */
.peach-select {
    width: 100%;
    height: 48px;
    border-radius: 50px;
    border: 1px solid #9CA3AF;
    background: #FFFFFF;
    color: #2D2D2D;
    padding: 0 18px;
    font-size: 16px;
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

.peach-select:focus {
    outline: none;
    border-color: #EB56AC;
}

.peach-select:hover {
    border-color: #D1D5DB;
}

/* Button */
.peach-btn {
    width: 100% !important;
    height: 52px;
    border-radius: 50px !important;
    background: #FFD3F2;
    color: #2D2D2D;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    margin: 0 !important;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-family: 'Figtree', sans-serif;
    text-transform: uppercase;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.peach-btn:hover:not(:disabled) {
    background: #EB56AC;
    color: #FFFFFF;
    transform: translateY(-1px);
}

.peach-btn:active:not(:disabled) {
    transform: translateY(0);
}

.peach-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.peach-btn:disabled:hover {
    background: #FFD3F2;
    transform: none;
}

/* Message */
.peach-message {
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.peach-message--success {
    background: #D1FAE5;
    color: #065F46;
}

.peach-message--error {
    background: #FEE2E2;
    color: #DC2626;
}

/* Logout Link */
.peach-logout {
    display: block;
    text-align: center;
    color: #EB56AC;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    margin: 20px 0 40px;
    transition: text-decoration 0.2s ease;
}

.peach-logout:hover {
    text-decoration: underline;
}

/* Footer */
.peach-footer {
    color: #6B7280;
    font-size: 12px;
    text-align: center;
    margin-top: auto;
    padding-bottom: 20px;
}

/* Referral Code */
.peach-referral-code {
    margin-bottom: 24px;
}

.peach-referral-code__label,
.peach-referral-link__label {
    color: #6B7280;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.peach-referral-code__value {
    background: #F9FAFB;
    border: 2px solid #EB56AC;
    border-radius: 50px;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
    color: #EB56AC;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
}

.peach-referral-link {
    margin-bottom: 24px;
}

.peach-referral-link__value {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.peach-input-readonly {
    width: 100%;
    background: #F9FAFB;
    cursor: text;
    font-size: 14px;
    border-radius: 50px !important;
}

.peach-btn-copy {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100% !important;
    padding: 10px 16px;
    background: #EB56AC;
    color: #fff;
    border: none;
    border-radius: 50px !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.peach-btn-copy:hover {
    background: #d04a95;
    transform: translateY(-1px);
}

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

.peach-btn-copy .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Referral Stats */
.peach-referral-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

.peach-referral-stat {
    text-align: center;
}

.peach-referral-stat__value {
    font-size: 32px;
    font-weight: 700;
    color: #EB56AC;
    line-height: 1.2;
    margin-bottom: 4px;
}

.peach-referral-stat__label {
    font-size: 12px;
    color: #6B7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 390px) {
    .peach-wrap {
        padding: 0 15px 20px;
    }
    
    .peach-card {
        padding: 18px 20px;
    }
    
    .peach-progress {
        width: 100%;
    }
    
    .peach-bar__track {
        width: 100%;
    }
    
    .peach-btn {
        width: 100%;
        max-width: 220px;
    }
    
    .peach-referral-link__value {
        flex-direction: column;
    }
    
    .peach-btn-copy {
        width: 100%;
        justify-content: center;
    }
}

/* Challenge Completion Success Modal */
.peach-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: peachSuccessFadeIn 0.3s ease-out;
}

@keyframes peachSuccessFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.peach-success-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(235, 86, 172, 0.9);
    backdrop-filter: blur(4px);
    animation: peachSuccessBackdropFadeIn 0.3s ease-out;
}

@keyframes peachSuccessBackdropFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.peach-success-modal__panel {
    position: relative;
    max-width: 420px;
    width: 100%;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 40px 30px;
    box-sizing: border-box;
    z-index: 1;
    animation: peachSuccessPanelSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes peachSuccessPanelSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.peach-success-modal__content {
    text-align: center;
}

.peach-success-modal__icon {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: peachSuccessIconBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s both;
}

@keyframes peachSuccessIconBounce {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.peach-success-icon-circle {
    animation: peachSuccessCirclePulse 0.6s ease-out 0.3s both;
}

@keyframes peachSuccessCirclePulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.peach-success-icon-check {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: peachSuccessCheckDraw 0.5s ease-out 0.5s both;
}

@keyframes peachSuccessCheckDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.peach-success-modal__title {
    margin: 0 0 16px 0;
    color: #2D2D2D;
    font-weight: 700;
    font-size: 32px;
    animation: peachSuccessTextFadeIn 0.4s ease-out 0.4s both;
}

.peach-success-modal__message {
    margin: 0 0 12px 0;
    color: #2D2D2D;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    animation: peachSuccessTextFadeIn 0.4s ease-out 0.5s both;
}

.peach-success-modal__submessage {
    margin: 0 0 32px 0;
    color: #6B7280;
    font-size: 16px;
    line-height: 1.6;
    animation: peachSuccessTextFadeIn 0.4s ease-out 0.6s both;
}

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

.peach-success-modal__button {
    background: #EB56AC;
    color: #fff;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    min-width: 200px;
    animation: peachSuccessButtonFadeIn 0.4s ease-out 0.7s both;
    box-shadow: 0 4px 15px rgba(235, 86, 172, 0.4);
}

@keyframes peachSuccessButtonFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.peach-success-modal__button:hover {
    background: #d04a95;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(235, 86, 172, 0.5);
}

.peach-success-modal__button:active {
    transform: translateY(0);
}