
﻿ 
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

:root {
    --bg-primary: #121214;
    --bg-secondary: #1a1a1e;
    --bg-tertiary: #26262b;
    --accent: #22c55e;
    --accent-hover: #16a34a;
    --accent-light: rgba(34, 197, 94, 0.15);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-primary);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
}
 
.app-container {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    background-color: var(--bg-primary);
    background-image: url('bg-pattern.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scrollbar-width: none;
}
.app-container::-webkit-scrollbar {
    display: none;
}

 
.central-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: min(6px, calc(var(--app-height, 100vh) * 0.008)) 12px;
    gap: min(4px, calc(var(--app-height, 100vh) * 0.005));
}

 
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: env(safe-area-inset-top, 0px) 14px 4px 14px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn svg {
    width: 27px !important;
    height: 27px !important;
}

.header-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.header-btn:active {
    transform: scale(0.95);
}

.logo-area {
    display: flex;
    align-items: center;
    pointer-events: none;
    margin-left: 18px;
}

.app-logo-img {
    height: 42px;
    width: auto;
    max-width: 50vw;
    object-fit: contain;
}

 
.dynamic-remote-banner-wrapper {
    margin: 10px 14px 0 14px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: slideDownFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.dynamic-remote-banner-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 4px;
}

@keyframes slideDownFadeIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

 
 
.football-marquee-container {
    margin: 8px 14px 0 14px;
    height: 50px;  
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    background-color: #333333;
    border-radius: 12px;
    z-index: 10;
    touch-action: none;
    box-sizing: border-box;
}

 
.football-marquee-container::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(90deg, #7b2cbf, #ff007f, #ff8c00); 
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 20;
}

.football-marquee-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
}

.football-pill {
     
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    height: 50px; 
    width: 100%;
    padding: 0 8px;  
    flex-shrink: 0;
}

.pill-time {
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    font-style: italic;
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 30px 0 10px;
    border-radius: 8px 0 0 8px; 
    z-index: 1; 
    box-shadow: inset -3px 0 8px rgba(255, 0, 255, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}
.pill-time.live {
    background-color: #ffffff !important;
    color: #000000 !important;
    animation: pulse-live 1.5s infinite;
}
.pill-time.finished,
.dark-mode .pill-time.finished { 
    background-color: #000000 !important; 
    color: #ffffff !important; 
    padding-left: 4px !important;
}
.dark-mode .pill-time { background-color: #ffffff; color: #000000; }

.pill-teams-wrapper {
    background-color: #1a1a1a;
    height: 36px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 10px 0 6px;
    z-index: 2; 
    margin-left: -24px;  
    flex-grow: 1;  
    box-shadow: -4px 0 8px rgba(0,0,0,0.5); 
    position: relative;
}

.pill-team-left { 
    display: flex; 
    align-items: center; 
    justify-content: flex-end;  
    gap: 8px; 
    margin-right: 12px; 
}

.pill-team-right { 
    display: flex; 
    align-items: center; 
    justify-content: flex-start;  
    gap: 8px; 
    margin-left: 12px; 
}

.pill-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.5px;
}

.pill-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 3px;
}

.pill-center {
    background-color: #00e5ff;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 12px;
    gap: 40px;  
    flex-shrink: 0;
}

