/* ==========================
   پایه
========================== */
html, body {
    margin: 0;
    padding: 0;
    direction: rtl;
    font-family: "Poppins", sans-serif;
    background-color: #0b1d17;
    color: #d1d5db;
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

/* اسکرول‌بار */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #050c09; }
::-webkit-scrollbar-thumb {
    background: #1f3d2b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #2a4f3b; }

/* ==========================
   هدر اصلی
========================== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #0b1d17, #1f3d2b);
    padding: 15px 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.7);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-main-title {
    font-size: 22px;
    color: #c9a227;
    font-weight: 700;
}

.mg-logo {
    font-size: 22px;
    font-weight: 700;
    color: #c9a227;
}

.mg-text {
    font-size: 14px;
    color: #e5e7eb;
}

/* لوگوی وسط هدر */
.header-logo-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 50;
}

.header-logo-animated {
    width: 160px;
    opacity: 0;
    animation: logoFadeGlow 10s ease-in-out infinite;
}

@keyframes logoFadeGlow {
    0% { opacity: 0; filter: drop-shadow(0 0 0px rgba(255,215,0,0)); }
    20% { opacity: 1; }
    40% { filter: drop-shadow(0 0 10px rgba(255,215,0,0.5)); }
    60% { filter: drop-shadow(0 0 18px rgba(255,215,0,0.9)); }
    75% { filter: drop-shadow(0 0 6px rgba(255,215,0,0.4)); }
    100% { opacity: 0; }
}

/* ==========================
   کانتینر کارت‌ها
========================== */
.container {
    margin: 30px auto 40px;
    width: 95%;
    max-width: 900px;
}

.card {
    background: radial-gradient(circle at top left, #122821 0%, #0b1d17 55%, #050c09 100%);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    border-right: 4px solid #c9a227;
    box-shadow: 0 4px 16px rgba(0,0,0,0.85);
    position: relative;
}

/* ==========================
   کارت ساعت — نسخه جدید
========================== */
/* ظرف ساعت */
.clock-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
    padding-top: 10px;
}

/* آیکون کنار ساعت */
.clock-icon {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 4px rgba(255,215,0,0.7));
}

/* ساعت شیشه‌ای */
.glass-clock {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 0 18px rgba(255,215,0,0.35);
}

/* ساعت آنالوگ */
.real-clock {
    width: 90px;
    height: 90px;
    position: relative;
}

.clock-face {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: inset 0 0 12px rgba(255,255,255,0.25),
                0 0 12px rgba(255,215,0,0.4);
    position: relative;
}

/* عقربه‌ها */
.hand {
    width: 50%;
    height: 3px;
    background: rgba(255,215,0,0.9);
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 0% 50%;
    border-radius: 3px;
}

.second-hand {
    height: 2px;
    background: rgba(255,80,80,0.9);
}

