@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #101928, #050814);
    color: #fff;
    direction: rtl;
}

.page {
    display: none;
    min-height: 100vh;
    box-sizing: border-box;
}

.page.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: rgba(3, 9, 23, 0.9);
    padding: 20px 24px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 360px;
}

/* زبان */
.language-container { text-align: center; }

.language-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    opacity: 0.9;
}

.language-title-en {
    margin: 0 0 16px 0;
    font-size: 12px;
    opacity: 0.7;
}

.language-btn {
    width: 100%;
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #1f2937, #020617);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.language-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.language-badge {
    min-width: 32px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.9);
}

.language-btn-text {
    font-size: 16px;
    font-weight: 600;
}

/* ثبت‌نام */
.register-container h1 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
}

.back-btn {
    font-size: 20px;
    cursor: pointer;
    margin-bottom: 10px;
}

.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(3, 9, 23, 0.9);
    color: #fff;
    font-size: 13px;
    outline: none;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ایمیل + دکمه کد */
.email-row {
    display: flex;
    gap: 8px;
}

.email-row input[type="email"] {
    flex: 1;
}

#send-email-code-btn {
    padding: 0 10px;
    border-radius: 10px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

#send-email-code-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* دکمه ثبت */
.submit-btn {
    width: 100%;
    padding: 10px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    margin-top: 6px;
    background-image: linear-gradient(90deg, #2b8cff, #7c4dff);
}

/* dropdown کشور اقامت */
.dropdown {
    position: relative;
    margin-top: 4px;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(3, 9, 23, 0.9);
    cursor: pointer;
}

.dropdown-selected span { font-size: 13px; }

.dropdown-arrow { font-size: 14px; }

.dropdown-list {
    position: absolute;
    right: 0;
    left: 0;
    top: 100%;
    margin-top: 4px;
    background: rgba(3, 9, 23, 0.98);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-height: 220px;
    overflow-y: auto;
    z-index: 999;
    display: none;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 13px;
}

.country-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.country-flag-img {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
    display: block;
}

/* intl‑tel‑input */
.iti {
    width: 100%;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 13px;
}

.iti__country-list {
    background: #020617;
    color: #e5e7eb;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    max-height: 260px;
}

.iti__country {
    padding: 8px 10px;
}

.iti__country.iti__highlight {
    background: rgba(37, 99, 235, 0.25);
}

.iti__country-name { font-size: 13px; }

.iti__dial-code {
    color: #9ca3af;
    font-size: 13px;
}

.iti__country-list .iti__search-input {
    background: #020617;
    color: #e5e7eb;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.iti--allow-dropdown .iti__flag-container {
    direction: ltr;
}