.pill-center.pen-score {
    background: linear-gradient(to right, #a855f7, #ec4899, #f97316);
}

.pill-center.pen-score .pill-score {
    color: #ffffff;
}

.pen-text-gradient {
    background: linear-gradient(to right, #a855f7, #ec4899, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.fin-text-gradient {
    background: linear-gradient(to right, #e91e63, #ff0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.pill-score {
    color: #000000;
    font-size: 14px;
    font-weight: 800;
    font-style: italic;
}

.pill-logo-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    height: 44px;
    width: 38px;
}

.pill-logo-img {
    height: 52px; 
    object-fit: contain;
    filter: drop-shadow(1.5px 0 0 black) drop-shadow(-1.5px 0 0 black) drop-shadow(0 1.5px 0 black) drop-shadow(0 -1.5px 0 black) drop-shadow(0px 3px 4px rgba(0, 0, 0, 0.6));
}

@keyframes marquee-vertical {
    0%, 15% { transform: translateY(0); }
    20%, 35% { transform: translateY(-80px); }
    40%, 55% { transform: translateY(-160px); }
    60%, 75% { transform: translateY(-240px); }
    80%, 95% { transform: translateY(-320px); }
    100% { transform: translateY(-400px); }
}

@keyframes pulse-live {
    0% {
        box-shadow: inset -3px 0 10px rgba(255, 0, 255, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.4), 0 0 5px rgba(239, 68, 68, 0.2);
    }
    50% {
        box-shadow: inset -3px 0 10px rgba(255, 0, 255, 0.4), 0 0 0 2px rgba(239, 68, 68, 1), 0 0 15px rgba(239, 68, 68, 0.8);
    }
    100% {
        box-shadow: inset -3px 0 10px rgba(255, 0, 255, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.4), 0 0 5px rgba(239, 68, 68, 0.2);
    }
}

.football-score {
    font-weight: 800;
    margin: 0 4px;
    color: #eab308;
    font-size: 15px;
}

 
.rates-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: min(8px, calc(var(--app-height, 100vh) * 0.01));
    padding: 0;
    flex-shrink: 0;
}

.rate-card {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: min(8px, calc(var(--app-height, 100vh) * 0.01)) 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: min(4px, calc(var(--app-height, 100vh) * 0.005));
    transition: var(--transition);
    cursor: pointer;
}

.rate-card:hover {
    border-color: rgba(34, 197, 94, 0.3);
}

.rate-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.rate-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.rate-value {
    font-size: min(20px, calc(var(--app-height, 100vh) * 0.025));
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.rate-card-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.warning-icon-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 50%;
    margin-right: -4px;
}

.warning-icon-btn:hover {
    background-color: rgba(245, 158, 11, 0.15);
    transform: scale(1.15);
}

.warning-icon-btn:active {
    transform: scale(0.95);
}

.rate-badges-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bcv-calendar-btn {
    background: rgba(0, 255, 102, 0.1);
    color: #00ff66;
    border: 1px solid rgba(0, 255, 102, 0.2);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: pulseNeon 2s infinite;
}

.bcv-calendar-btn:hover {
    background: rgba(0, 255, 102, 0.2);
    box-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
}

.bcv-calendar-btn:active {
    transform: scale(0.9);
}

.bcv-calendar-btn.seen {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: none;
    box-shadow: none;
}

.bcv-calendar-btn.seen:hover {
    background: rgba(255, 255, 255, 0.05);
}

@keyframes pulseNeon {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 102, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(0, 255, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 102, 0); }
}

.rate-badge {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-weight: 700;
    flex-shrink: 0;
}

.rate-badge.official {
    background-color: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.rate-badge.danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.rate-badge.crypto {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.trend-arrow-mini {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: var(--transition);
}
.trend-arrow-mini.up {
    background-color: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.18);
}
.trend-arrow-mini.down {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.18);
}
.trend-arrow-mini.flat {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

 
.usdt-card {
    gap: 4px;
}

.usdt-badges-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.usdt-card .rate-card-value-row {
    margin-top: 1px;
}

.usdt-card .rate-value {
    font-size: 20px;
}

 
.sync-status-ticker {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: min(4px, calc(var(--app-height, 100vh) * 0.005)) 4px min(6px, calc(var(--app-height, 100vh) * 0.008)) 4px;
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    overflow: hidden;
    flex-shrink: 0;
}

body.light-theme .sync-status-ticker {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 85s linear infinite;
    font-weight: 550;
    color: var(--text-secondary);
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.calendar-icon {
    opacity: 0.7;
    flex-shrink: 0;
}

 
.calculator-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    min-height: 0;
}

 
.single-calc-card {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: min(6px, calc(var(--app-height, 100vh) * 0.008)) 8px;
    box-shadow: var(--card-shadow);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: min(2px, calc(var(--app-height, 100vh) * 0.003));
}

 
.calc-pair-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2px;
    position: relative;
}

