/* ============================================
   OMEGA EXCHANGE - HIGH QUALITY IMAGES
   ============================================ */
:root {
    --omega-blue: #1E3A8A;
    --omega-gold: #D4AF37;
    --omega-green: #10B981;
    --bg-omega: #F8FAFC;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --gradient-omega: linear-gradient(135deg, var(--omega-blue) 0%, #3B82F6 100%);
    
    --font-ios: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-persian: 'Vazirmatn', var(--font-ios);
    --space-xs: 0.375rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --radius-md: 16px;
    --radius-lg: 20px;
    --shadow-card: 0 2px 12px rgba(30, 58, 138, 0.08);
    --shadow-icon: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-persian);
    background: var(--bg-omega);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   HEADER با ساعت مشترک
   ============================================ */
.omega-header-top {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    z-index: 100;
    padding: var(--space-md) 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.header-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.omega-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(30, 58, 138, 0.15));
    transition: var(--transition-smooth);
}

.omega-logo:hover {
    filter: drop-shadow(0 4px 12px rgba(30, 58, 138, 0.25));
    transform: scale(1.05);
}

.brand-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--omega-blue);
    margin: 0;
}

.brand-subtitle {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--omega-gold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.omega-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--gradient-omega);
    color: white;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--omega-green);
    border-radius: 50%;
    animation: pulse-green 2s infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

.status-time {
    font-family: var(--font-ios);
    letter-spacing: 0.05em;
}

@keyframes pulse-green {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
        transform: scale(1.15);
    }
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.omega-main {
    padding: var(--space-lg) 0;
}

/* ============================================
   CURRENCY CARD
   ============================================ */
.currency-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.currency-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--omega-gold), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
}

.currency-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.15);
}

.currency-card:hover::before {
    opacity: 1;
}

.currency-header {
    margin-bottom: var(--space-lg);
}

.currency-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ============================================
   CURRENCY IMAGES - عکس‌های با کیفیت
   ============================================ */
.currency-icon-wrapper {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: white;
    padding: 8px;
    box-shadow: var(--shadow-icon);
    transition: var(--transition-smooth);
    overflow: hidden;
    position: relative;
}

.currency-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), transparent);
    pointer-events: none;
}

.currency-flag, .currency-crypto {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
    transition: var(--transition-smooth);
}

.currency-icon-wrapper:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.currency-icon-wrapper:hover .currency-flag,
.currency-icon-wrapper:hover .currency-crypto {
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
    transform: scale(1.05);
}

.currency-details {
    flex: 1;
}

.currency-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--omega-blue);
    margin: 0 0 var(--space-xs) 0;
    letter-spacing: -0.01em;
}

.currency-code {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* ============================================
   RATES GRID - خرید/فروش
   ============================================ */
.rates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* ============================================
   RATE BOX - OCD APPROVED ✅
   ============================================ */
.rate-box {
    padding: 24px;  /* ✅ Padding ثابت */
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;  /* ✅ همه چیز وسط افقی */
    justify-content: center;  /* ✅ همه چیز وسط عمودی */
    min-height: 140px;  /* ✅ ارتفاع ثابت */
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.rate-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: var(--transition-smooth);
}

.buy-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.03));
    border: 2px solid rgba(16, 185, 129, 0.25);
}

.buy-box::before {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), transparent);
}

.sell-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.03));
    border: 2px solid rgba(59, 130, 246, 0.25);
}

.sell-box::before {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), transparent);
}

.rate-box:hover {
    transform: scale(1.03);
    border-width: 3px;
}

.rate-box:hover::before {
    opacity: 1;
}

/* ============================================
   RATE LABEL - بالا دقیقاً وسط ✅
   ============================================ */
.rate-label {
    display: flex;
    align-items: center;
    justify-content: center;  /* ✅ وسط افقی */
    gap: var(--space-xs);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100%;
    text-align: center;  /* ✅ تضمین وسط */
}

.buy-box .rate-label {
    color: #059669;
}

.sell-box .rate-label {
    color: #2563EB;
}

/* ============================================
   RATE AMOUNT - عدد + واحد دقیقاً وسط ✅
   ============================================ */
.rate-amount {
    font-family: var(--font-ios);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;  /* ✅ وسط عمودی */
    justify-content: center;  /* ✅ وسط افقی */
    gap: 6px;  /* ✅ فاصله دقیق بین عدد و واحد */
    width: 100%;
    direction: rtl;  /* ✅ واحد سمت راست */
}

/* ============================================
   واحدهای پول - تراز دقیق ✅
   ============================================ */
.rate-amount[data-currency="rub"]::after {
    content: 'تومن';
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: inline-flex;  /* ✅ تراز بهتر */
    align-items: center;
}

