@font-face {
    font-family: 'IRANSansWeb';
    src: url('../fonts/IRANSansXFaNumWeb.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IRANSansWeb', system-ui, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2b3d 0%, #1a4a6f 50%, #0d2b45 100%);
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(100, 200, 255, 0.25) 2px, transparent 2px);
    background-size: 40px 40px;
    animation: bgMove 3s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 40px;
    }
}

.floating-group {
    position: relative;
    margin-bottom: 1.8rem;
}

.floating-group input,
.floating-group textarea {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    outline: none;
    transition: all 0.3s ease;
    color: #fff;
}

.floating-group input:disabled,
.floating-group textarea:disabled {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.6;
    color: rgba(255, 255, 255, 0.6);
}

.floating-group input:not(:disabled):focus,
.floating-group textarea:not(:disabled):focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(100, 200, 255, 0.8);
    box-shadow: 0 0 20px rgba(100, 200, 255, 0.3);
    color: #fff;
}

.floating-group label {
    position: absolute;
    right: 16px;
    top: 17px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    transition: 0.2s ease-out;
    pointer-events: none;
    background: 0 0;
    padding: 0 4px;
}

.floating-group textarea~label {
    top: 18px;
}

.floating-group input:focus~label,
.floating-group input:not(:placeholder-shown)~label,
.floating-group textarea:focus~label,
.floating-group textarea:not(:placeholder-shown)~label {
    top: -11px;
    font-size: 13px;
    color: #88ddff;
    background: rgba(4, 99, 172, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: 0 8px;
}

.glass-form {
    position: relative;
    max-width: 700px;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    padding: 25px 20px 30px;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    overflow: visible;
    animation: floatGlow 3s ease-in-out infinite;
}

.glass-form::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.5) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.glass-form h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #a0c4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-submit {
    background: linear-gradient(135deg, #00c6ff, #0072ff, #00a6ff);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 44px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    width: 100%;
    opacity: 0.5;
    pointer-events: none;
    display: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
    letter-spacing: 1px;
}

.btn-submit.visible {
    display: block;
}

.btn-submit.active {
    opacity: 1;
    pointer-events: auto;
    animation: btnPulse 2s ease-in-out infinite;
}

.btn-submit.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 114, 255, 0.5);
    background-size: 100% 100%;
}

@keyframes btnPulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 114, 255, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
    }
}

.btn-submit.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit.active:active::before {
    width: 300px;
    height: 300px;
}

.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.7s linear infinite;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

textarea {
    resize: vertical;
    min-height: 70px;
}

.custom-select {
    width: 100%;
    position: relative;
    margin-bottom: 26px;
}

.select-trigger {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 14px 18px;
    font-size: .95rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    color: #fff;
}

.select-trigger span:first-child {
    color: rgba(255, 255, 255, 0.7);
}

.select-trigger.active {
    border-color: #1968fa;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 7px 1px rgba(24, 139, 255, 0.3);
}

.dropdown-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.2s ease;
}

.select-trigger.active .dropdown-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231968fa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    transform: rotate(180deg);
}

.custom-select.disabled .dropdown-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    z-index: 200;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.select-dropdown.show {
    display: block;
}

.select-option {
    padding: 13px 18px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    color: #fff;
}

.select-option:hover {
    background: rgba(100, 200, 255, 0.2);
}

.custom-select.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.custom-select.disabled .select-trigger {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
}

.custom-select.active .select-trigger {
    border-color: #50a7ff;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(100, 200, 255, 0.2);
}

.custom-select.has-value .select-trigger span:first-child {
    color: #fff;
}

.custom-select.disabled.has-value .select-trigger span:first-child {
    color: rgba(255, 255, 255, 0.7);
}

.custom-select .floating-label {
    position: absolute;
    right: 16px;
    top: 17px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    transition: 0.2s ease-out;
    pointer-events: none;
    background: 0 0;
    padding: 0 4px;
    z-index: 1;
}

