/* ===============================================
   GLOBAL STYLES
   =============================================== */

* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
}

button {
    cursor: pointer;
}

body {
    margin: 0 auto;
    background-color: #edf1f6;
}

.no-radius {
    border-radius: 0px !important;
}

/* ===============================================
   HEADER & NAVIGATION
   =============================================== */

.header {
    width: 100%;
    border-bottom: 1px solid #e1e1e1;
    position: fixed;
    background-color: #fff;

    .navbar {
        max-width: 1280px;
        margin: 0px auto;
        position: relative;
        display: flex;
        -webkit-box-align: center;
        align-items: center;
        -webkit-box-pack: justify;
        justify-content: space-between;
        height: 60px;
        gap: 20px;
    }

    .navbar-brand {
        flex: 1;
        a {
            color: white;
            text-decoration: none;

            svg {
                width: 50px;
                height: 50px;
            }
        }
        h1 {
            margin: 0;
            font-size: 1.5rem;
            color: white;
        }
    }

    .navbar-auth {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        flex: 1;
    }

    /* Google login button */
    .google-login-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        background: white;
        color: #333;
        padding: 8px 16px;
        border-radius: 6px;
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        border: 1px solid #dadce0;
        transition: all 0.2s ease;
    }

    .google-login-btn:hover {
        background: #f8f9fa;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    /* User menu when logged in */
    .user-menu {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .user-info {
        display: flex;
        align-items: center;
        gap: 8px;
        color: black;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        border: 2px solid white;
    }

    .user-details {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
    }

    .user-name {
        font-size: 14px;
        font-weight: 500;
        line-height: 1.2;
    }

    .user-role {
        font-size: 11px;
        font-weight: 400;
        opacity: 0.8;
        background: rgba(255, 255, 255, 0.2);
        padding: 2px 6px;
        border-radius: 3px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .logout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.1);
        color: black;
        border-radius: 6px;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .logout-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

.navbar-brand a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    width: 50px;
}

.navbar-brand a:hover {
    color: #D4E5E4;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.user-info {
    color: white;
    font-size: 0.9rem;
}

.moderator-badge {
    background: #008080;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 8px;
}

.login-link, .logout-link {
    color: white;
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid white;
    border-radius: 4px;
    font-size: 0.9rem;
}

.login-link:hover, .logout-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .navbar-user {
        flex-direction: column;
        gap: 5px;
    }

    .user-info {
        font-size: 0.8rem;
    }

    .moderator-badge {
        font-size: 0.7rem;
        padding: 1px 6px;
    }
}

/* ===============================================
   SHARED COMPONENTS
   =============================================== */

.league-title {
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
    gap: 10px;
    background-color: rgb(245, 245, 245);
    border-radius: 6px 6px 0px 0px;
    border: solid 1px rgb(225, 225, 225);
    border-bottom: none;
    font-size: 13px;
    font-weight: 600;
    color: black;

    h2 {
        padding-left: 0.5rem;
    }

    h3 {
        padding-left: 0.5rem;
    }
}
.league-title:hover {
    background-color: rgb(240, 240, 240);
}

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

/* Container layout is now page-specific */

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

.fixtures-list__item {
    height: 40px;
    display: block;
    text-decoration: none;
    font-size: 12px;
    width: 100%;
    line-height: 16px;
    border-bottom: 1px solid #006064;
    background-color: white;
}

.fixtures-list__item:nth-child(even) {
    border: solid 1px rgb(225, 225, 225);
    border-bottom: none;
}

.fixtures-list__item:nth-child(odd) {
    border: solid 1px rgb(225, 225, 225);
    border-bottom: none;
}

.fixtures-list__item:last-child {
    border-radius: 0px 0px 6px 6px;
    border-bottom: solid 1px rgb(225, 225, 225);
}

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

.fixtures-list__item-content {
    display: grid;
    grid-template-columns: 45px 1fr 35px;
    width: 100%;
    color: black;
    text-decoration: none;
    padding: 0.5rem 0px;
}

.fixtures-list__item-content_match {
    display: grid;
    grid-template-columns: 65px 1fr 65px;
    width: 100%;
    color: black;
    text-decoration: none;
    padding: 0.5rem 0px;
}

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

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

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

