/* 
====================================================
  ADVANCED ANNOUNCEMENT TICKER (UPGRADED)
====================================================
*/

.ticker-wrapper {
    width: 100%;
    background: linear-gradient(90deg, #E63946 0%, #FF8E8E 100%);
    color: white;
    overflow: hidden;
    height: 44px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: 'Inter', sans-serif;
    user-select: none;
}

/* Mask for fade effect on edges */
.ticker-wrapper::before,
.ticker-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.ticker-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #E63946, transparent);
}

.ticker-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #FF8E8E, transparent);
}

.ticker-scroll-container {
    display: flex;
    white-space: nowrap;
    will-change: transform;
    animation: ticker-scroll 40s linear infinite; /* Duration updated by JS */
}

/* Hover Pause Logic */
.ticker-scroll-container.is-paused,
.ticker-wrapper:hover .ticker-scroll-container:not(.is-playing-forced) {
    animation-play-state: paused;
}

.ticker-item {
    display: flex;
    align-items: center;
    padding: 0 60px; /* Gap between items */
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.ticker-item .emoji {
    margin-right: 12px;
    font-size: 1.2rem;
}

.live-badge {
    background: white;
    color: #E63946;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 900;
    margin-right: 12px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    animation: blink-live 1.5s step-end infinite;
    line-height: 1;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Toggle Button */
.ticker-controls {
    position: absolute;
    right: 15px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    backdrop-filter: blur(4px);
}
.ticker-controls:hover {
    background: rgba(255, 255, 255, 0.4);
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes blink-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Responsiveness */
@media (max-width: 991px) {
    .ticker-item {
        padding: 0 45px;
        font-size: 0.9rem;
    }
    .ticker-wrapper::before, .ticker-wrapper::after { width: 40px; }
    .ticker-controls { display: none; } /* Hide controls on mobile to save space */
}

@media (max-width: 768px) {
    .ticker-wrapper { height: 40px; }
    .ticker-item { padding: 0 35px; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .ticker-item { padding: 0 25px; }
    .ticker-item .emoji { font-size: 1.1rem; margin-right: 8px; }
}