.pair-pill-btn {
    background: linear-gradient(to right, #0ea5e9, #8b5cf6, #ec4899, #f97316, #0ea5e9, #8b5cf6);
    background-size: 200% auto;
    animation: gradient-wave 3s linear infinite;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.pair-pill-btn:hover {
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.6), inset 0 1px 0 rgba(255,255,255,0.3);
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.pair-pill-btn:active {
    transform: translateY(0) scale(0.96);
    filter: brightness(0.95);
}

.screenshot-btn {
    position: absolute;
    left: 4px;
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.screenshot-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background-color: rgba(34, 197, 94, 0.05);
}

.screenshot-btn:active {
    transform: scale(0.9);
}

 
.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: min(6px, calc(var(--app-height, 100vh) * 0.008)) 2px;
}

.currency-desc-area {
    display: flex;
    flex-direction: column;
    gap: 1px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.currency-desc-area:hover {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

.currency-desc-area:active {
    transform: scale(0.96);
}

.curr-symbol {
    font-size: clamp(14px, calc(var(--app-height, 100vh) * 0.022), 24px);
    font-weight: 800;
    color: var(--accent);
}

.curr-code {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.value-action-area {
    display: flex;
    align-items: center;
    gap: 6px;
}

.curr-value {
    font-size: clamp(18px, calc(var(--app-height, 100vh) * 0.035), 32px);
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    font-family: monospace;
    letter-spacing: -0.5px;
}

.curr-copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.curr-copy-btn:hover {
    color: var(--accent);
    background-color: rgba(34, 197, 94, 0.1);
}

.curr-copy-btn:active {
    transform: scale(0.9);
}

.curr-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.curr-clear-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.curr-clear-btn:active {
    transform: scale(0.9);
}

 
.calc-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.06);
    margin: 2px 0;
}

 
.calc-pair-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
    padding: 0 2px;
}

.trend-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
}

.trend-arrow {
    font-size: 12px;
}

.trend-text {
    opacity: 0.9;
}

.swap-btn {
    position: absolute;
    right: 4px;
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.swap-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background-color: rgba(34, 197, 94, 0.05);
}

.swap-btn:active {
    transform: rotate(180deg) scale(0.95);
}

 
.numpad-container {
    background-color: var(--bg-secondary);
    padding: min(10px, calc(var(--app-height, 100vh) * 0.012)) 16px calc(8px + env(safe-area-inset-bottom)) 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr) min-content;
    gap: min(8px, calc(var(--app-height, 100vh) * 0.01));
    flex: 1;
}

.num-btn {
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    font-size: min(20px, calc(var(--app-height, 100vh) * 0.025));
    font-weight: 600;
    height: min(44px, calc(var(--app-height, 100vh) * 0.05));
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.num-btn:hover {
    background-color: #313137;
}

.num-btn:active {
    background-color: var(--accent);
    color: #000000;
    transform: scale(0.96);
}

.num-btn.action-btn {
    background-color: rgba(255, 255, 255, 0.04);
}

.num-btn.backspace {
    color: #ef4444;
}

.num-btn.backspace:active {
    background-color: #ef4444;
    color: #ffffff;
}

.num-btn.clear {
    grid-column: span 3;
    font-size: min(13px, calc(var(--app-height, 100vh) * 0.016));
    text-transform: uppercase;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(to right, #0ea5e9, #8b5cf6, #ec4899, #f97316, #0ea5e9, #8b5cf6);
    background-size: 200% auto;
    animation: gradient-wave 3s linear infinite;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
    border: none;
    border-radius: 10px;
    margin-top: min(2px, calc(var(--app-height, 100vh) * 0.003));
    transition: var(--transition);
}

@keyframes gradient-wave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.num-btn.clear:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.5);
    transform: translateY(-1px);
}

.num-btn.clear:active {
    transform: scale(0.98);
    filter: brightness(0.95);
}

 
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 20px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-modal-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 65vh;
    overflow-y: auto;
    padding-bottom: 10px;
}

.modal-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-item:hover {
    border-color: var(--accent);
    background-color: rgba(34, 197, 94, 0.03);
}

