.upcoming-contests-ticker {
    background: #fbbf24;
    padding: 12px 0;
    margin-bottom: 20px;
    margin-top: 0;
    position: sticky;
    top: var(--navbar-height-desktop, 80px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    width: 100%;
    z-index: 9998;
}

.ticker-label {
    background: #f59e0b;
    padding: 8px 20px;
    flex-shrink: 0;
    border-right: 2px solid #cbd5e1;
    z-index: 10;
    position: relative;
    overflow: hidden;
}

.ticker-label-text {
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.ticker-label-text.shimmer-text {
    position: relative;
    z-index: 2;
}

.ticker-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 70%,
        rgba(255, 255, 255, 0) 100%
    );
    z-index: 1;
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    animation: ticker-shimmer 3s infinite;
}

@keyframes ticker-shimmer {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.ticker-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.ticker-wrapper {
    display: flex;
    width: fit-content;
    height: 100%;
    will-change: transform;
    animation: scroll-left 60s linear infinite;
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 0 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ticker-content-duplicate {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 0 20px;
    white-space: nowrap;
    flex-shrink: 0;
    /* Initially positioned far off-screen, will be adjusted by JavaScript */
    margin-left: 9999px;
}

.ticker-content:hover,
.ticker-content-duplicate:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    color: #1e293b;
    font-size: 14px;
    padding: 4px 0;
    text-decoration: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.ticker-item:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.ticker-item-separator {
    display: inline-flex;
    align-items: center;
    color: #1e293b;
    font-size: 16px;
    font-weight: bold;
    opacity: 0.5;
    margin: 0 10px;
    position: relative;
}

.ticker-item-separator::before {
    content: '';
    position: absolute;
    left: -20px;
    width: 1px;
    height: 20px;
    background: #1e293b;
    opacity: 0.3;
}

.ticker-item-separator::after {
    content: '';
    position: absolute;
    right: -20px;
    width: 1px;
    height: 20px;
    background: #1e293b;
    opacity: 0.3;
}

.ticker-item-title {
    font-weight: 600;
    color: #0f172a;
}

.ticker-item-details {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #1e293b;
    font-size: 13px;
    font-weight: 500;
}

.ticker-item-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ticker-item-detail span:first-child {
    opacity: 0.8;
}

.ticker-item-badge {
    background: #ffffff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid #cbd5e1;
}

.ticker-item-badge.status-upcoming {
    background: #fef3c7;
    color: #92400e;
    border-color: #fbbf24;
}

.ticker-item-badge.status-active {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.ticker-item-prize {
    color: #0f172a;
    font-weight: 700;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Animation distance will be set dynamically via JavaScript */
        transform: translateX(var(--ticker-animation-distance, -100%));
    }
}

/* Pause animation on hover */
.upcoming-contests-ticker:hover .ticker-wrapper {
    animation-play-state: paused;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .upcoming-contests-ticker {
        top: var(--navbar-height-tablet, 70px);
    }

    .ticker-label {
        padding: 6px 12px;
    }

    .ticker-label-text {
        font-size: 12px;
    }

    .ticker-item {
        font-size: 12px;
        gap: 10px;
    }

    .ticker-item-details {
        font-size: 11px;
        gap: 8px;
    }

    .ticker-content {
        gap: 30px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .upcoming-contests-ticker {
        top: var(--navbar-height-mobile, 60px);
    }

    .ticker-label {
        padding: 5px 10px;
    }

    .ticker-label-text {
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    .ticker-item {
        font-size: 11px;
        gap: 8px;
    }

    .ticker-item-details {
        font-size: 10px;
        gap: 6px;
    }

    .ticker-content {
        gap: 25px;
        padding: 0 10px;
    }

    .ticker-item-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

