/* فونت‌ها */
@font-face {
    font-family: 'IRANSans';
    src: url('/main/fonts/IRANSans.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mjt';
    src: url('/main/assets/fonts/Mjt.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* انیمیشن‌ها */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.8);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(184, 134, 11, 0);
        transform: scale(1.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(184, 134, 11, 0);
        transform: scale(1);
    }
}

/* استایل‌های اصلی بخش قیمت‌ها */
.prices {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    font-family: 'IRANSans', sans-serif;
}

/* عنوان‌های بخش */
.prices h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: var(--accent);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prices h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 1px;
}

/* زمان به‌روزرسانی کلی */
.global-update-time {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-family: 'IRANSans', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.global-update-time i {
    color: var(--accent);
    font-size: 0.95rem;
}

.global-update-time .update-time {
    background: var(--accent);
    color: var(--bg-primary);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-family: 'IRANSans', sans-serif;
}

/* کانتینر قیمت‌ها */
.price-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.price-container.currency-prices,
.price-container.gold-prices {
    padding: 15px;
    background: linear-gradient(135deg, rgba(44, 51, 56, 0.9), rgba(60, 70, 75, 0.9));
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* آیتم‌های قیمت */
.price-item {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid rgba(184, 134, 11, 0.3);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
}

/* عنوان آیتم قیمت */
.price-title {
    background: linear-gradient(90deg, var(--bg-secondary), var(--bg-primary));
    color: var(--text-primary);
    padding: 10px 12px;
    width: 100%;
    text-align: right;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'IRANSans', sans-serif;
}

/* اطلاعات قیمت */
.price-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.price-info i {
    font-size: 1.1rem;
    color: var(--accent);
}

.price-info .field-name {
    font-family: 'IRANSans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* جزئیات قیمت */
.price-details {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.price-title .price-value {
    font-family: 'IRANSans', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    white-space: nowrap;
}

.price-title .toman {
    font-family: 'Mjt', sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.price-title .live-indicator {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.price-title .price-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'IRANSans', sans-serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.price-title .price-time i {
    color: var(--accent);
    font-size: 0.9rem;
}

.price-title .price-time .update-time {
    background: var(--accent);
    color: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'IRANSans', sans-serif;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .prices {
        padding: 30px 10px;
    }

    .prices h2 {
        font-size: 1.6rem;
    }

    .prices h2::after {
        width: 50px;
        height: 2px;
    }

    .global-update-time {
        font-size: 0.85rem;
    }

    .global-update-time .update-time {
        font-size: 0.8rem;
        padding: 2px 6px;
    }

    .price-container {
        gap: 10px;
        grid-template-columns: repeat(2, 1fr);
    }

    .price-container.currency-prices,
    .price-container.gold-prices {
        padding: 10px;
    }

    .price-item {
        min-width: 0;
        text-align: center; /* وسط‌چین کردن آیتم‌ها */
    }

    .price-title {
        font-size: 1rem;
        padding: 8px 10px;
        flex-direction: column; /* ستونی کردن در موبایل */
        align-items: center; /* وسط‌چین کردن محتوا */
        gap: 4px;
        text-align: center; /* وسط‌چین کردن متن */
    }

    .price-info {
        gap: 6px;
        width: 100%;
        justify-content: center; /* وسط‌چین کردن اطلاعات */
    }

    .price-info i {
        font-size: 1rem;
    }

    .price-info .field-name {
        font-size: 1rem;
        text-align: center; /* وسط‌چین کردن نام فیلد */
    }

    .price-details {
        flex-direction: column; /* زمان به زیر قیمت */
        align-items: center; /* وسط‌چین کردن جزئیات */
        gap: 4px;
        width: 100%;
        justify-content: center;
    }

    .price-title .price-value {
        font-size: 1.05rem;
        text-align: center; /* وسط‌چین کردن قیمت */
    }

    .price-title .toman {
        font-size: 0.85rem;
    }

    .price-title .live-indicator {
        width: 6px;
        height: 6px;
    }

    .price-title .price-time {
        font-size: 0.8rem;
        justify-content: center; /* وسط‌چین کردن زمان */
        text-align: center;
    }

    .price-title .price-time .update-time {
        font-size: 0.75rem;
        padding: 2px 5px;
    }
}

@media (max-width: 576px) {
    .prices {
        padding: 20px 5px;
    }

    .prices h2 {
        font-size: 1.4rem;
    }

    .prices h2::after {
        width: 40px;
        height: 2px;
    }

    .global-update-time {
        font-size: 0.8rem;
    }

    .global-update-time .update-time {
        font-size: 0.75rem;
        padding: 2px 5px;
    }

    .price-container {
        gap: 8px;
        grid-template-columns: repeat(2, 1fr);
    }

    .price-container.currency-prices,
    .price-container.gold-prices {
        padding: 8px;
    }

    .price-item {
        min-width: 0;
        text-align: center;
    }

    .price-title {
        font-size: 0.95rem;
        padding: 6px 8px;
        gap: 3px;
    }

    .price-info {
        gap: 5px;
        justify-content: center;
    }

    .price-info i {
        font-size: 0.95rem;
    }

    .price-info .field-name {
        font-size: 0.95rem;
    }

    .price-details {
        gap: 3px;
        justify-content: center;
    }

    .price-title .price-value {
        font-size: 1rem;
    }

    .price-title .toman {
        font-size: 0.8rem;
    }

    .price-title .live-indicator {
        width: 5px;
        height: 5px;
    }

    .price-title .price-time {
        font-size: 0.75rem;
    }

    .price-title .price-time .update-time {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
}

@media (max-width: 360px) {
    .price-container {
        gap: 6px;
    }

    .price-title {
        font-size: 0.9rem;
        padding: 5px 6px;
    }

    .price-info .field-name {
        font-size: 0.9rem;
    }

    .price-title .price-value {
        font-size: 0.95rem;
    }

    .price-title .toman {
        font-size: 0.75rem;
    }

    .price-title .price-time .update-time {
        font-size: 0.65rem;
    }
}