/* Ticker Temel Stili */
.ticker-container {
    background: linear-gradient(135deg, grey 0%, #c5a452 100%);
    overflow: hidden;
    position: relative;
    padding: 0.75rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    height: 3.5rem;
    display: flex;
    align-items: center;
    /* Varsayılan süre: 120s, JS ile override edilecek */
    --ticker-duration: 60s;
}

/* Gradient Kenarlar */
.ticker-container::before,
.ticker-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.ticker-container::before {
    left: 0;
    /*background: linear-gradient(90deg, #0f172a 0%, transparent 100%);*/
}

.ticker-container::after {
    right: 0;
    /*background: linear-gradient(270deg, #0f172a 0%, transparent 100%);*/
}

/* Sonsuz döngü animasyonu - DÜZELTİLDİ */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Ticker içerik kapsayıcısı - DÜZELTİLDİ */
.ticker-wrapper {
    display: inline-flex;
    white-space: nowrap;
    animation: scroll var(--ticker-duration) linear infinite;
    flex-shrink: 0;
    align-items: center;
    height: 100%;
}

/* İkinci kopya alanı - sonsuz kaydırma için - DÜZELTİLDİ */
.ticker-wrapper-duplicate {
    display: inline-flex;
    white-space: nowrap;
    animation: scroll var(--ticker-duration) linear infinite;
    animation-delay: 0s;
    /* Gecikme kaldırıldı - aynı anda başlasın */
    flex-shrink: 0;
    align-items: center;
    height: 100%;
}

/* Ticker İçeriği */
.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 2rem;
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;
    flex-shrink: 0;
}

/* Son öğedeki sağ kenarlığı kaldır */
.ticker-item:last-child {
    border-right: none;
}

/* Ticker İçerik Öğeleri */
.ticker-item .currency {
    color: black;
    font-weight: 500;
    margin-right: 0.75rem;
    letter-spacing: 0.05em;
}

.ticker-item .value {
    color: #fff;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    letter-spacing: -0.025em;
}

.ticker-item .change {
    color: #fff;
    margin-left: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    width: 85px;
    min-width: 85px;
    text-align: center;
}

.ticker-item .change.up {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.ticker-item .change.down {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Performans optimizasyonları */
.ticker-wrapper,
.ticker-wrapper-duplicate {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Mobil cihazlarda hızı artır */
@media (max-width: 768px) {

    .ticker-wrapper,
    .ticker-wrapper-duplicate {
        /* Mobilde de aynı değişkene bağlı kalsın */
        animation-duration: var(--ticker-duration);
    }
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}