﻿:root {
    --font-fa: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    --font-en: 'PlusJakartaSans', system-ui, sans-serif;
    --font-kr: 'NotoSansKR', sans-serif;
    --bg: #0B1120;
    --surface: rgba(17, 24, 39, 0.75);
    --primary: #8B5CF6;
    --accent: #EC4899;
    --text: #F8FAFC;
    --muted: #94A3B8;
    --border: rgba(255, 255, 255, .08);
    --danger: #FB7185;
    --success: #34D399;
    --radius: 20px;
    --tap: 48px;
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    --focus: 0 0 0 3px rgba(139, 92, 246, 0.35);
}

*, *::before, *::after {
    box-sizing: border-box;
}

.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;
    direction: rtl;
    color: var(--text);
    font-family: var(--font-fa);
}

.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;
}

.form {
    display: grid;
    gap: 16px;
    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,
    .summary:not(:empty) {
        display: block;
    }

    .summary ul {
        margin: 0;
        padding: 0 16px 0 0;
    }

.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);
    }

    .input.input-invalid,
    .input.is-invalid,
    .input.input-validation-error {
        border-color: rgba(251, 113, 133, 0.7) !important;
        box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18) !important;
    }

.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;
    z-index: 2;
}

    .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 [data-eye-closed] {
    display: none;
}

.ghost-btn.is-visible [data-eye-open] {
    display: none;
}

.ghost-btn.is-visible [data-eye-closed] {
    display: inline;
}

.error {
    color: var(--danger);
    font-size: 0.82rem;
    min-height: 1.2rem;
    display: block;
}

    .error:empty {
        min-height: 0;
    }

/* لینک‌ها */
.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;
}

.muted {
    color: var(--muted);
}

/* بهینه‌سازی ریسپانسیو برای موبایل */
@media (max-width: 480px) {
    .page {
        padding: 12px;
    }

    .card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .title {
        font-size: 1.18rem;
    }

    .head {
        margin-bottom: 18px;
        padding-bottom: 16px;
    }

    .form {
        gap: 14px;
    }
}
