/*==================================================
        Price Board UI 3.0
        Core Layout
==================================================*/

/*========== Reset ==========*/

*,
*::before,
*::after{

    margin:0;
    padding:0;
    box-sizing:border-box;

}

html{

    scroll-behavior:smooth;

}

body{

    direction:rtl;

    font-family:
    Tahoma,
    Arial,
    sans-serif;

    background:var(--bg);

    color:var(--text);

    transition:
    background .35s ease,
    color .35s ease;

}

/*========== Color System ==========*/

:root{

    --bg:#F1ECE6;

    --surface:#FBF8F4;

    --surface-hover:#FFFFFF;

    --border:#DDD2C5;

    --shadow:
    0 10px 24px rgba(114,92,69,.08);

    --shadow-hover:
    0 20px 45px rgba(114,92,69,.14);

    --text:#2E2A26;

    --text-light:#756656;

    --green:#16A34A;

    --red:#DC2626;

    --live:#22C55E;

    --radius:18px;

    --transition:.30s ease;

}

/*========== Dark Theme ==========*/

body.dark{

    --bg:#0F172A;

    --surface:#18233D;

    --surface-hover:#223152;

    --border:rgba(255,255,255,.06);

    --shadow:
    0 14px 30px rgba(0,0,0,.35);

    --shadow-hover:
    0 22px 50px rgba(0,0,0,.50);

    --text:#FFFFFF;

    --text-light:#AEBBD2;

}

/*========== Layout ==========*/

.container{

    width:min(1700px,95%);

    margin:auto;

    padding:34px 0 50px;

}

/*========== Header ==========*/

header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:30px;

    margin-bottom:36px;

}

.header-right{

    display:flex;

    align-items:center;

    gap:18px;

}

/*========== Logo ==========*/

.logo{

    display:flex;

    align-items:center;

    gap:12px;

    color:var(--text);

    font-size:32px;

    font-weight:700;

}

.dot{

    width:14px;

    height:14px;

    border-radius:50%;

    background:var(--live);

    box-shadow:

    0 0 10px rgba(34,197,94,.40);

}

/*========== Live Box ==========*/

.live-box{

    text-align:left;

}

.live-status{

    display:flex;

    align-items:center;

    justify-content:flex-end;

    gap:8px;

    color:var(--green);

    font-weight:700;

    margin-bottom:8px;

}

.live-dot{

    width:10px;

    height:10px;

    border-radius:50%;

    background:var(--live);

    animation:pulse 1.8s infinite;

}

.clock{

    font-size:30px;

    font-weight:700;

    color:var(--text);

    margin-bottom:6px;

}

.update-text{

    color:var(--text-light);

    font-size:13px;

}

/*========== Grid ==========*/

.grid{

    display:grid;

    grid-template-columns:

    repeat(auto-fill,minmax(190px,1fr));

    gap:18px;

}

/*========== Typography ==========*/

h1,h2,h3,h4,h5,h6{

    font-weight:700;

}

img{

    display:block;

    max-width:100%;

}

a{

    color:inherit;

    text-decoration:none;

}

button{

    font:inherit;

}
/*==================================================
            Premium Cards
==================================================*/

.card{

    position:relative;

    overflow:hidden;

    background:var(--surface);

    border:1px solid var(--border);

    border-radius:var(--radius);

    padding:18px;

    box-shadow:var(--shadow);

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background var(--transition),
        border-color var(--transition);

}

/* نوار طلایی بسیار ملایم بالای کارت */

.card::before{

    content:"";

    position:absolute;

    top:0;
    right:0;
    left:0;

    height:3px;

    background:linear-gradient(
        90deg,
        #D4AF37,
        #F4E4A6,
        #D4AF37
    );

    opacity:.45;

}

/* Hover */

.card:hover{

    transform:translateY(-6px);

    background:var(--surface-hover);

    border-color:rgba(212,175,55,.35);

    box-shadow:var(--shadow-hover);

}

/* کلیک */

.card:active{

    transform:scale(.985);

}

/*==================================================
                Icon
==================================================*/

.icon{

    width:56px;

    height:56px;

    margin:0 auto 14px;

    display:flex;

    justify-content:center;

    align-items:center;

    border-radius:16px;

    background:rgba(255,255,255,.45);

    backdrop-filter:blur(6px);

}

body.dark .icon{

    background:rgba(255,255,255,.05);

}

.icon img{

    width:38px;

    height:38px;

    object-fit:contain;

    transition:.3s;

}

.card:hover .icon img{

    transform:scale(1.08);

}

/*==================================================
                Title
==================================================*/

.title{

    text-align:center;

    color:var(--text-light);

    font-size:14px;

    font-weight:600;

    margin-bottom:10px;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}

/*==================================================
                Price
==================================================*/

