/* fonts and core variables */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

:root {
    --exir-dark: #010a12;
    --exir-panel: rgba(2, 20, 35, 0.6);
    --exir-cyan: #06b6d4;
    --exir-gold: #d4af37;
    --exir-danger: #ef4444;
}

body {
    background-color: var(--exir-dark);
    color: #f8fafc;
    font-family: 'Vazirmatn', sans-serif !important;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Animated Magic Background */
.magic-bg {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1; background: var(--exir-dark); overflow: hidden;
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.orb-1 { width: 400px; height: 400px; background: var(--exir-cyan); top: -100px; left: -100px; animation-duration: 25s; }
.orb-2 { width: 500px; height: 500px; background: var(--exir-gold); bottom: -150px; right: -150px; opacity: 0.3; animation-duration: 30s; animation-direction: alternate-reverse; }
.orb-3 { width: 300px; height: 300px; background: #022c4a; top: 40%; left: 50%; animation-duration: 20s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10vw, 5vh) scale(1.2); }
    100% { transform: translate(-5vw, 15vh) scale(0.9); }
}

/* Splash Screen & Floating Img */
.pulse-btn { animation: pulseGlow 2s infinite; }
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(6, 182, 212, 0); }
    100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}
.no-scroll { overflow: hidden !important; }

.floating-img { animation: floatImg 6s ease-in-out infinite; }
@keyframes floatImg {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Glass Panels */
.super-glass {
    background: var(--exir-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(6, 182, 212, 0.15);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
    z-index: 10;
}
.super-glass::before {
    content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--exir-cyan), var(--exir-gold), transparent);
    border-radius: 50%; opacity: 0.8;
}

/* Forms & Inputs */
.input-group { position: relative; margin-bottom: 2rem; }
.magic-input {
    width: 100%; background: rgba(0, 0, 0, 0.2); border: none; border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: #fff; padding: 1.5rem 1rem 0.5rem 1rem; font-size: 1rem; transition: all 0.3s ease;
    outline: none; border-radius: 8px 8px 0 0; text-align: right; direction: rtl; font-family: 'Vazirmatn', sans-serif !important;
}
.magic-input:focus { background: rgba(6, 182, 212, 0.05); border-bottom-color: transparent; }
.input-label {
    position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
    color: #94a3b8; font-size: 0.95rem; pointer-events: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Vazirmatn', sans-serif !important;
}
.magic-input:focus ~ .input-label, .magic-input:not(:placeholder-shown) ~ .input-label {
    top: 0.5rem; font-size: 0.7rem; color: var(--exir-cyan); right: 0.8rem;
}
.input-line {
    position: absolute; bottom: 0; left: 50%; right: 50%; height: 2px;
    background: linear-gradient(90deg, var(--exir-cyan), var(--exir-gold)); transition: all 0.4s ease; opacity: 0;
}
.magic-input:focus ~ .input-line { left: 0; right: 0; opacity: 1; }
select.magic-input { appearance: none; cursor: pointer; font-family: 'Vazirmatn', sans-serif !important; }
select.magic-input option { background: #02111b; color: #fff; font-family: 'Vazirmatn', sans-serif !important; }
.select-arrow { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--exir-cyan); }

/* Dropdowns */
.dropdown-list {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(2, 17, 27, 0.95); backdrop-filter: blur(10px);
    border: 1px solid rgba(6, 182, 212, 0.3); border-radius: 12px;
    margin-top: 0.5rem; max-height: 220px; overflow-y: auto;
    z-index: 50; display: none; box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.dropdown-list.active { display: block; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-item { padding: 0.75rem 1rem; cursor: pointer; transition: all 0.2s; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.9rem; color: #cbd5e1; font-family: 'Vazirmatn', sans-serif !important; }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: rgba(6, 182, 212, 0.15); color: var(--exir-cyan); padding-right: 1.5rem; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--exir-cyan); border-radius: 10px; }

/* Buttons */
.btn-magic {
    position: relative; background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(212, 175, 55, 0.1));
    border: 1px solid rgba(6, 182, 212, 0.4); color: #fff; padding: 1.25rem; border-radius: 16px;
    font-weight: bold; font-size: 1.1rem; width: 100%; cursor: pointer; overflow: hidden;
    transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.3); margin-top: 1rem; font-family: 'Vazirmatn', sans-serif !important;
}
.btn-magic::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: all 0.5s ease;
}
.btn-magic:hover { border-color: var(--exir-gold); box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2), 0 0 20px rgba(6, 182, 212, 0.2); transform: translateY(-2px); }
.btn-magic:hover::before { left: 100%; }
.btn-magic:active { transform: translateY(0); }
.btn-magic:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), transparent);
    border-color: rgba(239, 68, 68, 0.4);
}
.btn-danger:hover {
    border-color: var(--exir-danger);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.2), 0 0 20px rgba(239, 68, 68, 0.2);
}

.spinner { border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--exir-gold); border-radius: 50%; width: 24px; height: 24px; animation: spin 0.8s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Modals / Toasts */
.success-card { background: linear-gradient(180deg, rgba(6,182,212,0.1) 0%, rgba(0,0,0,0) 100%); border: 1px solid var(--exir-cyan); box-shadow: 0 0 30px rgba(6,182,212,0.2); border-radius: 24px; }
#toast { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); transition: bottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); z-index: 100; font-family: 'Vazirmatn', sans-serif !important; }
#toast.show { bottom: 20px; }

/* Dashboard Switches */
.toggle-checkbox:checked { right: 0; border-color: var(--exir-cyan); }
.toggle-checkbox:checked + .toggle-label { background-color: var(--exir-cyan); }
.toggle-checkbox:checked + .toggle-label::before { transform: translateX(-1.25rem); }

/* Utility */
.screen-hidden { display: none !important; opacity: 0; }
.fade-in { animation: fadeIn 0.5s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