.center-dot {
    width: 10px;
    height: 10px;
    background: rgba(255,215,0,0.9);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================
   ریسپانسیو موبایل
========================== */
@media (max-width: 768px) {

    .clock-wrapper {
        gap: 8px;
        padding-top: 5px;
    }

    .clock-icon {
        width: 22px;
        height: 22px;
    }

    .real-clock {
        width: 70px;
        height: 70px;
    }

    .center-dot {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {

    .clock-wrapper {
        gap: 6px;
        padding-top: 3px;
    }

    .clock-icon {
        width: 20px;
        height: 20px;
    }

    .real-clock {
        width: 60px;
        height: 60px;
    }
}

/* ==========================
   هشدار
========================== */
.alert-card {
    background: linear-gradient(135deg, #1f2933, #243b33);
    color: #fef9c3;
}

.phone-icon {
    font-size: 20px;
    color: #c9a227;
}

.heartbeat {
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    10% { transform: scale(1.25); }
    20% { transform: scale(1); }
    30% { transform: scale(1.25); }
    40% { transform: scale(1); }
}

/* ==========================
   قیمت خرید/فروش
========================== */
.title {
    font-size: 18px;
    font-weight: 700;
    color: #e5e7eb;
}

.price-main-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.price-main-value {
    font-size: 28px;
    font-weight: 700;
    transition: 0.3s;
}

.price-arrow {
    font-size: 26px;
}

.center-text {
    text-align: center;
}

.price-card.price-up .price-main-value { color: #22c55e; }
.price-card.price-down .price-main-value { color: #ef4444; }

.arrow-up { color: #22c55e; }
.arrow-down { color: #ef4444; }

/* ==========================
   لایه قفل قیمت لحظه‌ای
========================== */
.lock-layer {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lock-layer.active {
    display: flex;
}

.lock-icon {
    font-size: 40px;
    color: gold;
    animation: lockPulse 2s infinite;
}

.lock-text {
    margin-top: 8px;
    color: #fef9c3;
    font-size: 16px;
}

@keyframes lockPulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(1); opacity: 0.5; }
}

/* ==========================
   مسکوکات — ساختار جدید
========================== */
.coin-card {
    background: radial-gradient(circle at top, #122821 0%, #050c09 100%);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.7);
    position: relative;
}

.coin-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.coin-title span {
    font-size: 18px;
    font-weight: 700;
    color: #d4af37;
    text-shadow: 0 0 6px rgba(212,175,55,0.6);
}

.coin-icon {
    width: 40px;
    filter: drop-shadow(0 0 4px rgba(212,175,55,0.7));
}

.coin-section {
    margin-top: 10px;
    text-align: center;
}

.coin-price {
    font-size: 16px;
    font-weight: 700;
    color: #e5e7eb;
    transition: 0.3s;
}

.coin-arrow {
    font-size: 16px;
}

.coin-arrow.up { color: #22c55e; }
.coin-arrow.down { color: #ef4444; }

/* قفل مسکوکات */
.coin-card.locked {
    opacity: 0.45;
    filter: grayscale(100%);
    pointer-events: none;
}

.coin-card.locked::after {
    content: "🔒";
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 26px;
    color: gold;
    animation: lockPulse 2s infinite;
}

/* ==========================
   آدرس و اینستاگرام
========================== */
.hover-link {
    color: #c9a227;
    cursor: pointer;
    transition: 0.3s;
}

.hover-link:hover {
    color: #fef9c3;
    text-shadow: 0 0 8px rgba(201,162,39,0.6);
}

/* ==========================
   پاپ‌آپ تماس — نسخه جدید
========================== */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-box {
    background: radial-gradient(circle at top, #122821 0%, #050c09 100%);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #c9a227;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 0 12px rgba(201,162,39,0.4);
}

.popup-buttons button {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: #1f3d2b;
    border: 1px solid #c9a227;
    color: #fef9c3;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.popup-buttons button:hover {
    background: #2a4f3b;
}

/* ==========================
   فوتر
========================== */
.main-footer {
    background: #050c09;
    padding: 10px 20px;
    border-top: 1px solid #1f3d2b;
    text-align: center;
    color: #9ca3af;
}

/* ==========================
   دکمه اسکرول
========================== */
.scroll-buttons {
    position: fixed;
    right: 15px;
    bottom: 15px;
    z-index: 999;
}

.scroll-buttons button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle, #122821 0%, #050c09 100%);
    color: #c9a227;
    border: 1px solid rgba(201,162,39,0.4);
}

/* ==========================
   ریسپانسیو
========================== */
@media (max-width: 768px) {

    .main-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 15px;
    }

    .header-main-title { font-size: 16px; }
    .mg-text { font-size: 12px; }

    .header-logo-center {
        transform: translate(-50%, -50%) scale(0.7);
    }

    .header-logo-animated { width: 110px; }

    .price-main-value { font-size: 24px; }

    .coin-price { font-size: 14px; }
    .coin-title span { font-size: 16px; }
}

@media (max-width: 480px) {
    .header-logo-center {
        transform: translate(-50%, -50%) scale(0.6);
        top: 55%;
    }
    .header-logo-animated { width: 100px; }
}