.price{

    text-align:center;

    color:var(--text);

    font-size:28px;

    font-weight:700;

    letter-spacing:.3px;

    margin-bottom:14px;

    transition:.25s;

}

/*==================================================
            Change Badge
==================================================*/

.change{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    width:100%;

    padding:8px 0;

    border-radius:12px;

    font-size:14px;

    font-weight:700;

}

.change.up{

    color:#15803D;

    background:rgba(22,163,74,.10);

}

.change.down{

    color:#DC2626;

    background:rgba(220,38,38,.10);

}

/*==================================================
            Flash Animation
==================================================*/

.flash-up{

    animation:priceUp .7s;

}

.flash-down{

    animation:priceDown .7s;

}

@keyframes priceUp{

0%{

background:var(--surface);

}

40%{

background:#EAF8EF;

box-shadow:0 0 24px rgba(22,163,74,.18);

}

100%{

background:var(--surface);

}

}

@keyframes priceDown{

0%{

background:var(--surface);

}

40%{

background:#FCEEEE;

box-shadow:0 0 24px rgba(220,38,38,.15);

}

100%{

background:var(--surface);

}

}

/*==================================================
            Dark Theme
==================================================*/

body.dark .flash-up{

    animation:priceUpDark .7s;

}

body.dark .flash-down{

    animation:priceDownDark .7s;

}

@keyframes priceUpDark{

0%{

background:#18233D;

}

40%{

background:#21402D;

}

100%{

background:#18233D;

}

}

@keyframes priceDownDark{

0%{

background:#18233D;

}

40%{

background:#4A2020;

}

100%{

background:#18233D;

}

}
/*==================================================
            PHASE 3
       Header + Theme Switch
==================================================*/

/*---------- Header ----------*/

header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:30px;

    margin-bottom:32px;

    flex-wrap:wrap;

}

.header-right{

    display:flex;

    align-items:center;

    gap:20px;

}

/*---------- Theme Switch ----------*/

.theme-switch{

    display:flex;

    align-items:center;

    gap:12px;

}

.theme-icon{

    font-size:22px;

    transition:.35s;

    user-select:none;

}

.sun{

    color:#F59E0B;

}

.moon{

    color:#64748B;

}

/*---------- Switch ----------*/

.switch{

    position:relative;

    width:64px;

    height:34px;

    display:inline-block;

}

.switch input{

    display:none;

}

.slider{

    position:absolute;

    inset:0;

    border-radius:50px;

    cursor:pointer;

    background:#DDD2C5;

    transition:.35s;

    box-shadow:
        inset 0 2px 6px rgba(0,0,0,.08),
        0 3px 8px rgba(0,0,0,.10);

}

.slider::before{

    content:"";

    position:absolute;

    left:3px;

    top:3px;

    width:28px;

    height:28px;

    border-radius:50%;

    background:#fff;

    transition:.35s;

    box-shadow:
        0 4px 10px rgba(0,0,0,.18);

}

.switch input:checked + .slider{

    background:#2563EB;

}

.switch input:checked + .slider::before{

    transform:translateX(30px);

}

/*---------- Theme Icons ----------*/

body.dark .sun{

    opacity:.35;

}

body.dark .moon{

    opacity:1;

}

body:not(.dark) .moon{

    opacity:.35;

}

/*---------- Live Box ----------*/

.live-box{

    display:flex;

    flex-direction:column;

    align-items:flex-end;

}

.live-status{

    display:flex;

    align-items:center;

    gap:8px;

    color:var(--green);

    font-weight:700;

    margin-bottom:8px;

}

.live-dot{

    width:10px;

    height:10px;

    border-radius:50%;

    background:var(--live);

    box-shadow:0 0 12px rgba(34,197,94,.45);

    animation:pulse 1.8s infinite;

}

.clock{

    font-size:30px;

    font-weight:700;

    color:var(--text);

    letter-spacing:1px;

    margin-bottom:6px;

    font-variant-numeric:tabular-nums;

}

.update-text{

    color:var(--text-light);

    font-size:13px;

}

/*---------- Pulse ----------*/

@keyframes pulse{

    0%{

        transform:scale(1);

        opacity:1;

    }

    50%{

        transform:scale(1.35);

        opacity:.45;

    }

    100%{

        transform:scale(1);

        opacity:1;

    }

}

/*---------- Dark Theme ----------*/

body.dark .slider{

    background:#1E40AF;

}

body.dark .slider::before{

    background:#F8FAFC;

}

body.dark .logo{

    color:#FFFFFF;

}

body.dark .clock{

    color:#FFFFFF;

}

body.dark .update-text{

    color:#9CA3AF;

}

/*---------- Mobile ----------*/

