/**
 * Borsa & Döviz - DövizRadarı / Fintech Dark Radar Teması
 * Özel Fontlar: Outfit & Tabular Figures (Sade, Dolgusuz ve Açık 0 Rakamı)
 */

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

:root {
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
    --bg-main: #080b11;
    --bg-card: #0f141e;
    --bg-tile: #0c1018;
    --border-color: #1a2332;
    --cyan-accent: #38bdf8;
    --up-green: #10b981;
    --down-red: #f43f5e;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: #e2e8f0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "zero" 0;
}

/* Radar Kart ve Kutu Stilleri */
.radar-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
}

.radar-tile {
    background-color: var(--bg-tile);
    border: 1px solid #161f2e;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
}

.radar-tile:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background-color: #111722;
}

/* Sıfır Boşluklu Kusursuz Tablo Izgarası (Image 2 Bitişik Fintech Grid Tasarımı) */
.seamless-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.seamless-cell {
    position: relative;
    border: 1px solid transparent;
    border-right: 1px solid #141c28;
    border-bottom: 1px solid #141c28;
    padding: 0.65rem 0.75rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--bg-tile);
    user-select: none;
    box-sizing: border-box;
}

.seamless-cell:nth-child(3n) {
    border-right: none;
}

.seamless-cell:nth-last-child(-n+3) {
    border-bottom: none;
}

.seamless-cell:hover {
    background-color: #121927 !important;
}

