/* Custom styles for Sport Report */

/* General styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: url('../images/sport_report_background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Add overlay to improve text readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-overlay, rgba(13, 17, 23, 0.8));
    z-index: -1;
    pointer-events: none;
}

main {
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

/* Cards */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Article content formatting */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2, .article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content blockquote {
    border-left: 4px solid #dc3545;
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
    background: var(--blockquote-bg, #f8f9fa);
    color: var(--blockquote-text, inherit);
    font-style: italic;
}

.article-content a {
    color: #dc3545;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

/* Featured badge */
.badge {
    font-weight: 500;
}

/* Image placeholders */
.bg-secondary {
    background-color: #6c757d !important;
}

/* Footer spacing */
footer {
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }
}

/* Animation for loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-in;
}

/* Search input styling */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Category grid hover effects */
.card.hover-shadow:hover {
    background-color: var(--bg-secondary) !important;
}

/* ===== Scores Ticker Bar ===== */
.ticker-bar {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    height: 36px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ticker-label {
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    z-index: 2;
    flex-shrink: 0;
}

.ticker-label i {
    margin-right: 4px;
    animation: pulse-live 1.5s ease-in-out infinite;
}

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

.ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-track::before,
.ticker-track::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    z-index: 1;
    pointer-events: none;
}

.ticker-track::before {
    left: 0;
    background: linear-gradient(90deg, #1a1a2e, transparent);
}

.ticker-track::after {
    right: 0;
    background: linear-gradient(270deg, #1a1a2e, transparent);
}

.ticker-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: ticker-scroll 60s linear infinite;
    gap: 0;
}

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

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
    border-right: 1px solid rgba(255,255,255,0.1);
    height: 36px;
}

.ticker-empty {
    color: rgba(255,255,255,0.4);
    font-style: italic;
}

.ticker-loading {
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
    padding: 0 20px;
}

.ticker-sport {
    color: rgba(255,255,255,0.35);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.ticker-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.ticker-badge.live {
    background: #dc3545;
    color: #fff;
    animation: pulse-live 1.5s ease-in-out infinite;
}

.ticker-badge.ft {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
}

.ticker-badge.upcoming {
    background: rgba(13,110,253,0.25);
    color: #8bb4f0;
}

.ticker-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.ticker-team {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.78rem;
}

.ticker-score {
    color: #fff;
    font-size: 0.8rem;
    padding: 0 2px;
}

/* Pause ticker on hover */
.ticker-bar:hover .ticker-content {
    animation-play-state: paused;
}

.ticker-news-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
    border-right: 1px solid rgba(255,255,255,0.1);
    height: 36px;
    text-decoration: none;
}

.ticker-news-item:hover {
    color: #fff;
}

.ticker-badge.news {
    background: rgba(220,53,69,0.25);
    color: #f77;
}

.ticker-headline {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.76rem;
}

/* ===== Neater Navbar ===== */
.navbar .nav-link {
    font-size: 0.85rem;
    transition: color 0.2s;
}

.navbar .nav-link:hover {
    color: #fff !important;
}

.navbar .dropdown-menu-dark {
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border-radius: 8px;
    padding: 8px 0;
    max-height: 80vh;
    overflow-y: auto;
}

.navbar .dropdown-menu-dark .dropdown-header {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 16px 4px;
}

.navbar .dropdown-menu-dark .dropdown-item {
    padding: 6px 16px;
    border-radius: 4px;
    margin: 1px 6px;
    transition: all 0.15s;
}

.navbar .dropdown-menu-dark .dropdown-item:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateX(2px);
}

.navbar .dropdown-menu-dark .dropdown-item i {
    width: 18px;
    text-align: center;
    margin-right: 6px;
}

.navbar .dropdown-menu-dark .dropdown-divider {
    margin: 4px 12px;
    border-color: rgba(255,255,255,0.06);
}

/* ===== Footer ===== */
.footer-link {
    transition: color 0.2s, padding-left 0.2s;
}

.footer-link:hover {
    color: #fff !important;
    padding-left: 4px;
}
