/* ===============================================
   HOME PAGE STYLES
   =============================================== */

/* Sidebar i fixtures layout */
.container {
    margin: 0 auto;
    display: flex;
    max-width: 1280px;
    gap: 10px;
    padding-top: 71px;
}

.fixtures {
    flex: 2.5;
}

.fixtures .fixture-actions {
    display: flex;
    background-color: #fff;
    padding: 19px;
    margin-bottom: 1rem;
    border-radius: 6px;
    justify-content: center;
    border: 1px solid rgba(225, 225, 225, 1);
}

.fixtures .fixture-actions .fixture-select {
    flex: 1;
}

/* Matches stats box */
.matches-stats-box {
    background-color: #fff;
    border: 1px solid rgba(225, 225, 225, 1);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 8px;
    color: #006064;
    flex-shrink: 0;
}

.stats-icon svg {
    width: 20px;
    height: 20px;
}

.stats-live .stats-icon {
    background-color: rgba(200, 200, 200, 0.3);
    color: #999;
}

.stats-live.active .stats-icon {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

.stats-highest .stats-icon {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.stats-goals .stats-icon {
    background-color: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.stats-score {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.stats-icon.live-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stats-value {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.stats-value.live-text {
    color: #ff0000;
}

.stats-label {
    font-size: 10px;
    color: #666;
    font-weight: 500;
    text-transform: lowercase;
}

.stats-divider {
    width: 1px;
    height: 40px;
    background-color: rgba(225, 225, 225, 1);
    flex-shrink: 0;
}

/* Mobile responsive dla stats box */
@media (max-width: 991px) {
    .matches-stats-box {
        padding: 12px 16px;
        gap: 12px;
        justify-content: space-around;
    }

    .stats-divider {
        display: none;
    }

    .stats-item {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }

    .stats-content {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .matches-stats-box {
        padding: 12px 10px;
        gap: 8px;
    }

    .stats-value {
        font-size: 20px;
    }

    .stats-icon {
        width: 36px;
        height: 36px;
    }

    .stats-item {
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .matches-stats-box {
        padding: 10px 8px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .stats-item {
        gap: 8px;
        min-width: calc(50% - 6px);
        flex: 0 0 calc(50% - 6px);
    }

    .stats-value {
        font-size: 18px;
    }

    .stats-icon {
        width: 32px;
        height: 32px;
    }

    .stats-icon svg {
        width: 18px;
        height: 18px;
    }

    .stats-label {
        font-size: 11px;
    }
}

.sidebar {
    flex: 1;
}

button.league-title {
    width: 100%;
}

/* Fixtures list styling */
.fixtures-list {
    display: block;
    margin-bottom: 10px;
}

.fixtures-list .fixtures-list__item {
    height: 40px;
    display: block;
    color: black;
    text-decoration: none;
    font-size: 12px;
    width: 100%;
    line-height: 16px;
    background-color: #fff;
}

.fixtures-list .fixtures-list__item:hover {
    background-color: rgb(240, 240, 240);
}

.fixtures-list .fixtures-list__item:last-child {
    border-radius: 0px 0px 6px 6px;
}

.fixtures-list .all-leagues {
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 0.5rem;
    font-size: 13px;
    font-weight: 600;
    color: black;
    cursor: pointer;
}

.fixtures-list .all-leagues button {
    width: 100%;
}

.fixtures-list button {
    border: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
}

.fixtures-list button .fixtures-list__item-content {
    display: grid;
    grid-template-columns: 45px 1fr 35px;
    width: 100%;
    color: black;
    text-decoration: none;
    padding-top: 5px;
}

.fixtures-list button .fixtures-list__item-content_match {
    display: grid;
    grid-template-columns: 65px 1fr 65px;
    width: 100%;
    color: rgb(255, 255, 255);
    text-decoration: none;
    padding: 0.5rem 0px;
}

.fixtures-list button .fixture-time {
    text-align: center;
    display: flex;
    align-items: center;
    padding-left: 0.5rem;
    font-size: 12px;
    font-weight: 600;
}

.fixtures-list button .fixture-teams {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 12px;
    min-width: 0;
}

.fixtures-list button .fixture-score {
    width: 54px;
    height: 26px;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(230, 230, 230);
    margin: 0px 8px;
    flex: 0 0 45px;
}

.fixtures-list button .live {
    color: orange;
    font-weight: 600;
}

.fixtures-list button .fixture-home-team {
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
}

.fixtures-list button .fixture-home-team .style__StyledTeam-jbasLh {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    width: 100%;
}

.fixtures-list button .fixture-away-team {
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
}

.fixtures-list button .fixture-away-team .style__StyledTeam-jbasLh {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    width: 100%;
}

@media (max-width: 700px) {
    .fixtures-list button .fixture-home-team {
        width: 150px;
        gap: 5px;
        min-width: 0;
    }
    .fixtures-list button .fixture-away-team {
        width: 150px;
        gap: 5px;
        min-width: 0;
    }
}

@media (max-width: 580px) {
    .fixtures-list button .fixture-home-team {
        width: 100px;
        gap: 5px;
        min-width: 0;
    }
    .fixtures-list button .fixture-away-team {
        width: 100px;
        gap: 5px;
        min-width: 0;
    }
}

/* Date selector */
.date-selector {
    flex: 1;
}

.date-form {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.date-selector label {
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

.date-form input[type="hidden"],
.date-selector input[type="hidden"],
.date-form input.flatpickr-input {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.date-selector input[type="text"] {
    padding: 0.5rem;
    border: 2px solid #006064;
    border-left: none;
    border-right: none;
    font-size: 12px;
    font-weight: 700;
    min-width: 150px;
    color: black;
    text-align: center;
    height: 40px;
}

.date-display {
    padding: 0.5rem 1rem;
    border: none;
    font-size: 12px;
    font-weight: 700;
    color: black;
    text-align: center;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: white;
    text-transform: capitalize;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
    flex: 1;
    border-radius: 6px;
}

.date-display:hover {
    background-color: #f5f5f5;
}

.date-text {
    flex-shrink: 0;
}

.date-dropdown-icon {
    flex-shrink: 0;
    color: #666;
}

.date-selector input:foxus {
    outline: none !important;
    border: 1px solid #twój-kolor !important;
    box-shadow: none !important;
}

.date-nav-btn {
    padding: 0.5rem 0.75rem;
    border: 2px solid #006064;
    border-radius: 6px;
    color: black;
    text-align: center;
    font-weight: 600;
    height: 40px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 40px;
    height: 40px;
}

.date-nav-btn-left {
    padding: 0.5rem 0.75rem;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 40px;
    height: 40px;
    background-color: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.date-nav-btn-left:hover {
    background-color: #d0d0d0;
}

.date-nav-btn-right {
    padding: 0.5rem 0.75rem;
    border: none;
    color: #333;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 40px;
    height: 40px;
    background-color: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.date-nav-btn-right:hover {
    background-color: #d0d0d0;
}

.date-nav-btn:hover {
    background-color: #004d4d;
}

.date-nav-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Moderator controls moved to match detail page */

/* Favorites section styling */
.favorites-section {
    margin-bottom: 1rem;
}

/* Favorite leagues section */
.favorite-leagues-section {
    margin-bottom: 1rem;
}

.favorite-leagues-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid rgba(225, 225, 225, 1);
    margin-bottom: 1rem;
}

.favorite-leagues-list .league-item {
    border-bottom: 1px solid rgba(225, 225, 225, 0.5);
}

.favorite-leagues-list .league-item:last-child {
    border-bottom: 1px solid rgba(225, 225, 225, 1);
    border-radius: 0px 0px 6px 6px;
}

.favorite-leagues-list .league-link {
    padding: 0.75rem 1rem;
}

.favorite-leagues-list .no-favorites {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.favorite-leagues-list .loading {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.favorite-star {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: #000;
}

.favorite-star:hover {
    background-color: rgba(230, 230, 230, 1);
}

.favorite-star.favorited .star-icon {
    fill: #FFD700;
    stroke: #FFD700;
}

.favorite-star .star-icon {
    stroke: #000;
}

.star-icon {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.6);
    fill: none;
    transition: all 0.3s ease;
}

/* League groups (collapsible) */
.league-group {
    border: 1px solid rgba(225, 225, 225, 1);
    border-bottom: none;
}

.league-group:last-child {
    border: 1px solid rgba(225, 225, 225, 1);
}

.league-group__header {
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    font-size: 13px;
    font-weight: 600;
    color: black;
    background-color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: inherit;
    text-decoration: none;
}

.league-group__header:hover,
.league-group__header.active {
    background-color: rgb(240, 240, 240);
}

.league-group__arrow {
    transition: transform 0.3s ease;
}

.league-group__header.expanded .league-group__arrow {
    transform: rotate(180deg);
}

.league-group__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-bottom: 0;
}

.league-group__content.expanded {
    max-height: 1000px;
}

.league-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: black;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    background-color: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    height: 40px;
}

.league-link:hover,
.league-link.active {
    background-color: rgb(240, 240, 240);
}

.league-link-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-favorite-star {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 3px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 8px;
}

.league-favorite-star:hover {
    background-color: rgba(230, 230, 230, 0.5);
}

.league-favorite-star.favorited .star-icon {
    fill: #FFD700;
    stroke: #FFD700;
}

.league-favorite-star .star-icon {
    width: 16px;
    height: 16px;
    stroke: #666;
    fill: none;
    transition: all 0.3s ease;
}

/* Sub-league groups */
.sub-league-group {
    border-top: 1px solid rgba(225, 225, 225, 0.5);
}

.sub-league-group__header {
    width: 100%;
    height: 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem 0 1.5rem;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    background-color: #f9f9f9;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: inherit;
    text-decoration: none;
}

.sub-league-group__header:hover,
.sub-league-group__header.active {
    background-color: rgb(230, 230, 230);
}

.sub-league-group__arrow {
    transition: transform 0.3s ease;
}

.sub-league-group__header.expanded .sub-league-group__arrow {
    transform: rotate(180deg);
}

.sub-league-group__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sub-league-group__content.expanded {
    max-height: 2000px;
}

.league-item {
    list-style: none;
}

/* YouTube Videos */
.youtube-videos {
    background-color: #fff;
    border-radius: 0 0 6px 6px;
    border: 1px solid rgba(225, 225, 225, 1);
}

.youtube-videos .loading,
.youtube-videos .error,
.youtube-videos .no-videos {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.youtube-video-item {
    height: auto !important;
    min-height: 80px;
}

.youtube-video-link {
    display: flex;
    gap: 10px;
    padding: 10px;
    color: black;
    text-decoration: none;
    transition: background-color 0.3s ease;
    height: 100%;
}

.youtube-video-link:hover {
    background-color: rgb(240, 240, 240);
}

.youtube-thumbnail {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.youtube-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.youtube-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.youtube-date {
    font-size: 11px;
    color: #666;
}

/* Mobile bottom navigation bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    border-top: 1px solid #e1e1e1;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.mobile-bottom-nav__items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.mobile-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #666;
    padding: 5px 15px;
    transition: color 0.3s ease;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item.active {
    color: #006064;
}

.mobile-bottom-nav__icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.mobile-bottom-nav__label {
    font-size: 12px;
    font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 991px) {
    .container {
        padding-bottom: 70px; /* Add padding for fixed bottom nav */
    }

    .container .fixture-actions {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    .fixtures {
        padding-left: 10px;
        padding-right: 10px;
    }

    .mobile-bottom-nav {
        display: block;
    }
}

/* League title with viewer count */
.league-title h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.league-name {
    flex: 1;
    text-align: left;
}

/* League viewer count badge */
.league-viewer-count {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 500;
    color: #999;
    flex-shrink: 0;
}

.league-viewer-count svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.viewer-count-number {
    min-width: 15px;
    text-align: left;
}

/* Mobile responsive for viewer count */
@media (max-width: 768px) {
    .league-viewer-count {
        font-size: 12px;
        gap: 4px;
    }

    .league-viewer-count svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .league-viewer-count {
        font-size: 11px;
        gap: 3px;
    }

    .league-viewer-count svg {
        width: 12px;
        height: 12px;
    }

    .viewer-count-number {
        min-width: 12px;
    }
}

/* ===============================================
   FIXTURES LOADER ANIMATION
   =============================================== */

.fixtures-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    min-height: 300px;
}

.bouncing-balls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    position: relative;
}

.bouncing-balls .ball {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
    position: relative;
}

/* Odcienie #008080 (teal) */
.ball-blue {
    background: linear-gradient(135deg, #66cccc 0%, #4db8b8 50%, #339999 100%);
}

.ball-red {
    background: linear-gradient(135deg, #4db8b8 0%, #008080 50%, #006666 100%);
}

.ball-yellow {
    background: linear-gradient(135deg, #80dfdf 0%, #66cccc 50%, #4db8b8 100%);
}

.ball-green {
    background: linear-gradient(135deg, #339999 0%, #008080 50%, #005c5c 100%);
}

/* Highlight na piłkach */
.bouncing-balls .ball::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), transparent 60%);
}

.bouncing-balls .ball:nth-child(2) {
    animation-delay: 0.15s;
}

.bouncing-balls .ball:nth-child(3) {
    animation-delay: 0.3s;
}

.bouncing-balls .ball:nth-child(4) {
    animation-delay: 0.45s;
}

.bouncing-balls .ball:nth-child(5) {
    animation-delay: 0.6s;
}

.bouncing-balls .ball:nth-child(6) {
    animation-delay: 0.75s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1, 1);
    }
    10% {
        transform: translateY(0) scale(1.1, 0.9);
    }
    30% {
        transform: translateY(-50px) scale(0.9, 1.1);
    }
    50% {
        transform: translateY(-60px) scale(1, 1);
    }
    70% {
        transform: translateY(-50px) scale(0.9, 1.1);
    }
    90% {
        transform: translateY(0) scale(1.1, 0.9);
    }
}

.loader-text {
    font-size: 16px;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Shadow pod piłkami */
.bouncing-balls::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 8px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.2) 0%, transparent 70%);
    animation: shadowPulse 1.4s ease-in-out infinite;
}

@keyframes shadowPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 0.15;
    }
}