/* Üst Kayan Ticker Öğeleri */
.ticker-item-link {
    position: relative;
    border: 1px solid transparent;
    border-right: 1px solid #141c28;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

/* Normal durumlarda hücreler temiz koyu zeminlidir; sadece canlı flaş anında parlar */
.cell-down,
.cell-up {
    background-color: transparent !important;
}

/* Yüzdelik Değişim Göstergeleri Asla Kutu / Kare İçerisine Alınmaz (Tablo hücreleri hariç) */
span[data-change-key],
div[data-change-key],
[data-change-key]:not(td) {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    transition: color 0.4s ease;
}

/* Canlı Hücre ve Kutu Flaş Animasyonları - Tam Bütün (Kenarlık ve Işıma Olmaksızın Katı Yeşil / Kırmızı Dolgu) */
@keyframes flashCellUpAnim {
    0% {
        background-color: #0b960b !important;
        border-color: #0b960b !important;
        box-shadow: none !important;
    }
    70% {
        background-color: #0b960b !important;
        border-color: #0b960b !important;
        box-shadow: none !important;
    }
    100% {
        background-color: var(--bg-tile) !important;
        border-color: transparent !important;
        border-right-color: #141c28 !important;
        border-bottom-color: #141c28 !important;
        box-shadow: none !important;
    }
}

@keyframes flashCellDownAnim {
    0% {
        background-color: #e20c0c !important;
        border-color: #e20c0c !important;
        box-shadow: none !important;
    }
    70% {
        background-color: #e20c0c !important;
        border-color: #e20c0c !important;
        box-shadow: none !important;
    }
    100% {
        background-color: var(--bg-tile) !important;
        border-color: transparent !important;
        border-right-color: #141c28 !important;
        border-bottom-color: #141c28 !important;
        box-shadow: none !important;
    }
}

.flash-cell-up:not(tr),
.ticker-item-link.flash-cell-up,
.seamless-cell.flash-cell-up,
.detail-price-box.flash-cell-up,
.radar-tile.flash-cell-up,
.radar-card.flash-cell-up,
[data-cell-key].flash-cell-up,
[data-asset-card].flash-cell-up,
[data-mover-key].flash-cell-up {
    background-color: #0b960b !important;
    border: 1px solid #0b960b !important;
    border-color: #0b960b !important;
    box-shadow: none !important;
    animation: flashCellUpAnim 2.0s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border-radius: 6px;
    position: relative;
    z-index: 10;
}

.seamless-cell.flash-cell-up {
    border-radius: 0 !important;
}

.detail-price-box.flash-cell-up {
    border-radius: 0.75rem !important;
}

.flash-cell-down:not(tr),
.ticker-item-link.flash-cell-down,
.seamless-cell.flash-cell-down,
.detail-price-box.flash-cell-down,
.radar-tile.flash-cell-down,
.radar-card.flash-cell-down,
[data-cell-key].flash-cell-down,
[data-asset-card].flash-cell-down,
[data-mover-key].flash-cell-down {
    background-color: #e20c0c !important;
    border: 1px solid #e20c0c !important;
    border-color: #e20c0c !important;
    box-shadow: none !important;
    animation: flashCellDownAnim 2.0s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border-radius: 6px;
    position: relative;
    z-index: 10;
}

.seamless-cell.flash-cell-down {
    border-radius: 0 !important;
}

.detail-price-box.flash-cell-down {
    border-radius: 0.75rem !important;
}

.detail-price-box,
.radar-card {
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Flaş anında fiyat, yüzdelik değişim ve başlık rengi: Tamamen net BEYAZ (#ffffff) */
/* Canlı kırmızı veya yeşil zemin içerisinde rakam ve yüzdeler kaybolmaz, flaş bitince orijinal rengine döner */
.flash-cell-up:not(tr) *,
.flash-cell-down:not(tr) * {
    color: #ffffff !important;
    transition: color 0.2s ease;
}

.flash-cell-up:not(tr) [data-rate-key],
.flash-cell-up:not(tr) [data-rate-key-alt],
.flash-cell-down:not(tr) [data-rate-key],
.flash-cell-down:not(tr) [data-rate-key-alt],
.flash-cell-up:not(tr) .flash-up,
.flash-cell-up:not(tr) .flash-down,
.flash-cell-down:not(tr) .flash-up,
.flash-cell-down:not(tr) .flash-down {
    color: #ffffff !important;
    text-shadow: none !important;
    transition: color 0.2s ease;
}

.flash-cell-up:not(tr) [data-change-key],
.flash-cell-up:not(tr) [data-change-key] *,
.flash-cell-up:not(tr) [data-change-key-alt],
.flash-cell-up:not(tr) [data-change-key-alt] *,
.flash-cell-down:not(tr) [data-change-key],
.flash-cell-down:not(tr) [data-change-key] *,
.flash-cell-down:not(tr) [data-change-key-alt],
.flash-cell-down:not(tr) [data-change-key-alt] * {
    color: #ffffff !important;
    transition: color 0.2s ease;
}

.flash-cell-up:not(tr) .text-sky-400,
.flash-cell-down:not(tr) .text-sky-400 {
    color: #ffffff !important;
    transition: color 0.2s ease;
}

/* ==========================================================================
   Tablo Satırı ve Hücre Kenarlık Kilitleme
   - Flaş anında veya geçişlerde üst/alt kenarlıklar kesinlikle beyazlaşamaz
   - Daima koyu tema taban çizgisi (#141c28) renginde kilitli kalır
   ========================================================================== */
tr.market-row,
tr.market-row > td,
tr.flash-cell-up,
tr.flash-cell-down,
tr.flash-cell-up > td,
tr.flash-cell-down > td {
    border-color: #141c28 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Tablo Satırı Flaş Animasyonları (Canlı Döviz, Canlı Altın, Kripto, Emtia vb.)
   - Araç sinyali gibi net, berrak ve tek renkli
   - Yükselişte sadece yeşil (#0b960b), düşüşte sadece kırmızı (#e20c0c)
   - Üstte, altta veya arkada asla beyaz ya da başka bir renk oluşmaz
   - Sönümlenirken ara renk üretmeksizin doğrudan kendi renginin şeffaflığına erir
   ========================================================================== */
@keyframes flashTableRowUpAnim {
    0% {
        background-color: #0b960b !important;
    }
    50% {
        background-color: #0b960b !important;
    }
    100% {
        background-color: rgba(11, 150, 11, 0) !important;
    }
}

@keyframes flashTableRowDownAnim {
    0% {
        background-color: #e20c0c !important;
    }
    50% {
        background-color: #e20c0c !important;
    }
    100% {
        background-color: rgba(226, 12, 12, 0) !important;
    }
}

/* Tablo satırı yapısını koru; kenarlık silme veya sıçrama yapma */
tr.flash-cell-up,
tr.flash-cell-down {
    border-radius: 0 !important;
    position: static !important;
    z-index: auto !important;
    box-shadow: none !important;
    outline: none !important;
    animation: none !important;
    background-color: transparent !important;
}

/* Tablo hücreleri tek parça sinyal gibi parlar, arkasında beyaz veya artık renk bırakmaz */
tr.flash-cell-up > td {
    background-color: #0b960b !important;
    animation: flashTableRowUpAnim 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    color: #ffffff !important;
}

tr.flash-cell-down > td {
    background-color: #e20c0c !important;
    animation: flashTableRowDownAnim 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    color: #ffffff !important;
}

tr.flash-cell-up > td *,
tr.flash-cell-down > td * {
    color: #ffffff !important;
    transition: none !important;
}

tr.market-row td {
    transition: none !important;
}



/* Reklam & Banner Kutuları */
.ad-slot {
    background: #0d121c;
    border: 1px dashed #212c3e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
}

/* Üst Sabit & Yatay Kaydırılabilir Piyasa Bandı (Kendiliğinden kaymaz, elle/touch kaydırılır) */
.top-ticker-scroll {
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #1a2332 transparent;
    cursor: grab;
    user-select: none;
}

.top-ticker-scroll.is-dragging {
    cursor: grabbing;
}

.top-ticker-scroll::-webkit-scrollbar {
    height: 3px;
}

.top-ticker-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.top-ticker-scroll::-webkit-scrollbar-thumb {
    background: #1a2332;
    border-radius: 9999px;
}

.top-ticker-scroll::-webkit-scrollbar-thumb:hover {
    background: #38bdf8;
}

/* Canlı Fiyat Metin Rengi - Rakamlar daima net beyaz (#ffffff) kalır */
@keyframes flashUpPrice {
    0% {
        color: #ffffff !important;
        text-shadow: none !important;
    }
    100% {
        color: #ffffff !important;
        text-shadow: none !important;
    }
}

@keyframes flashDownPrice {
    0% {
        color: #ffffff !important;
        text-shadow: none !important;
    }
    100% {
        color: #ffffff !important;
        text-shadow: none !important;
    }
}

.flash-up {
    animation: flashUpPrice 1.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.flash-down {
    animation: flashDownPrice 1.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Kutu / Tile / Satır Çerçeve Tepkisi */
@keyframes flashUpTile {
    0% {
        border-color: #22c55e !important;
        background-color: #16a34a !important;
        box-shadow: 0 0 18px rgba(34, 197, 94, 0.7);
    }
    40% {
        border-color: #22c55e !important;
        background-color: #16a34a !important;
    }
    100% {
        border-color: #161f2e;
        background-color: var(--bg-tile);
        box-shadow: none;
    }
}

@keyframes flashDownTile {
    0% {
        border-color: #ef4444 !important;
        background-color: #dc2626 !important;
        box-shadow: 0 0 18px rgba(239, 68, 68, 0.7);
    }
    40% {
        border-color: #ef4444 !important;
        background-color: #dc2626 !important;
    }
    100% {
        border-color: #161f2e;
        background-color: var(--bg-tile);
        box-shadow: none;
    }
}

.flash-tile-up {
    animation: flashUpTile 1.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.flash-tile-up * {
    color: #ffffff !important;
}

.flash-tile-down {
    animation: flashDownTile 1.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.flash-tile-down * {
    color: #ffffff !important;
}

/* ==========================================================================
   Portföy ve İstatistik Kartı Canlı Flaş Animasyonları (Yükseliş ve Düşüş)
   ========================================================================== */
@keyframes flashMetricUpAnim {
    0% {
        color: #34d399 !important;
        text-shadow: 0 0 14px rgba(52, 211, 153, 0.7);
        transform: scale(1.02);
    }
    40% {
        color: #10b981 !important;
        text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    }
    100% {
        text-shadow: none;
        transform: scale(1);
    }
}

@keyframes flashMetricDownAnim {
    0% {
        color: #f87171 !important;
        text-shadow: 0 0 14px rgba(248, 113, 113, 0.7);
        transform: scale(1.02);
    }
    40% {
        color: #ef4444 !important;
        text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    }
    100% {
        text-shadow: none;
        transform: scale(1);
    }
}

.flash-metric-up {
    animation: flashMetricUpAnim 1.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.flash-metric-down {
    animation: flashMetricDownAnim 1.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes flashCardBorderUpAnim {
    0% {
        border-color: #10b981 !important;
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
    }
    60% {
        border-color: #10b981 !important;
    }
    100% {
        box-shadow: none;
    }
}

@keyframes flashCardBorderDownAnim {
    0% {
        border-color: #ef4444 !important;
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.35);
    }
    60% {
        border-color: #ef4444 !important;
    }
    100% {
        box-shadow: none;
    }
}

.flash-card-up {
    animation: flashCardBorderUpAnim 1.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.flash-card-down {
    animation: flashCardBorderDownAnim 1.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}


/* Scrollbar Tasarımı */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #080b11;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Yüzdelik Değişim Göstergeleri: Kesinlikle kutu/kare, kenarlık veya arka plan olmaksızın sadece renkli temiz metin */
span[data-change-key],
div[data-change-key],
[data-change-key]:not(td) {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    transition: color 0.4s ease;
}

/* ==========================================================================
   Canlı Arama Sonuç Paneli (Solid / Şeffaflık Önleyici & Yüksek Z-Index)
   Arka plandaki yazıların ve fiyat kutularının görünmesini kesin olarak engeller.
   ========================================================================== */
#headerSearchResults,
#mobileSearchResults,
#mobileHeaderSearchResults,
.search-dropdown-panel {
    background-color: #0c121e !important;
    background: #0c121e !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.95), 0 0 0 1px #1e2a40 !important;
    z-index: 100 !important;
}

#headerSearchResults .search-result-item,
#mobileSearchResults .search-result-item,
#mobileHeaderSearchResults .search-result-item {
    background-color: #0c121e !important;
    transition: background-color 0.15s ease;
}

#headerSearchResults .search-result-item:hover,
#mobileSearchResults .search-result-item:hover,
#mobileHeaderSearchResults .search-result-item:hover,
#headerSearchResults .search-result-item.bg-\[\#1a273e\],
#mobileSearchResults .search-result-item.bg-\[\#1a273e\],
#mobileHeaderSearchResults .search-result-item.bg-\[\#1a273e\] {
    background-color: #152238 !important;
}

#headerSearchResults .search-section-header,
#mobileSearchResults .search-section-header,
#mobileHeaderSearchResults .search-section-header {
    background-color: #080d16 !important;
    opacity: 1 !important;
}

#headerSearchResults .search-footer-bar,
#mobileSearchResults .search-footer-bar,
#mobileHeaderSearchResults .search-footer-bar {
    background-color: #080d16 !important;
    opacity: 1 !important;
}