.item-symbol {
    font-size: 16px;
    font-weight: 800;
    background-color: var(--accent-light);
    color: var(--accent);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-align: center;
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 700;
    font-size: 14px;
}

.item-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

 
.toast {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--accent);
    color: #000000;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3);
    z-index: 100;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

 
.rotating {
    animation: refresh-rotate 0.8s ease-in-out;
}

@keyframes refresh-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.warning-modal-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    padding: 20px 24px;
    text-align: left;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    margin: 10px 0 20px 0;
}

.warning-modal-text.yellow {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.02) 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
    box-shadow: 0 8px 32px rgba(251, 191, 36, 0.05);
}

.warning-modal-text.yellow::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: #fbbf24; box-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
}

.warning-modal-title.yellow { color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.3); }

.warning-modal-text.cyan {
    background: linear-gradient(145deg, rgba(6, 182, 212, 0.08) 0%, rgba(6, 182, 212, 0.02) 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.05);
}

.warning-modal-text.cyan::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: #06b6d4; box-shadow: 0 0 15px rgba(6, 182, 212, 0.6);
}

.warning-modal-title.cyan { color: #06b6d4; text-shadow: 0 0 10px rgba(6, 182, 212, 0.3); }

.warning-modal-text.green {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.02) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.05);
}

.warning-modal-text.green::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: #22c55e; box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
}

.warning-modal-title.green { color: #22c55e; text-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }

.warning-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

 
.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

 
.sidebar-content {
    position: absolute;
    top: 58px;
    left: 12px;
    width: 250px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-8px) scale(0.96);
    transform-origin: top left;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15), opacity 0.25s ease;
    opacity: 0;
}

.sidebar-overlay.show .sidebar-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

 
.sidebar-header {
    display: none;
}

.sidebar-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.menu-item:hover {
    border-color: var(--accent);
    background-color: rgba(34, 197, 94, 0.03);
}

.menu-item-icon {
    font-size: 20px;
}

.menu-item-info {
    display: flex;
    flex-direction: column;
}

.menu-item-title {
    font-size: 14px;
    font-weight: 600;
}

