@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --bg: #F4F5F8;
    --bg2: #EAEAEE;
    --card: rgba(255, 255, 255, 0.75);
    --card-solid: #FFFFFF;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --card-shadow-hover: 0 10px 40px rgba(99, 102, 241, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    --text: #1C1C1E;
    --text2: #6C6C70;
    --text3: #A1A1A6;
    --border: rgba(0, 0, 0, 0.05);
    --accent: #5E5CE6;
    --accent-glow: rgba(94, 92, 230, 0.25);
    --accent-gradient: linear-gradient(135deg, #5E5CE6, #30B0C7);
    --green: #34C759;
    --green-bg: rgba(52, 199, 89, 0.12);
    --red: #FF3B30;
    --red-bg: rgba(255, 59, 48, 0.12);
    --gold: #FF9500;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-border: rgba(0, 0, 0, 0.04);
    --radius: 24px;
    --radius-sm: 16px;
    --radius-pill: 100px;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --safe-bottom: env(safe-area-inset-bottom, 16px);
    --safe-top: env(safe-area-inset-top, 0px);
    --header-h: 68px;
}

.dark {
    --bg: #0A0A0C;
    --bg2: #141416;
    --card: rgba(28, 28, 30, 0.7);
    --card-solid: #1C1C1E;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 10px 40px rgba(94, 92, 230, 0.25), 0 4px 12px rgba(0, 0, 0, 0.4);
    --text: #F2F2F7;
    --text2: #EBEBF599;
    --text3: #EBEBF54D;
    --border: rgba(255, 255, 255, 0.05);
    --nav-bg: rgba(20, 20, 22, 0.85);
    --nav-border: rgba(255, 255, 255, 0.05);
    --green: #30D158;
    --green-bg: rgba(48, 209, 88, 0.15);
    --red: #FF453A;
    --red-bg: rgba(255, 69, 58, 0.15);
    --accent: #5E5CE6;
    --accent-glow: rgba(94, 92, 230, 0.35);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Vazirmatn', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--safe-top);
    transition: background 0.5s ease, color 0.5s ease;
}