.rate-amount[data-currency="usdt"]::after {
    content: 'روبل';
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.rate-amount[data-currency="aed"]::after {
    content: 'تومن';
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.rate-amount[data-currency="try"]::after {
    content: 'تومن';
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* Loading State */
.rate-amount.loading {
    background: linear-gradient(90deg, var(--omega-gold) 25%, var(--omega-blue) 50%, var(--omega-gold) 75%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-gradient 2s infinite;
}

@keyframes shimmer-gradient {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.omega-contact {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-top: var(--space-xl);
    box-shadow: var(--shadow-card);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.contact-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--omega-blue);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.contact-title i {
    color: var(--omega-gold);
    font-size: 1.75rem;
}

.contact-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.omega-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 1.125rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

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

.omega-btn:hover::before {
    width: 300px;
    height: 300px;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.telegram-btn {
    background: linear-gradient(135deg, #0088CC 0%, #229ED9 100%);
    color: white;
}

.omega-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.omega-btn i {
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* ============================================
   FOOTER
   ============================================ */
.omega-footer {
    background: var(--gradient-omega);
    color: white;
    padding: var(--space-xl) 0;
    margin-top: var(--space-xl);
    text-align: center;
}

.footer-content p {
    font-size: 0.875rem;
    opacity: 0.95;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.footer-content i {
    color: var(--omega-gold);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .header-brand {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .brand-logo {
        flex-direction: column;
        text-align: center;
    }

    .brand-name {
        font-size: 1.5rem;
    }

    .omega-status {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-md);
    }

    .currency-card {
        padding: var(--space-md);
    }

    .currency-icon-wrapper {
        width: 56px;
        height: 56px;
    }

    .currency-name {
        font-size: 1.25rem;
    }

    .rates-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .contact-buttons {
        grid-template-columns: 1fr;
    }

    .rate-amount {
        font-size: 1.5rem;
    }

    .omega-logo {
        width: 60px;
        height: 60px;
    }

    .omega-btn {
        padding: var(--space-md) var(--space-lg);
        font-size: 1rem;
    }

    .rate-box {
        min-height: 120px;  /* ✅ موبایل کوچکتر */
        padding: 20px;
    }
}
/* ============================================
   OMEGA FLOAT HEADER + MODALS (Fixed Version)
   ============================================ */
.omega-float-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    border-bottom: 3px solid #d4af37;
}

.float-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.float-icon-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.float-icon {
    font-size: 22px;
    color: #d4af37;
    animation: pulse-float 2s infinite;
}

@keyframes pulse-float {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.float-text {
    color: white;
    font-weight: 700;
    font-size: 15px;
}

.float-buttons {
    display: flex;
    gap: 10px;
}

.float-btn {
    background: #d4af37;
    color: #1e3a8a;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    white-space: nowrap;
}

.float-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Adjust body padding to prevent overlap */
body {
    padding-top: 65px;
}

/* Modal Styles */
.omega-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 90%;
    max-width: 850px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.4);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 25px;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 35px;
    line-height: 1.9;
    color: #333;
    font-size: 16px;
}

.modal-body h3 {
    color: #1e3a8a;
    margin: 25px 0 15px;
    font-size: 21px;
    border-bottom: 2px solid #d4af37;
    padding-bottom: 8px;
}

.modal-body h4 {
    color: #1e3a8a;
    margin: 20px 0 10px;
    font-size: 18px;
}

.modal-body ul, .modal-body ol {
    margin: 15px 0;
    padding-right: 30px;
}

.modal-body li {
    margin: 12px 0;
}

.highlight-box {
    background: linear-gradient(135deg, #fff9e8 0%, #fef3c7 100%);
    border-right: 4px solid #d4af37;
    padding: 20px;
    margin: 25px 0;
    border-radius: 12px;
    font-size: 17px;
}

.example-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-right: 4px solid #10b981;
    padding: 20px;
    margin: 20px 0;
    border-radius: 12px;
}

.example-box h4 {
    color: #065f46;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.number-highlight {
    color: #d4af37;
    font-weight: 700;
    font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 110px !important;
    }

    .omega-float-header {
        padding: 10px 15px;
    }

    .float-header-content {
        flex-direction: column;
        gap: 12px;
    }

    .float-icon-text {
        width: 100%;
        justify-content: center;
    }

    .float-text {
        font-size: 13px;
        text-align: center;
    }

    .float-buttons {
        width: 100%;
        justify-content: center;
    }

    .float-btn {
        font-size: 13px;
        padding: 8px 18px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-body {
        padding: 25px 20px;
        font-size: 15px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .highlight-box, .example-box {
        padding: 15px;
        font-size: 15px;
    }

    .number-highlight {
        font-size: 18px;
    }
}