.custom-select.has-value .floating-label,
.custom-select.active .floating-label {
    top: -11px;
    font-size: 13px;
    color: #88ddff;
    background: rgba(4, 99, 172, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: 0 8px;
}

.custom-select.disabled .floating-label {
    color: rgba(255, 255, 255, 0.4);
}

.search-input {
    width: calc(100% - 20px);
    margin: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    background-position: left 10px center;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23aaaaaa' stroke-width='2'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
}

.search-input:focus {
    border-color: #0463ac;
    box-shadow: 0 0 0 2px rgba(4, 99, 172, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.options-list {
    max-height: 200px;
    overflow-y: auto;
}

.no-result {
    padding: 13px 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: .9rem;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    direction: rtl;
}

.toast {
    color: #fff;
    padding: 16px 24px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    animation: slideIn .4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    min-width: 300px;
    max-width: 400px;
    backdrop-filter: blur(12px);
    background: linear-gradient(135deg, rgba(15, 43, 61, 0.95), rgba(26, 74, 111, 0.95));
    border: 1px solid rgba(100, 200, 255, 0.3);
    font-weight: 500;
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00c6ff, #0072ff, #00c6ff);
    animation: borderGlow 2s linear infinite;
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(450px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(450px);
        opacity: 0;
    }
}

.toast.exit {
    animation: slideOut .3s ease forwards;
}

.toast-icon {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.toast-message {
    font-size: 14px;
    flex: 1;
}

.toast-close {
    cursor: pointer;
    font-size: 20px;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 0.7;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.toast-progress-bar {
    width: 100%;
    height: 100%;
    animation: progress 3s linear forwards;
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.toast.yellow {
    background: linear-gradient(135deg, #f8ba02, #e0a800);
    color: #1e2a3e;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.toast.yellow .toast-progress {
    background: rgba(0, 0, 0, 0.1);
}

.toast.yellow .toast-progress-bar {
    background: rgba(0, 0, 0, 0.2);
}

.toast.yellow::before {
    background: linear-gradient(90deg, #fff, #ffd700, #fff);
}

.toast.yellow .toast-icon {
    color: #1e2a3e;
}

.toast.yellow .toast-close {
    color: #1e2a3e;
}

.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.success-modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.success-modal {
    background: #fff;
    border-radius: 32px;
    width: 90%;
    max-width: 380px;
    overflow: hidden;
    animation: modalPop .4s cubic-bezier(0.34, 1.2, 0.64, 1);
    direction: rtl;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-modal-header {
    background: linear-gradient(135deg, #10b981, #059669);
    padding: 30px 20px 25px;
    text-align: center;
}

.success-modal-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 10px;
    animation: checkBounce 0.5s ease;
}

@keyframes checkBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.success-modal-header h3 {
    color: #fff;
    font-size: 24px;
    margin: 0;
    font-weight: 700;
}

.success-modal-body {
    padding: 30px 25px 20px;
    text-align: center;
}

.success-modal-body p {
    color: #4a5568;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.success-message-main {
    font-size: 18px !important;
    font-weight: 700;
    color: #2d3748 !important;
}

.success-message-sub {
    font-size: 14px !important;
    color: #718096 !important;
}

.success-modal-footer {
    padding: 0 25px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.success-modal-footer button {
    padding: 14px 20px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    border: none;
    border-radius: 44px;
    transition: all 0.2s ease;
    font-weight: 700;
}

.btn-home {
    background: linear-gradient(135deg, #0463ac, #0a3a8f);
    color: #fff;
    box-shadow: 0 4px 12px rgba(4, 99, 172, 0.3);
}

.btn-close-modal {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.btn-close-modal:hover {
    background: #e5e7eb;
}
/* جلوگیری از زوم خودکار در iOS برای همه فیلدها */
input, 
textarea, 
select,
.select-trigger,
.custom-select .select-trigger,
.floating-group input,
.floating-group textarea,
.search-input {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
}