/* ===== HEADER ===== */
.app-header {
    position: sticky;
    top: 0;
    top: var(--safe-top);
    z-index: 100;
    height: var(--header-h);
    background: var(--nav-bg);
    backdrop-filter: blur(28px) saturate(2);
    -webkit-backdrop-filter: blur(28px) saturate(2);
    border-bottom: 1px solid var(--nav-border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.app-header-logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-header-logo .logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px var(--accent-glow);
}

.app-header-logo span {
    color: var(--accent);
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-live {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    background: var(--bg2);
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.live-pulse {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(48, 209, 88, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(48, 209, 88, 0);
    }
}

.theme-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.theme-btn:active {
    transform: scale(0.95);
}

/* ===== MAIN ===== */
.app-main {
    padding: 20px 20px calc(120px + var(--safe-bottom));
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SEARCH ===== */
.search-wrap {
    margin-bottom: 20px;
}

.search-wrap-inner {
    position: relative;
}

.search-box {
    width: 100%;
    padding: 16px 20px 16px 50px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    box-shadow: var(--card-shadow);
    outline: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-box::placeholder {
    color: var(--text3);
}

.search-box:focus {
    border-color: var(--accent);
    background: var(--card-solid);
    box-shadow: 0 0 0 4px var(--accent-glow), var(--card-shadow-hover);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text3);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.3s;
}

.search-box:focus~.search-icon {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
}

/* ===== HORIZONTAL SCROLLING CONTAINER => VERTICAL LIST ===== */
.horizontal-scroll-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    background: var(--card);
    border-radius: var(--radius-sm);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}

/* ===== LIST ITEM ===== */
.list-item {
    width: 100%;
    background: transparent;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: var(--bg2);
}

.list-item:active {
    background: rgba(94, 92, 230, 0.08);
    /* Soft primary tint on tap */
}

.list-item.expanded {
    background: var(--card-solid);
}

/* Row Main Container */
.row-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 12px;
}

/* Row Left Side */
.row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.row-icon-wrap {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.row-emoji-icon {
    font-size: 32px;
    line-height: 1;
    display: block;
}

.row-img-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.row-name-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.row-name-fa {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-name-en {
    font-size: 11px;
    font-weight: 500;
    color: var(--text3);
    direction: ltr;
    text-align: right;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 1px;
}

/* Row Right Side */
.row-right {
    flex-shrink: 0;
    text-align: left;
}

.row-price-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.row-price-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

.row-change {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-pill);
    direction: ltr;
}

.row-change.up {
    background: var(--green-bg);
    color: var(--green);
}

.row-change.down {
    background: var(--red-bg);
    color: var(--red);
}

.row-change.flat {
    background: var(--bg2);
    color: var(--text3);
}

/* Chart Area */
.card-chart {
    display: none;
    padding: 4px 16px 16px;
    border-top: 1px dashed var(--border);
    margin-top: -6px;
}

.card-chart.visible {
    display: block;
    animation: slideDown 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ===== BOTTOM NAV DOCK ===== */
.bottom-nav {
    position: fixed;
    bottom: calc(24px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    background: var(--nav-bg);
    backdrop-filter: blur(28px) saturate(2);
    -webkit-backdrop-filter: blur(28px) saturate(2);
    border: 1px solid var(--nav-border);
    border-radius: var(--radius-pill);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 2px 10px rgba(0, 0, 0, 0.05);
    width: calc(100% - 40px);
    max-width: 440px;
}

.dark .bottom-nav {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 20px;
    border: none;
    background: transparent;
    color: var(--text3);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Vazirmatn', sans-serif;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.nav-tab:active {
    transform: scale(0.92);
}

.nav-tab.active {
    color: var(--accent);
    background: var(--bg2);
}

.nav-tab i {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-tab.active i {
    transform: translateY(-2px) scale(1.1);
    filter: drop-shadow(0 4px 6px var(--accent-glow));
}

.nav-tab span {
    font-size: 11px;
    font-weight: 800;
    transition: transform 0.3s;
}

.nav-tab.active span {
    transform: translateY(2px);
}

/* ===== CARD VIEW SPECIFIC ===== */
.horizontal-scroll-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-bottom: 16px;
    margin: 0;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll-container.wrap-mode {
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}

.horizontal-scroll-container.wrap-mode .price-card {
    width: 100%;
}

.horizontal-scroll-container .price-card {
    width: 100%;
    scroll-snap-align: center;
}

.price-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.price-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(94, 92, 230, 0.3);
}

.price-card:active {
    transform: scale(0.97);
}

.price-card::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20px;
    bottom: 20px;
    width: 4px;
    border-radius: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: scaleY(0.5);
}

.price-card:hover::after,
.price-card.expanded::after {
    opacity: 1;
    transform: scaleY(1);
}

.price-card.expanded {
    box-shadow: var(--card-shadow-hover);
    background: var(--card-solid);
    border-color: var(--accent);
    grid-column: span 2;
    /* Take full width when expanded for chart */
}

.card-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 10px;
    gap: 8px;
}

.card-flag {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    line-height: 1;
    flex-shrink: 0;
}

.card-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-name-fa {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-name-en {
    font-size: 10px;
    font-weight: 500;
    color: var(--text3);
    direction: ltr;
    text-align: right;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.card-price-col {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-top: 0;
}

.card-price-val {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text);
    direction: ltr;
    display: block;
    font-variant-numeric: tabular-nums;
}

.card-price-unit {
    font-size: 10px;
    font-weight: 600;
    color: var(--text3);
    display: block;
    text-transform: uppercase;
}

.card-change {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-pill);
    margin-top: 1px;
}

.card-change.up {
    background: var(--green-bg);
    color: var(--green);
}

.card-change.down {
    background: var(--red-bg);
    color: var(--red);
}

.card-change.flat {
    background: var(--bg2);
    color: var(--text3);
}

.card-buysell {
    display: flex;
    flex-direction: column;
    margin: 0 8px 6px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg2);
}

.buysell-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 10px;
}

.buysell-item.buy {
    border-left: none;
    border-top: 1px solid var(--border);
}

.buysell-label {
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.buysell-item.buy .buysell-label {
    color: var(--green);
}

.buysell-item.sell .buysell-label {
    color: var(--red);
}

.buysell-item.buy .buysell-label::before {
    content: '↓';
    font-size: 11px;
}

.buysell-item.sell .buysell-label::before {
    content: '↑';
    font-size: 11px;
}

.buysell-val {
    font-size: 13px;
    font-weight: 800;
    direction: ltr;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.card-spark {
    padding: 0 10px 8px;
    height: 32px;
}

.card-spark canvas {
    width: 100% !important;
    height: 100% !important;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

.skeleton {
    background: var(--card);
    border-radius: var(--radius);
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

.skeleton .skel-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg2);
    animation: shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton .skel-line {
    height: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton .skel-price {
    width: 100%;
    height: 24px;
    border-radius: 6px;
    margin-top: 8px;
}

/* SKELETON ROW */
.skeleton-row {
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    background: transparent;
}

.skel-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg2);
    animation: shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.skel-lines {
    flex: 1;
}

.skel-line {
    height: 10px;
    border-radius: 4px;
    background: var(--bg2);
    animation: shimmer 1.5s ease-in-out infinite;
    margin-bottom: 6px;
}

.skel-line:first-child {
    width: 40%;
}

.skel-line:last-child {
    width: 25%;
    margin-bottom: 0;
}

.skel-price {
    width: 70px;
    height: 24px;
    border-radius: 6px;
    background: var(--bg2);
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text3);
}

.empty-state .icon {
    font-size: 56px;
    margin-bottom: 16px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
    opacity: 0.8;
}

.empty-state p {
    font-size: 15px;
    font-weight: 600;
}

/* INSTALL BANNER */
.install-banner {
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 16px;
    color: white;
    box-shadow: 0 10px 30px var(--accent-glow);
}

.install-banner.show {
    display: flex;
    animation: slideDown 0.4s ease;
}

.install-banner-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.install-banner-title {
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 4px;
}

.install-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 800;
    backdrop-filter: blur(4px);
    transition: var(--transition);
}

.install-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.95);
}