@media(max-width:768px){

header{

    justify-content:center;

    text-align:center;

}

.header-right{

    width:100%;

    justify-content:center;

}

.live-box{

    width:100%;

    align-items:center;

}

.clock{

    font-size:26px;

}

}
/*==================================================
        PHASE 4
        Premium UI Effects
==================================================*/

/*-----------------------------
    Smooth Scrollbar
-----------------------------*/

::-webkit-scrollbar{

    width:11px;

}

::-webkit-scrollbar-track{

    background:var(--bg);

}

::-webkit-scrollbar-thumb{

    background:#C8B79E;

    border-radius:50px;

    border:2px solid var(--bg);

}

::-webkit-scrollbar-thumb:hover{

    background:#AE9A7E;

}

body.dark ::-webkit-scrollbar-thumb{

    background:#334155;

}

body.dark ::-webkit-scrollbar-thumb:hover{

    background:#475569;

}

/*-----------------------------
    Card Shine Effect
-----------------------------*/

.card{

    overflow:hidden;

}

.card::after{

    content:"";

    position:absolute;

    top:-140%;

    left:-60%;

    width:45%;

    height:320%;

    background:

    linear-gradient(

        rgba(255,255,255,0),

        rgba(255,255,255,.18),

        rgba(255,255,255,0)

    );

    transform:rotate(25deg);

    transition:1s;

}

.card:hover::after{

    left:140%;

}

/*-----------------------------
    Card Border Glow
-----------------------------*/

.card:hover{

    border-color:

    rgba(212,175,55,.45);

}

/*-----------------------------
    Price Animation
-----------------------------*/

.price{

    transition:

    color .25s,

    transform .25s;

}

.card:hover .price{

    transform:scale(1.03);

}

/*-----------------------------
    Icon Animation
-----------------------------*/

.icon{

    transition:.35s;

}

.card:hover .icon{

    transform:translateY(-3px);

}

/*-----------------------------
    Live Box
-----------------------------*/

.live-box{

    user-select:none;

}

.clock{

    font-variant-numeric:tabular-nums;

    letter-spacing:1px;

}

/*-----------------------------
    Fade Animation
-----------------------------*/

.fade-in{

    animation:fadeIn .7s;

}

@keyframes fadeIn{

0%{

opacity:0;

transform:translateY(10px);

}

100%{

opacity:1;

transform:translateY(0);

}

}

/*-----------------------------
    Glass Effect
-----------------------------*/

.icon{

    backdrop-filter:blur(12px);

}

body.dark .icon{

    backdrop-filter:blur(18px);

}

/*-----------------------------
    Selection
-----------------------------*/

::selection{

    background:#D4AF37;

    color:#fff;

}

body.dark ::selection{

    background:#2563EB;

}

/*-----------------------------
    Focus
-----------------------------*/

button:focus,

input:focus{

    outline:none;

}

/*-----------------------------
    Image Rendering
-----------------------------*/

img{

    user-select:none;

    -webkit-user-drag:none;

}

/* ===========================
      Mobile Optimization
=========================== */

@media (max-width: 768px){

    .container{
        width:96%;
        padding:12px;
    }

    header{
        flex-direction:column;
        gap:18px;
        align-items:stretch;
    }

    .header-right{
        justify-content:space-between;
    }

    .grid{

        grid-template-columns:repeat(2,1fr);

        gap:10px;

    }

    .card{

        padding:12px;

        border-radius:14px;

    }

    .icon img{

        width:32px;

        height:32px;

    }

    .title{

        font-size:13px;

        margin-top:8px;

    }

    .price{

        font-size:18px;

        margin:8px 0;

    }

    .change{

        font-size:12px;

    }

    .clock{

        font-size:22px;

    }

}

/*-----------------------------
    Reduce Motion
-----------------------------*/

@media (prefers-reduced-motion:reduce){

*{

animation:none!important;

transition:none!important;

scroll-behavior:auto!important;

}

}
/*==================================================
            PHASE 5
      Premium Dashboard Finish
==================================================*/

/*==============================
        Header Background
==============================*/

header{

    position:relative;

    padding:18px 24px;

    border-radius:24px;

    background:linear-gradient(
        135deg,
        rgba(255,255,255,.55),
        rgba(255,255,255,.20)
    );

    backdrop-filter:blur(18px);

    border:1px solid rgba(255,255,255,.35);

    box-shadow:
        0 12px 30px rgba(0,0,0,.06);

}

body.dark header{

    background:linear-gradient(
        135deg,
        rgba(28,37,61,.92),
        rgba(18,26,44,.82)
    );

    border:1px solid rgba(255,255,255,.05);

    box-shadow:
        0 15px 35px rgba(0,0,0,.35);

}

/*==============================
        Logo Animation
==============================*/

.logo{

    transition:.35s;

}

.logo:hover{

    transform:translateY(-2px);

}

.dot{

    animation:liveDot 2s infinite;

}

