﻿
.en-title {
    font-family: var(--font-en);
}

.kr-title {
    font-family: var(--font-kr);
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.card {
    width: min(460px, 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.head {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(236, 72, 153, 0.25));
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

.music-icon {
    color: #F8FAFC;
    filter: drop-shadow(0 2px 8px rgba(236, 72, 153, 0.45));
    transition: transform 0.3s ease;
}

.card:hover .music-icon {
    transform: scale(1.08) rotate(-4deg);
}

.title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.sep {
    margin: 0 6px;
    opacity: 0.5;
}

.form {
    display: grid;
    gap: 18px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.summary {
    display: none;
    border: 1px solid rgba(251, 113, 133, 0.35);
    background: rgba(251, 113, 133, 0.08);
    color: #FECDD3;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.6;
}

    .summary.show {
        display: block;
    }

.field {
    display: grid;
    gap: 6px;
}

.label {
    font-weight: 600;
    color: rgba(248, 250, 252, 0.92);
    font-size: 0.9rem;
}

.control {
    position: relative;
    display: flex;
    align-items: center;
}

.input {
    width: 100%;
    min-height: var(--tap);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(11, 17, 32, 0.5);
    color: var(--text);
    padding: 12px 42px 12px 42px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

    .input::placeholder {
        color: rgba(148, 163, 184, 0.5);
        font-size: 0.88rem;
    }

    .input:focus {
        border-color: rgba(139, 92, 246, 0.8);
        background: rgba(11, 17, 32, 0.75);
        box-shadow: var(--focus);
    }

.icon {
    position: absolute;
    inset-inline-start: 14px;
    display: grid;
    place-items: center;
    color: rgba(148, 163, 184, 0.8);
    pointer-events: none;
}

.ghost-btn {
    position: absolute;
    inset-inline-end: 6px;
    height: 36px;
    width: 36px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: rgba(148, 163, 184, 0.8);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

    .ghost-btn:hover {
        color: var(--text);
        background: rgba(255, 255, 255, 0.05);
    }

    .ghost-btn:focus-visible {
        outline: none;
        box-shadow: var(--focus);
    }

.ghost-icon svg[data-eye-closed] {
    display: none;
}

body[data-password-visible="true"] .ghost-icon svg[data-eye-open] {
    display: none;
}

body[data-password-visible="true"] .ghost-icon svg[data-eye-closed] {
    display: inline;
}

.error {
    color: var(--danger);
    font-size: 0.82rem;
    min-height: 1.2rem;
    display: block;
}

.input.input-invalid {
    border-color: rgba(251, 113, 133, 0.7) !important;
    box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18) !important;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    cursor: pointer;
}

.check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-box {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(11, 17, 32, 0.4);
    display: grid;
    place-items: center;
    transition: all 0.15s ease;
}

.check-input:focus-visible + .check-box {
    box-shadow: var(--focus);
    border-color: var(--primary);
}

.check-input:checked + .check-box {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
}

    .check-input:checked + .check-box::after {
        content: "";
        width: 5px;
        height: 9px;
        border: solid #FFF;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg) translate(-1px, -1px);
    }

.check-text {
    color: rgba(248, 250, 252, 0.85);
    font-size: 0.88rem;
}

.link {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    position: relative;
    transition: color 0.2s ease;
    outline: none;
}

    .link::after {
        content: "";
        position: absolute;
        bottom: -2px;
        right: 0;
        width: 0;
        height: 1.5px;
        background: linear-gradient(90deg, var(--accent), var(--primary));
        transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 2px;
    }

    .link:hover {
        color: var(--text);
        text-decoration: none;
    }

        .link:hover::after {
            width: 100%;
        }

    .link:focus-visible {
        border-radius: 4px;
        box-shadow: var(--focus);
    }

.highlight-link {
    color: #C084FC;
    font-weight: 700;
}

    .highlight-link:hover {
        color: #F472B6;
    }

/* دکمه با افکت Shimmer و لودینگ */
.btn {
    margin-top: 8px;
    min-height: var(--tap);
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease;
}

    .btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: -120%;
        width: 60%;
        height: 100%;
        background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
        transform: skewX(-25deg);
        transition: left 0.6s ease;
    }

    .btn:hover:not(.is-loading) {
        transform: translateY(-2px) scale(1.015);
        box-shadow: 0 8px 28px rgba(236, 72, 153, 0.45), 0 0 15px rgba(139, 92, 246, 0.35);
        filter: brightness(1.06);
    }

        .btn:hover:not(.is-loading)::before {
            left: 180%;
        }

    .btn:active:not(.is-loading) {
        transform: translateY(1px) scale(0.99);
    }

.btn-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    display: none;
    animation: spin 0.75s linear infinite;
}

.btn.is-loading .btn-spinner {
    display: inline-block;
}

.btn.is-loading .btn-text {
    opacity: 0.8;
}

.btn.is-loading {
    filter: grayscale(0.2);
    cursor: wait;
    pointer-events: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.foot {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    font-size: 0.9rem;
}

/* ==========================================================================
   پنل خوش‌آمدگویی انیمیشنی (Welcome Overlay / Animation)
   ========================================================================== */
.welcome-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 10px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card.login-success #loginHeader,
.card.login-success #loginForm {
    display: none;
}

.card.login-success .welcome-panel {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.welcome-icon-wrap {
    width: 68px;
    height: 68px;
    margin-bottom: 18px;
}

.check-success-svg {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: var(--success);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--success);
    animation: fillCircle .4s ease-in-out .4s forwards, scaleSuccess .3s ease-in-out .9s both;
}

.check-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: var(--success);
    fill: none;
    animation: strokeCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.check-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: strokeCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes strokeCircle {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes strokeCheck {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scaleSuccess {
    0%, 100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

.welcome-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-desc {
    margin: 8px 0 20px;
    color: var(--muted);
    font-size: 0.95rem;
}

.welcome-progress {
    width: 140px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.welcome-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    animation: progressAnim 1.2s ease forwards;
}

@keyframes progressAnim {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page {
        padding: 12px;
    }

    .card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .title {
        font-size: 1.18rem;
    }
}


.alert-success-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #A7F3D0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 14px;
}

