@font-face {
    font-family: 'Vazir';
    src: url('../../tools/font/Vazir-Medium-FD.woff2') format('woff2');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    background: #0a0a1a;
    overflow-x: hidden;
    position: relative;
}

/* ==================== انیمیشن پس زمینه ==================== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: floatSphere 20s ease-in-out infinite;
}

.sphere-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.3));
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.sphere-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.5), rgba(139, 92, 246, 0.2));
    bottom: -250px;
    right: -250px;
    animation-delay: 5s;
}

.sphere-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.6), rgba(99, 102, 241, 0.2));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes floatSphere {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* ==================== کانتینر اصلی ==================== */
.container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ==================== برند ==================== */
.brand {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out;
}

.logo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
}

.logo-glow {
    position: absolute;
    inset: -30px;
    background: linear-gradient(135deg, #67ff5d, #cfcfcf, #ff6565);
    border-radius: 35px;
    filter: blur(30px);
    opacity: 0.6;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.logo {
    width: 120px;
    height: 120px;
    background: transparent;
    border-radius: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    background: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    color: #ffffffe0;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 400;
}

/* ==================== کارت اصلی ==================== */
.main-card {
    background: rgb(255 255 255 / 12%);
    backdrop-filter: blur(10px);
    border-radius: 48px;
    padding: 32px 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.main-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== وضعیت دستگاه ==================== */
.status-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 28px;
    padding: 16px 20px;
    margin-bottom: 15px;
    border-right: 3px solid #10b981;
    display: none;
    backdrop-filter: blur(10px);
}

.status-card.show {
    display: block;
    animation: slideDown 0.4s ease;
}

.status-card.success {
    border-right-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.status-card.error {
    border-right-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.status-card.warning {
    border-right-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== فیلدهای ورودی مدرن ==================== */
.input-group {
    margin-bottom: 15px;
}

.input-field {
    position: relative;
}

.input-field i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
    transition: all 0.3s;
    z-index: 1;
}

.input-field input {
    width: 100%;
    padding: 18px 50px 8px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    font-size: 16px;
    font-family: 'Vazir', monospace;
    color: white;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.input-field label {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    transition: all 0.2s;
    pointer-events: none;
    font-weight: 400;
}

.input-field input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.input-field input:focus + label,
.input-field input:not(:placeholder-shown) + label {
    top: 8px;
    transform: translateY(0);
    font-size: 10px;
    color: #6366f1;
}

.input-field input:focus ~ i,
.input-field input:not(:placeholder-shown) ~ i {
    color: #6366f1;
}

.input-field input::placeholder {
    color: transparent;
}

/* ==================== دکمه ==================== */
.btn-glow {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Vazir', sans-serif;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-glow .arrow-icon {
    transition: transform 0.3s;
    font-size: 14px;
}

.btn-glow:hover .arrow-icon {
    transform: translateX(-5px);
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-glow:active {
    transform: translateY(0);
}

.btn-glow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==================== نتیجه ==================== */
#result {
    margin-top: 20px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 24px;
    display: none;
    font-size: 13px;
}

#result.show {
    display: block;
    animation: slideDown 0.4s ease;
}

.result-success {
    color: #10b981;
}

.result-error {
    color: #ef4444;
}

/* ==================== ویژگی‌ها ==================== */
.features {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.feature-item:nth-child(2) {
    animation-delay: 0.3s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.4s;
}

.feature-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateX(-5px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 22px;
    background: linear-gradient(135deg, #6366f1, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.feature-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* ==================== نشان امنیت ==================== */
.secure-badge {
    text-align: center;
    margin-top: 28px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.secure-badge i {
    font-size: 12px;
}

/* ==================== لودر ==================== */
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 36px;
    padding: 32px 48px;
    text-align: center;
    display: none;
    z-index: 1000;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

/* ==================== ریسپانسیو ==================== */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .main-card {
        padding: 24px 20px;
        border-radius: 40px;
    }
    
    .logo-wrapper {
        width: 90px;
        height: 90px;
    }
    
    .logo {
        width: 90px;
        height: 90px;
        border-radius: 28px;
    }
    
    .logo-text {
        font-size: 30px;
    }
    
    .logo-glow {
        border-radius: 28px;
    }
    
    .feature-item {
        padding: 10px 14px;
    }
    
    .feature-icon {
        width: 38px;
        height: 38px;
    }
    
    .feature-icon i {
        font-size: 18px;
    }
}