.menu-item-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

 
body.light-theme {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --card-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

body.light-theme .app-container {
    background-image: url('bg-pattern-light.png');
}

body.light-theme .football-marquee-container {
    background-color: #cbd5e1;
}

 
body.light-theme .app-header {
    background-color: #1a1a1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-theme .header-btn {
    color: #94a3b8;
}

body.light-theme .header-btn:hover {
    color: #f8fafc;
    background-color: rgba(255, 255, 255, 0.05);
}

body.light-theme .rate-card {
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .single-calc-card {
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .numpad-container {
    background-color: #cbd5e1;
    border-top: 1px solid #94a3b8;
}

body.light-theme .num-btn {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

body.light-theme .num-btn:hover {
    background-color: #e2e8f0;
}

body.light-theme .num-btn:active {
    background-color: #f59e0b;
    color: #000000;
}

body.light-theme .num-btn.action-btn {
    background-color: #e2e8f0;
    color: #0f172a;
}

body.light-theme .num-btn.backspace {
    color: #ef4444;
}

body.light-theme .num-btn.backspace:active {
    background-color: #ef4444;
    color: #ffffff;
}

body.light-theme .num-btn.clear {
    background-color: #e2e8f0;
    color: #0f172a;
}

body.light-theme .calc-divider {
    background-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .swap-btn {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #475569;
}

body.light-theme .modal-content {
    border-top: 1px solid var(--border-color);
}

body.light-theme .modal-item {
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.01);
}

body.light-theme .sidebar-content {
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

body.light-theme .menu-item {
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.01);
}

 
.country-selector-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
    height: 42px;
    margin-left: auto;
    margin-right: 4px;
}

.country-selector-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.header-flag-img {
    width: 27px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
}

.arrow-down {
    font-size: 8px;
    color: var(--text-secondary);
}

 
.country-dropdown-content {
    position: absolute;
    top: calc(52px + env(safe-area-inset-top, 0px));
    right: 76px;  
    width: 220px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform: translateY(-8px) scale(0.96);
    transform-origin: top right;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15), opacity 0.25s ease;
    opacity: 0;
}

body.light-theme .country-dropdown-content {
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.sidebar-overlay.show .country-dropdown-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.country-item {
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.country-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

body.light-theme .country-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.dropdown-flag-img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.country-name {
    font-size: 13px;
    font-weight: 600;
}

 
@media (min-width: 768px) {
    .app-container {
        max-width: 100%;
        margin: 0 auto;
        border-left: none;
        border-right: none;
    }
    
     
    .rate-card {
        padding: 28px 24px;
        border-radius: 18px;
        gap: 14px;
    }
    
    .rate-label {
        font-size: 16px;
        font-weight: 700;
    }
    
    .rate-value {
        font-size: 32px;
        font-weight: 800;
    }
    
    .rate-badge {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    .rates-section {
        gap: 20px;
        padding: 28px 28px 14px 28px;
    }
    
     
    .calculator-container {
        justify-content: center;
        padding: 12px 24px;
    }
    
     
    .curr-symbol {
        font-size: 24px;
    }
    
    .curr-value {
        font-size: 30px;
    }
    
    .curr-code {
        font-size: 13px;
    }
    
    .single-calc-card {
        padding: 20px 24px;
        border-radius: 18px;
        gap: 14px;
    }
    
    .pair-pill-btn {
        font-size: 14px;
        padding: 8px 20px;
        border-radius: 14px;
    }
    
    .calc-row {
        padding: 12px 10px;
    }
    
    .trend-indicator {
        font-size: 13px;
    }
    
     
    .numpad-container {
        padding: 20px 24px 20px 24px;
    }
    
    .numpad-grid {
        gap: 12px;
    }
    
    .num-btn {
        height: 64px;
        font-size: 24px;
        border-radius: 12px;
    }
    
    .num-btn.clear {
        height: 52px;
        font-size: 16px;
    }
    
     
    .sync-status-ticker {
        padding: 6px 20px 10px 20px;
        font-size: 12px;
    }
    
    .sidebar-overlay .sidebar-content {
        max-width: 360px;
        margin-left: auto;
    }
    
    .modal-overlay .modal-content {
        max-width: 540px;
        margin: 0 auto;
        width: 100%;
        border-radius: 24px 24px 0 0;
    }
}

 
@media (min-width: 1025px) {
    .app-container {
        max-width: 600px;
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
    }
}

 
@media (min-width: 650px) and (orientation: landscape) {
    .central-body {
        display: contents;
    }
    
    .app-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto 1fr auto;
        max-width: 100%;
        border-left: none;
        border-right: none;
        height: 100%;
        min-height: 100vh;
        overflow-y: auto;
    }
    
    .app-header {
        grid-column: 1 / 3;
        grid-row: 1;
        padding: env(safe-area-inset-top, 0px) 20px 0 20px;
    }
    
    .sync-status-ticker {
        grid-column: 1 / 3;
        grid-row: 2;
        padding: 4px 20px 6px 20px;
    }
    
     
    .rates-section {
        grid-column: 1;
        grid-row: 3 / 5;
        display: grid;
        grid-template-columns: 1fr;
        align-content: center;
        padding: 24px 32px;
        gap: 16px;
        width: 100%;
        max-width: 550px;
        margin: 0 auto;
    }
    
    .rate-card {
        padding: 16px 20px;
    }
    
    .rate-value {
        font-size: 28px;
    }
    
     
    .calculator-container {
        grid-column: 2;
        grid-row: 3;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 0 20px 6px 20px;
        border-left: 1px solid var(--border-color);
    }
    
    .single-calc-card {
        padding: 10px 14px 12px 14px;
    }
    
    .curr-symbol { font-size: 20px; }
    .curr-value { font-size: 24px; }
    .calc-row { padding: 6px 6px; }
    .pair-pill-btn { font-size: 12px; padding: 6px 16px; }
    .trend-indicator { font-size: 12px; }
    
     
    .numpad-container {
        grid-column: 2;
        grid-row: 4;
        border-top: 1px solid var(--border-color);
        border-left: 1px solid var(--border-color);
        padding: 10px 20px 8px 20px;
    }
    
    .numpad-grid { gap: 6px; }
    .num-btn { height: 44px; font-size: 18px; }
    .num-btn.clear { height: 36px; font-size: 13px; margin-top: 2px; }
}

 
.calc-row {
    border-radius: 10px;
    padding: 4px 6px;
    transition: var(--transition);
    border: 1px solid transparent;
}
.calc-row.active-input-row {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}
.calc-row:not(.active-input-row) .curr-value {
    opacity: 0.45;
}

@keyframes value-pulse {
    0% { transform: scale(1); filter: brightness(1); }
    30% { transform: scale(1.04); filter: brightness(1.25); }
    100% { transform: scale(1); filter: brightness(1); }
}
.value-pulse-anim {
    animation: value-pulse 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

 
.usdt-timeframe-selector {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 2px;
    align-self: flex-start;
}

.timeframe-btn {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 3px 7px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.timeframe-btn:hover {
    color: var(--text-primary);
}

.timeframe-btn.active {
    background: var(--accent);
    color: #000;
}

 
.btc-timeframe-selector {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 2px;
    align-self: flex-start;
}

.btc-badges-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btc-card {
    gap: 6px;
}

 
/* Breakpoint for tall-but-tight screens (~834px CSS height, e.g. Redmi Note 14 Pro 5G at DPI 375) */
@media (max-height: 870px) and (min-height: 781px) {
    .football-marquee-container {
        height: 48px;
        margin: 4px 14px 0 14px;
    }
    .central-body {
        padding: 3px 10px;
        gap: 2px;
    }
    .rates-section {
        gap: 4px;
    }
    .rate-card {
        padding: 5px 8px;
        gap: 2px;
        border-radius: 12px;
    }
    .rate-value {
        font-size: clamp(17px, calc(var(--app-height, 100vh) * 0.026), 22px);
    }
    .rate-label {
        font-size: 11px;
    }
    .sync-status-ticker {
        padding: 1px 4px 2px 4px;
        font-size: 10px;
    }
}

@media (max-height: 780px) {
    .central-body {
        padding: min(4px, calc(var(--app-height, 100vh) * 0.005)) 10px;
        gap: 2px;
    }
    .rates-section {
        gap: 3px;
    }
    .rate-card {
        padding: 5px 8px;
        gap: 2px;
    }
    .numpad-container {
        padding: 2px 8px calc(4px + env(safe-area-inset-bottom)) 8px;
    }
    .numpad-grid {
        gap: 4px;
    }
    .num-btn {
        height: min(34px, calc(var(--app-height, 100vh) * 0.038));
        font-size: min(16px, calc(var(--app-height, 100vh) * 0.02));
    }
}

@media (max-height: 650px) {
    .central-body {
        padding: 2px 6px;
        gap: 2px;
    }
    .rates-section {
        gap: 2px;
    }
    .rate-card {
        padding: 3px 5px;
        gap: 1px;
        border-radius: 8px;
    }
    .rate-label {
        font-size: 9px;
    }
    .usdt-timeframe-selector, .btc-timeframe-selector {
        margin-top: 0px;
    }
    .timeframe-btn {
        font-size: 9px;
        padding: 0px 3px;
    }
    .numpad-container {
        padding: 2px 4px calc(4px + env(safe-area-inset-bottom)) 4px;
    }
    .numpad-grid {
        gap: 3px;
    }
    .num-btn {
        height: min(30px, calc(var(--app-height, 100vh) * 0.034));
        font-size: min(14px, calc(var(--app-height, 100vh) * 0.018));
    }
    .single-calc-card {
        padding: 4px 6px;
        gap: 2px;
        border-radius: 10px;
    }
    .currency-desc-area {
        padding: 3px 4px;
    }
    .curr-copy-btn svg, .curr-clear-btn svg {
        width: 14px;
        height: 14px;
    }
    .swap-btn {
        width: 24px;
        height: 24px;
    }
    .swap-btn svg {
        width: 14px;
        height: 14px;
    }
    .screenshot-btn {
        width: 24px;
        height: 24px;
    }
    .screenshot-btn svg {
        width: 14px;
        height: 14px;
    }
    .pair-pill-btn {
        font-size: 9px;
        padding: 2px 8px;
    }
    .trend-indicator {
        font-size: 10px;
    }
}

@media (max-height: 520px) {
    .num-btn.clear { display: none !important; }
    .numpad-grid { grid-template-rows: repeat(4, 1fr) !important; }
    .app-header {
        height: calc(30px + env(safe-area-inset-top, 0px));
    }
    .app-logo-img {
        height: min(20px, calc(var(--app-height, 100vh) * 0.028));
        margin: -3px 0;
    }
    .central-body {
        padding: 2px 6px;
        gap: 2px;
    }
    .rates-section {
        gap: 2px;
    }
    .rate-card {
        padding: 3px 4px;
        gap: 1px;
        border-radius: 6px;
    }
    .rate-label {
        font-size: 9px;
    }
    .usdt-timeframe-selector, .btc-timeframe-selector {
        display: none;
    }
    .numpad-container {
        padding: 2px 4px calc(4px + env(safe-area-inset-bottom)) 4px;
    }
    .numpad-grid {
        gap: 3px;
    }
    .num-btn {
        height: min(32px, calc(var(--app-height, 100vh) * 0.038));
        font-size: min(14px, calc(var(--app-height, 100vh) * 0.018000000000000002));
    }
    .single-calc-card {
        padding: 2px 4px;
        border-radius: 6px;
    }
    .currency-desc-area {
        padding: 2px 3px;
    }
    .curr-copy-btn, .curr-clear-btn {
        padding: 2px;
    }
    .curr-copy-btn svg, .curr-clear-btn svg {
        width: 12px;
        height: 12px;
    }
    .screenshot-btn {
        width: 20px;
        height: 20px;
        left: 2px;
    }
    .screenshot-btn svg {
        width: 11px;
        height: 11px;
    }
    .swap-btn {
        width: 20px;
        height: 20px;
        right: 2px;
    }
    .swap-btn svg {
        width: 11px;
        height: 11px;
    }
}

.football-time-wrapper {
    justify-self: end;
    display: flex;
    align-items: center;
}

.live-neon-text {
    font-size: 11px;
    font-weight: 900;
    color: #ff0055;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px #ff0055, 0 0 10px #ff0055;
    margin-right: 6px;
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0% { opacity: 1; }
    50% { opacity: 0.5; text-shadow: 0 0 2px #ff0055; }
    100% { opacity: 1; }
}



 
======================================================
======================================================
Aplica solo a dispositivos donde la altura es m�s del doble del ancho (Ej: 20:9 o 21:9)
Esto no sobreescribe tus reglas anteriores, solo asegura que los elementos
no se descuadren ni se salgan de posici�n por culpa de la barra de navegaci�n.
*/
    html, body {
        height: 100%;
        overflow: hidden;
    }
    .app-container {
        height: 100%;
        max-height: 100%;
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }
}


 
.history-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}
.history-scroll-area {
    overflow-y: auto;
    padding-right: 5px;
}
.history-scroll-area::-webkit-scrollbar {
    width: 6px;
}
.history-scroll-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.history-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 102, 0.3);
    border-radius: 4px;
}
.history-month-group {
    margin-bottom: 20px;
}
.history-month-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent, #00ff66);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 255, 102, 0.2);
    padding-bottom: 5px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    background: #1a1a1c;
    z-index: 5;
}
.history-rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.history-rate-date {
    font-size: 14px;
    color: #ccc;
}
.history-rate-val {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

/* ===== BCV Historical Calendar Modal ===== */
.bcv-calendar-modal-content {
    background: linear-gradient(145deg, #1a1a1e, #121214);
    border: 1px solid rgba(0, 255, 102, 0.15);
    border-radius: 20px;
    padding: 20px;
    width: 92%;
    max-width: 380px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 255, 102, 0.05);
    animation: calendarSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes calendarSlideIn {
    from { transform: scale(0.85) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.bcv-calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}

.bcv-cal-month-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 140px;
    text-align: center;
    text-transform: capitalize;
}

.bcv-cal-nav-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bcv-cal-nav-btn:hover {
    background: rgba(0, 255, 102, 0.12);
    border-color: rgba(0, 255, 102, 0.3);
}

.bcv-cal-nav-btn:active {
    transform: scale(0.92);
}

.bcv-cal-close-btn {
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bcv-cal-close-btn:hover {
    background: rgba(255, 77, 77, 0.15);
    color: #ff4d4d;
}

.bcv-projection-banner {
    background: linear-gradient(135deg, rgba(0, 255, 102, 0.08), rgba(0, 200, 83, 0.04));
    border: 1px solid rgba(0, 255, 102, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.bcv-proj-label {
    font-size: 11px;
    color: #00ff66;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.bcv-proj-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bcv-proj-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.bcv-proj-value {
    font-size: 18px;
    font-weight: 800;
    color: #00ff66;
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.2);
}

.bcv-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 6px;
}

.bcv-cal-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bcv-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 12px;
}

.bcv-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    background: transparent;
    border: none;
}

.bcv-cal-day:not(.empty):not(.other-month):hover {
    background: rgba(255, 255, 255, 0.08);
}

.bcv-cal-day.has-data {
    color: var(--text-primary);
    font-weight: 600;
}

.bcv-cal-day.has-data::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #00ff66;
    opacity: 0.7;
}

.bcv-cal-day.today {
    border: 1.5px solid rgba(0, 255, 102, 0.4);
}

.bcv-cal-day.selected {
    background: linear-gradient(135deg, rgba(0, 255, 102, 0.2), rgba(0, 200, 83, 0.1));
    color: #00ff66;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.15);
    border: 1px solid rgba(0, 255, 102, 0.3);
}

.bcv-cal-day.selected::after {
    display: none;
}

.bcv-cal-day.other-month {
    color: rgba(255, 255, 255, 0.15);
    cursor: default;
}

.bcv-cal-day.empty {
    cursor: default;
}

.bcv-cal-rate-display {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.bcv-cal-rate-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.bcv-cal-rate-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.bcv-cal-rate-value {
    font-size: 26px;
    font-weight: 800;
    color: #00ff66;
    text-shadow: 0 0 12px rgba(0, 255, 102, 0.2);
    animation: rateReveal 0.3s ease;
}

@keyframes rateReveal {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.bcv-cal-rate-change {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
}

.bcv-cal-rate-change.positive {
    color: #ff4d4d;
}

.bcv-cal-rate-change.negative {
    color: #00cc52;
}

.bcv-cal-rate-change.neutral {
    color: var(--text-muted);
}

.bcv-cal-btn-use {
    margin-top: 15px;
    background: linear-gradient(135deg, rgba(0, 255, 102, 0.2), rgba(0, 200, 83, 0.1));
    border: 1px solid rgba(0, 255, 102, 0.3);
    color: #00ff66;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.bcv-cal-btn-use:hover {
    background: rgba(0, 255, 102, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
}

.bcv-cal-btn-use:active {
    transform: scale(0.95);
}

.bcv-history-list-container {
    display: none;
}

/* Light theme overrides for calendar */
.light-theme .bcv-calendar-modal-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-color: rgba(0, 180, 80, 0.2);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.light-theme .bcv-cal-day {
    color: #64748b;
}

.light-theme .bcv-cal-day.has-data {
    color: #1e293b;
}

.light-theme .bcv-cal-rate-display {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

.light-theme .bcv-cal-nav-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

.light-theme .bcv-cal-nav-btn:hover {
    background: rgba(0, 180, 80, 0.08);
}

.light-theme .bcv-cal-btn-use {
    background: rgba(0, 180, 80, 0.1);
    border-color: rgba(0, 180, 80, 0.3);
    color: #00b450;
}

.light-theme .bcv-cal-btn-use:hover {
    background: rgba(0, 180, 80, 0.15);
    box-shadow: 0 0 10px rgba(0, 180, 80, 0.2);
}