@keyframes liveDot{

0%{

transform:scale(1);

}

50%{

transform:scale(1.35);

}

100%{

transform:scale(1);

}

}

/*==============================
        Clock Card
==============================*/

.live-box{

    min-width:165px;

    padding:16px;

    border-radius:18px;

    background:rgba(255,255,255,.45);

    backdrop-filter:blur(12px);

    border:1px solid rgba(255,255,255,.4);

}

body.dark .live-box{

    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.06);

}

.clock{

    font-size:30px;

    font-weight:700;

    letter-spacing:2px;

    font-variant-numeric:tabular-nums;

}

/*==============================
        Card Number Style
==============================*/

.price{

    font-family:

    "Segoe UI",

    Arial,

    sans-serif;

    font-weight:700;

    letter-spacing:.6px;

    font-variant-numeric:

    tabular-nums;

}

/*==============================
        Card Glow
==============================*/

.card{

    position:relative;

}

.card:hover{

    box-shadow:

    0 18px 40px rgba(0,0,0,.10),

    0 0 0 1px rgba(212,175,55,.18);

}

body.dark .card:hover{

    box-shadow:

    0 22px 48px rgba(0,0,0,.45),

    0 0 0 1px rgba(96,165,250,.18);

}

/*==============================
        Status Badge
==============================*/

.market-status{

    display:inline-flex;

    align-items:center;

    gap:8px;

    padding:7px 14px;

    border-radius:40px;

    font-size:13px;

    font-weight:700;

    color:#15803D;

    background:#ECFDF5;

}

.market-status::before{

    content:"";

    width:9px;

    height:9px;

    border-radius:50%;

    background:#22C55E;

    animation:pulseBadge 1.5s infinite;

}

body.dark .market-status{

    background:#173126;

    color:#4ADE80;

}

@keyframes pulseBadge{

0%{

transform:scale(1);

opacity:1;

}

50%{

transform:scale(1.45);

opacity:.5;

}

100%{

transform:scale(1);

opacity:1;

}

}

/*==============================
        Card Loading
==============================*/

.card.loading{

    overflow:hidden;

}

.card.loading::after{

    content:"";

    position:absolute;

    inset:0;

    background:

    linear-gradient(

        90deg,

        transparent,

        rgba(255,255,255,.35),

        transparent

    );

    transform:translateX(-100%);

    animation:loading 1.2s infinite;

}

body.dark .card.loading::after{

    background:

    linear-gradient(

        90deg,

        transparent,

        rgba(255,255,255,.08),

        transparent

    );

}

@keyframes loading{

100%{

transform:translateX(100%);

}

}

/*==============================
        Footer Shadow
==============================*/

.container{

    position:relative;

}

.container::after{

    content:"";

    position:absolute;

    left:0;

    right:0;

    bottom:-30px;

    height:40px;

    background:

    radial-gradient(

        ellipse,

        rgba(0,0,0,.04),

        transparent

    );

}

body.dark .container::after{

    background:

    radial-gradient(

        ellipse,

        rgba(255,255,255,.02),

        transparent

    );

}

/*==============================
        Better Mobile
==============================*/

@media(max-width:640px){

header{

    padding:16px;

}

.live-box{

    width:100%;

}

.price{

    font-size:24px;

}

.title{

    font-size:14px;

}

.card{

    padding:16px;

}

}

/*==============================
      Ultra Smooth
==============================*/

body,

.card,

header,

.live-box{

    transition:

    background .35s,

    color .35s,

    border-color .35s,

    box-shadow .35s,

    transform .25s;

}

/*==============================
        Services
==============================*/

.services{

    margin-top:45px;

}

.services h2{

    font-size:24px;

    margin-bottom:20px;

    text-align:center;

}

.service-grid{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:20px;

}

.service-card{

    background:#FBF8F4;

    border-radius:18px;

    padding:25px;

    text-decoration:none;

    color:#2F2A26;

    text-align:center;

    transition:.3s;

    box-shadow:0 8px 20px rgba(0,0,0,.08);

}

.service-card i{

    font-size:34px;

    margin-bottom:15px;

    color:#D4AF37;

}

.service-card span{

    display:block;

    font-weight:bold;

    font-size:18px;

}

.service-card:hover{

    transform:translateY(-5px);

    box-shadow:0 18px 35px rgba(0,0,0,.12);

}

body.dark .service-card{

    background:#18233d;

    color:#ffffff;

}

body.dark .service-card i{

    color:#f5c542;

}

@media(max-width:768px){

    .service-grid{

        grid-template-columns:1fr;

    }

}
.rate-source{

    margin-top:10px;

    font-size:13px;

    color:#8A7C70;

    line-height:1.7;

    font-weight:500;

    text-align:left;

    opacity:.9;

}

body.dark .rate-source{

    color:#AAB7CF;

}