.install-dismiss {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.install-dismiss:hover {
    color: white;
}

/* FLASH ANIMATIONS */
@keyframes flash-up {
    0% {
        background: transparent;
    }

    25% {
        background: var(--green-bg);
    }

    100% {
        background: transparent;
    }
}

@keyframes flash-down {
    0% {
        background: transparent;
    }

    25% {
        background: var(--red-bg);
    }

    100% {
        background: transparent;
    }
}

.flash-up {
    animation: flash-up 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.flash-down {
    animation: flash-down 1s cubic-bezier(0.25, 1, 0.5, 1);
}

/* UPDATE TOAST */
.update-toast {
    position: fixed;
    top: calc(84px + var(--safe-top));
    left: 50%;
    transform: translateX(-50%) translateY(-20px) scale(0.9);
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 500;
    white-space: nowrap;
    pointer-events: none;
}

.update-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

/* RESPONSIVE */
@media (min-width: 600px) {
    .app-main {
        padding-top: 30px;
    }

    .bottom-nav {
        max-width: 440px;
    }
}

@media (prefers-color-scheme: dark) {
    body:not(.light) {
        --bg: #0A0A0C;
        --bg2: #141416;
        --card: rgba(28, 28, 30, 0.7);
        --card-solid: #1C1C1E;
        --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
        --card-shadow-hover: 0 10px 40px rgba(94, 92, 230, 0.25), 0 4px 12px rgba(0, 0, 0, 0.4);
        --text: #F2F2F7;
        --text2: #EBEBF599;
        --text3: #EBEBF54D;
        --border: rgba(255, 255, 255, 0.05);
        --nav-bg: rgba(20, 20, 22, 0.85);
        --nav-border: rgba(255, 255, 255, 0.05);
        --green: #30D158;
        --green-bg: rgba(48, 209, 88, 0.15);
        --red: #FF453A;
        --red-bg: rgba(255, 69, 58, 0.15);
        --accent: #5E5CE6;
        --accent-glow: rgba(94, 92, 230, 0.4);
    }
}

/* ===== PICKER OVERLAY ===== */
#picker-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    backdrop-filter: blur(4px);
}

#picker-overlay.open {
    display: block;
}

/* ===== CURRENCY PICKER SHEET ===== */
#currency-picker-sheet {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    z-index: 300;
    max-height: 65vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
}

#currency-picker-sheet.open {
    transform: translateY(0);
}

.picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.picker-close-btn {
    background: none;
    border: none;
    color: var(--text2);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

#currency-picker-list {
    overflow-y: auto;
    padding: 8px 12px 24px;
}

.picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.picker-item:active {
    background: var(--border);
}

.picker-flag {
    font-size: 32px;
    line-height: 1;
}

.picker-info {
    flex: 1;
}

.picker-name-fa {
    font-size: 14px;
    font-weight: 600;
}

.picker-name-en {
    font-size: 11px;
    color: var(--text2);
    margin-top: 2px;
}

.picker-add {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== ADD CURRENCY CARD ===== */
.add-currency-card {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border);
    background: transparent !important;
    cursor: pointer;
    min-height: 90px;
}

.add-currency-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.add-currency-plus {
    font-size: 28px;
    color: var(--accent);
    line-height: 1;
}

.add-currency-label {
    font-size: 11px;
    color: var(--text2);
}

/* ===== ADD CURRENCY ROW ===== */
.add-currency-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-top: 1px dashed var(--border);
}

.add-currency-plus-sm {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

/* ===== UNPIN BUTTON ===== */
.price-card {
    position: relative;
}

.unpin-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    z-index: 10;
}

.unpin-btn:hover {
    background: var(--red);
    color: white;
}

.unpin-btn-list {
    background: none;
    border: none;
    color: var(--text3);
    font-size: 12px;
    cursor: pointer;
    padding: 0 6px;
    flex-shrink: 0;
    order: -1;
    transition: color 0.15s;
}

.unpin-btn-list:hover {
    color: var(--red);
}