.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;
}

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

.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;
}

.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) {
    .fixture-home-team {
        width: 150px;
        gap: 5px;
        min-width: 0;
    }
    .fixture-away-team {
        width: 150px;
        gap: 5px;
        min-width: 0;
    }
}

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

/* Container responsive styles are now page-specific */

/* ===============================================
   SHARED DETAIL PAGE LAYOUTS
   =============================================== */

/* Main detail page layout - used by match detail, team detail, admin pages */
.match-detail-container {
    display: flex;
    gap: 10px;
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 71px;
}

.match-detail-main {
    flex: 2.5;
}

.match-detail-sidebar {
    flex: 1;
}

/* Detail page sections */
.match-header {
    margin-bottom: 10px;
}

.match-section {
    margin-bottom: 10px;
}

.sidebar-section {
    margin-bottom: 10px;
}

/* League table - shared component */
.table-container {
    background-color: #ffffff;
    border-radius: 0 0 6px 6px;
    border: solid 1px rgb(225, 225, 225);
    border-top: none;
    overflow-x: auto;
}

.league-table {
    width: 100%;
    border-collapse: collapse;
    color: #333;
    font-size: 12px;
}

.league-table th {
    background-color: #f5f5f5;
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid #e1e1e1;
}

.league-table td {
    padding: 8px 4px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.league-table tr {
    cursor: pointer;
}

.league-table .team-name-cell {
    text-align: left;
    padding-left: 8px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-table .highlighted-team {
    background-color: #e3f2fd !important;
    font-weight: 600;
}

.league-table .positive {
    color: #4CAF50;
}

.league-table .negative {
    color: #F44336;
}

.league-table .points {
    font-weight: 800;
}

/* Match results - shared component */
.match-result {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
}

.result-w {
    background-color: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 10px;
}

.result-l {
    background-color: #F44336;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 10px;
}

.result-d {
    background-color: #FF9800;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 10px;
}

/* Curiosities - shared component */
.curiosities-container {
    background-color: #ffffff;
    border-radius: 0 0 6px 6px;
    border: solid 1px rgb(225, 225, 225);
    border-top: none;
    padding: 15px;
}

.team-curiosity {
    margin-bottom: 15px;
}

.team-curiosity:last-child {
    margin-bottom: 0;
}

.team-curiosity h4 {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 4px;
}

.curiosity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.curiosity-list li {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    color: #333;
    font-size: 11px;
}

.curiosity-icon {
    margin-right: 6px;
    font-size: 12px;
    min-width: 16px;
}

.curiosity-text {
    line-height: 1.3;
}

/* Tabs system */
.tabs-container {
    margin-bottom: 10px;
}

.tabs-header {
    display: flex;
    background-color: #f5f5f5;
}

.tab-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e1e1e1;
    border-bottom: none;
}

.tab-button svg {
    width: 18px;
    height: 18px;
    fill: #666;
    transition: fill 0.2s ease;
}

.tab-button:hover {
    background-color: rgba(0, 128, 128, 0.05);
    color: #008080;
}

.tab-button:hover svg {
    fill: #008080;
}

.tab-button.active {
    background-color: #ffffff;
    color: #008080;
}

.tab-button.active svg {
    fill: #008080;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Responsive tabs */
@media (max-width: 768px) {
    .tab-button {
        padding: 10px 12px;
        font-size: 13px;
        gap: 6px;
    }

    .tab-button svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .tab-button {
        padding: 8px 10px;
        font-size: 12px;
        gap: 4px;
    }

    .tab-button svg {
        width: 14px;
        height: 14px;
    }
}

/* Responsive design for detail pages */
@media (max-width: 991px) {
    .match-detail-container {
        flex-direction: column;
    }

    .match-detail-sidebar {
        display: none;
    }
}





/* ===============================================
   FLASH MESSAGES
   =============================================== */

.flash-messages {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-text {
    flex: 1;
    font-size: 14px;
}

.flash-close {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin-left: 10px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}



/* ===============================================
   GLOBAL SEARCH
   =============================================== */

.navbar-search {
    flex: 1;
}

/* Mobile search button - hidden by default */
.mobile-search-btn {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Desktop search - shown by default */
.desktop-search {
    display: block;
}

/* Mobile search overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
}

.mobile-search-overlay.active {
    display: block;
}

.mobile-search-header {
    padding: 20px;
    background: #2c3e50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-search-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    outline: none;
}

.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.mobile-search-close {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-search-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.mobile-search-results .search-result-item {
    background: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    border-radius: 8px;
    color: #333;
}

.mobile-search-results .search-loading,
.mobile-search-results .search-no-results,
.mobile-search-results .search-error {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 12px 24px 12px 44px;
    border: none;
    border-radius: 6px;
    background-color: rgba(240, 240, 240, 1.0);
    color: rgba(113, 113, 113, 1.0);;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(113, 113, 113, 1.0);
}

.search-input:focus {
    background-color: rgba(240, 240, 240, 1.0);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(113, 113, 113, 1.0);
    pointer-events: none;
    fill: black;
}

.search-icon svg {
    fill: black;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background-color: #f8f9fa;
}

.search-result-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    margin-right: 12px;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.search-result-subtitle {
    color: #666;
    font-size: 12px;
}

.search-result-type {
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    margin-left: 12px;
    flex-shrink: 0;
}

.search-loading,
.search-no-results,
.search-error {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.search-loading {
    color: #008080;
}

.search-error {
    color: #dc3545;
}

@media (max-width: 991px) {
    .navbar-brand {
        min-width: 0px !important;
        padding-left: 10px;
        flex: 1;
    }

    .navbar-auth {
        display: none !important;
    }
}
/* Mobile search styles */
@media (max-width: 768px) {
    .navbar-search {
        max-width: none;
        min-width: auto;
        padding-right: 10px;
        flex: 0;
        display: flex;
    }


    /* Hide desktop search on mobile */
    .desktop-search {
        display: none;
    }

    /* Show mobile search button */
    .mobile-search-btn {
        display: block;
    }

    /* Optimize mobile search overlay for smaller screens */
    .mobile-search-header {
        padding: 16px;
    }

    .mobile-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .mobile-search-results {
        padding: 16px;
    }

    .search-icon {
        right: 8px;
    }

    .search-icon svg {
        width: 14px;
        height: 14px;
    }

    .search-result-item {
        padding: 10px 12px;
    }

    .search-result-title {
        font-size: 13px;
    }

    .search-result-subtitle {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .navbar-search {
        min-width: auto;
        flex: 0;
    }

    /* Hide desktop search on mobile */
    .desktop-search {
        display: none;
    }

    /* Show mobile search button */
    .mobile-search-btn {
        display: block;
        padding: 6px;
    }

    /* Further optimize mobile search overlay for very small screens */
    .mobile-search-header {
        padding: 12px;
    }

    .mobile-search-input {
        padding: 10px 12px;
    }

    .mobile-search-results {
        padding: 12px;
    }

    .mobile-search-results .search-result-item {
        padding: 10px 12px;
    }
}

/* ===============================================
   FOOTER
   =============================================== */

.site-footer {
    background-color: #ffffff;
    border-top: 1px solid #e1e1e1;
    margin-top: 40px;
    padding: 20px 0;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}

.footer-section {
    display: flex;
    align-items: center;
}

.footer-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.footer-link {
    font-size: 14px;
    color: #008080;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #006064;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .footer-text,
    .footer-link {
        font-size: 12px;
    }
}

/* ===============================================
   LEGAL PAGES (PRIVACY POLICY)
   =============================================== */

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
    padding: 40px;
    margin-top: 80px;
    margin-bottom: 40px;
}

.legal-container h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #008080;
}

.legal-section {
    margin-bottom: 30px;
}

.legal-section h2 {
    font-size: 22px;
    color: #008080;
    margin-bottom: 15px;
}

.legal-section p {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-section ul {
    margin-left: 25px;
    margin-bottom: 12px;
}

.legal-section ul li {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    margin-bottom: 8px;
}

.legal-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
    text-align: center;
}

.legal-footer p {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .legal-container {
        padding: 20px;
        margin-top: 70px;
    }

    .legal-container h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .legal-section h2 {
        font-size: 18px;
    }

    .legal-section p,
    .legal-section ul li {
        font-size: 13px;
    }
}
