/* ============================================
   ============================================
   התאמה לנייד - 768px
   ============================================
   ============================================ */

/* תפריט עליון */
.top-menu {
    height: 45px;
    max-height: 45px;
}
.menu-section {
    padding: 0 10px;
    font-size: 12px;
}
.menu-btn {
    font-size: 12px;
    padding: 0 10px;
}
.support-btn {
    font-size: 11px;
    padding: 0 8px;
    gap: 4px;
}
.support-btn svg {
    width: 12px;
    height: 12px;
}
/* חלק הרשמה והתחברות */
.auth-section {
    height: 40px;
    min-height: 40px;
    padding: 0 15px;
}
.logo-container {
    margin-left: 5px;
}
.auth-buttons {
    padding: 0;
}
.auth-btn {
    font-size: 11px;
    padding: 0 12px;
    gap: 6px;
}
.auth-btn svg {
    width: 14px;
    height: 14px;
}
/* שדה חיפוש */
.search-section {
    padding: 15px 15px 3px 15px;
    justify-content: center;
}
.search-container {
    max-width: 600px;
}
.search-input {
    font-size: 13px;
    padding: 10px 12px 10px 40px;
    text-align: right;
}
.search-icon {
    width: 16px;
    height: 16px;
    left: 12px;
}
/* תפריט ספורט */
.sports-menu-wrapper {
    padding: 0px 0 10px 0;
    overflow: visible;
}
.sports-menu {
    gap: 15px;
    padding: 4px 0 15px 0;
    align-items: flex-start;
    justify-content: flex-start;
}
.sport-item {
    min-width: 70px;
    gap: 6px;
    padding: 5px 0 12px 0;
    overflow: visible;
}
.sport-item::after {
    bottom: 3px;
    height: 3px;
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.6);
    z-index: 100;
}
.sport-icon {
    width: 32px;
    height: 32px;
}
.sport-name {
    font-size: 13px;
}
.content-wrapper {
    padding: 15px;
}
.content-container {
    gap: 15px;
}
.page-title {
    font-size: 24px;
}
.tabs-container {
    gap: 5px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    position: relative;
    padding-bottom: 0;
    margin-bottom: 0;
    contain: layout style;
}

/* מרווח בין טאבים לקוביות ליגות במסך לייב כדורגל (נייד) */
.football-live-container .tabs-container {
    margin-bottom: 10px;
}
.tabs-container::-webkit-scrollbar {
    display: none;
}
.tab-btn {
    font-size: 12px;
    padding: 10px 15px;
    gap: 6px;
    margin-bottom: -2px;
}
.tab-icon {
    width: 16px;
    height: 16px;
}
.tab-btn.active {
    color: var(--yellow);
    border-bottom: 2px solid var(--yellow);
    z-index: 2;
    position: relative;
    overflow: visible;
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--yellow);
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.4);
}
/* קונטיינר למשחקים ולליגות - 768px */
.matches-wrapper {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    box-sizing: border-box;
}

/* מלבני ליגות - 768px */
.leagues-wrapper {
    margin-bottom: 12px;
    gap: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}
.leagues-container {
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    direction: rtl;
    width: 100%;
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
}
.leagues-container::-webkit-scrollbar {
    display: none;
}
.league-scroll-btn {
    display: none !important; /* תמיד מוסתר בנייד */
}
/* עדכון רוחב ליגות לנייד - 4 ליגות */
.league-box {
    width: calc((100% - 24px) / 4); /* 4 ליגות, פחות gap (8px * 3) */
    min-width: calc((100% - 24px) / 4);
    max-width: calc((100% - 24px) / 4);
    padding: 8px;
    flex: 0 0 auto;
    flex-shrink: 0;
    border-radius: 0 !important; /* ללא עיגול פינות */
    box-sizing: border-box;
}
.league-box-content {
    gap: 6px;
}
.league-header {
    gap: 6px;
}
.league-name {
    font-size: 9px;
    line-height: 1.1;
}
.league-season {
    font-size: 7px;
    line-height: 1.1;
}
.league-stats {
    gap: 6px;
    padding-top: 4px;
}
.stat-label {
    font-size: 6px;
    line-height: 1.1;
}
.stat-value {
    font-size: 9px;
    line-height: 1.1;
}
.league-icon {
    width: 18px;
    height: 18px;
}
.league-name-wrapper {
    gap: 1px;
}
.league-stat {
    gap: 1px;
}
.form-and-table-wrapper {
    flex-direction: column;
    gap: 15px;
}

.sidebar-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.my-form-container {
    flex: 1;
    width: 100%;
    border-radius: 8px;
}
.my-form-header {
    padding: 10px 12px;
    border-radius: 8px 8px 0 0;
}
.my-form-title {
    font-size: 10px;
}
.my-form-content {
    padding: 15px;
    gap: 12px;
}
.guest-greeting {
    font-size: 13px;
}
.empty-form-message {
    font-size: 12px;
    padding: 0 8px;
}
.empty-live-matches,
.empty-tab-message {
    padding: 40px 15px;
    min-height: 150px;
}
.empty-live-matches-icon,
.empty-tab-message-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}
.empty-live-matches-title,
.empty-tab-message-title {
    font-size: 16px;
    margin-bottom: 8px;
}
.empty-live-matches-message,
.empty-tab-message-text {
    font-size: 12px;
}
.my-form-container .auth-buttons {
    height: 35px;
}
.my-form-container .auth-btn {
    font-size: 11px;
    padding: 0 15px;
    gap: 6px;
}
.my-form-container .auth-btn svg {
    width: 14px;
    height: 14px;
}
.bets-table-container {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
    box-sizing: border-box;
}

/* ============================================
   התאמה לנייד - פרטי משחק 768px
   ============================================ */
.match-detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.match-detail-header h2 {
    font-size: 18px;
}

.back-link {
    font-size: 11px;
    padding: 8px 14px;
    align-self: flex-end;
}

.match-detail-league {
    padding: 10px 12px !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
}

.league-logo-detail {
    width: 24px !important;
    height: 24px !important;
}

.league-name-detail {
    font-size: 11px !important;
}

.back-link {
    font-size: 10px !important;
    padding: 5px 10px !important;
}

.match-detail-teams {
    grid-template-columns: 1fr auto 1fr !important;
    gap: 10px !important;
    padding: 16px 12px !important;
    margin-bottom: 16px !important;
}

.match-detail-teams::after {
    display: none;
}

.team-detail {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px !important;
}

.team-label {
    font-size: 9px !important;
    margin-bottom: 0 !important;
}

.team-detail.home,
.team-detail.away {
    align-items: center !important;
}

.team-logo-detail {
    width: 45px !important;
    height: 45px !important;
}

.team-name-detail {
    font-size: 12px !important;
    max-width: 100px !important;
    text-align: center !important;
    word-wrap: break-word !important;
}

.match-score-wrapper {
    margin: 0 8px !important;
    gap: 8px !important;
    order: 0 !important;
    width: auto !important;
}

.match-score-detail {
    font-size: 24px !important;
    min-width: 80px !important;
    width: auto !important;
    padding: 8px 12px !important;
    letter-spacing: 0.8px !important;
}

.elapsed-time-under-score {
    font-size: 11px !important;
    padding: 5px 10px !important;
    gap: 5px !important;
    margin-top: 6px !important;
}

.live-dot {
    width: 8px;
    height: 8px;
}

.match-detail-info {
    padding: 16px 18px;
}

.match-detail-info p {
    font-size: 12px;
    margin: 8px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.match-detail-info strong {
    min-width: auto;
    margin-bottom: 2px;
}

/* התאמת קונטיינר ראשי */
.football-live-container {
    padding: 15px;
}

.football-live-container h1 {
    font-size: 20px;
    margin-bottom: 15px;
    padding: 12px 0;
}

/* טאבים למשחק - 768px */
.match-tab-btn {
    padding: 5px 7px !important;
    font-size: 9px !important;
    gap: 4px !important;
    min-height: 30px !important;
}

.match-tab-content {
    padding: 6px 8px !important;
}

.match-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.match-info-item {
    padding: 10px;
}

.match-info-label {
    font-size: 11px;
}

.match-info-value {
    font-size: 14px;
}
.bets-table-container::before {
    top: -17px; /* 15px gap + 2px כדי ליישר עם הפס הצהוב */
}
.date-group {
    gap: 15px;
    margin-bottom: 15px;
}
.date-group:last-child {
    margin-bottom: 0;
}
.date-header {
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px 8px 0 0;
}
.date-header-title {
    font-size: 16px;
}
.date-badge {
    width: 35px;
    background: linear-gradient(315deg, var(--green-dark) 0%, var(--green-light) 50%, var(--green-dark) 100%);
    border-left: 2px solid var(--green-light);
}
.date-title {
    font-size: 11px;
    font-family: Arial, sans-serif;
    font-weight: 400;
    padding: 10px 3px;
    opacity: 0.8;
}
.bets-table {
    min-width: 100%;
    max-width: 100%;
    font-size: 12px;
    table-layout: fixed;
    width: 100%;
}
.bets-table th {
    font-size: 10px;
    padding: 8px 6px;
}
.date-badge {
    border-radius: 0 8px 8px 0;
}
.date-badge::before {
    border-radius: 0 8px 8px 0;
}
.bets-table {
    border-radius: 8px;
}
.bets-table th {
    font-size: 11px;
    padding: 8px 6px;
}
/* עמודת LIVE */
.bets-table th:nth-child(1),
.bets-table th.live-header {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 8px 4px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.3) 0%, rgba(255, 0, 0, 0.15) 100%);
    color: #ff4444;
    font-weight: 700;
    box-sizing: border-box;
    overflow: hidden;
}
.bets-table th.live-header .live-icon {
    width: 22px;
    height: 22px;
    color: #ff4444;
}
.bets-table td.live-cell {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 6px 4px !important;
    font-size: 8px !important;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.3) 0%, rgba(255, 0, 0, 0.15) 100%) !important;
    box-sizing: border-box;
    overflow: hidden;
}
.bets-table td.live-cell .live-time-text {
    font-size: 8px !important;
    line-height: 1.1 !important;
}
/* עמודת הקבוצות - עדיפות מקסימלית */
.bets-table th:nth-child(2) {
    min-width: 120px;
    width: auto;
    padding: 8px 10px !important;
    text-align: right;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
    overflow: hidden;
    box-sizing: border-box;
}
.bets-table td:nth-child(2) {
    padding: 6px 8px !important;
    text-align: center;
    vertical-align: middle;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
    min-width: 120px;
    width: auto;
}
/* צמצום עמודות ה-odds */
.bets-table th:nth-child(3),
.bets-table th:nth-child(4),
.bets-table th:nth-child(5) {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 8px 4px;
    font-size: 8px;
    overflow: hidden;
    box-sizing: border-box;
}
.bets-table td:nth-child(3),
.bets-table td:nth-child(4),
.bets-table td:nth-child(5) {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 6px 4px;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
}
.bet-odds-btn {
    font-size: 10px;
    padding: 2px;
    min-width: 0;
    max-width: 100%;
    letter-spacing: 0;
}
/* עמודת הכוכב, מגרש וסטטיסטיקה - גודל מותאם */
.bets-table th.actions-header {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    padding: 8px 4px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 215, 0, 0.15) 100%);
    background-color: rgba(255, 215, 0, 0.2);
    border-left: 1px solid rgba(255, 215, 0, 0.4);
    box-sizing: border-box;
    overflow: hidden;
}
.bets-table th.actions-header {
    font-size: 8px;
}
.bets-table th.actions-header svg {
    width: 10px;
    height: 10px;
}
.bets-table td.actions-cell {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    padding: 6px 4px;
    vertical-align: middle;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
    box-sizing: border-box;
    overflow: hidden;
}
.stats-buttons {
    gap: 4px;
}
.stats-btn,
.field-btn {
    width: 18px;
    height: 18px;
    padding: 3px;
}
.stats-btn svg,
.field-btn svg {
    width: 12px;
    height: 12px;
}
.match-teams {
    gap: 6px;
    width: 100%;
}
.team-name {
    font-size: clamp(8px, 2.2vw, 11px);
    line-height: 1.2;
    gap: clamp(3px, 0.8vw, 5px);
    white-space: nowrap;
    overflow: visible;
    flex: 1;
    min-width: 0;
}
.team-logo {
    width: clamp(12px, 3.5vw, 18px);
    height: clamp(12px, 3.5vw, 18px);
    min-width: clamp(12px, 3.5vw, 18px);
    min-height: clamp(12px, 3.5vw, 18px);
    flex-shrink: 1;
}
.match-info {
    padding: 0 6px !important;
    min-width: 50px !important;
    max-width: 65px !important;
    flex-shrink: 0;
    gap: 1px !important;
}

/* ============================================
   מובייל בינוני אופקי (~512px) - צמצום ושבירת עומס
   ============================================ */
@media (max-width: 540px) and (orientation: landscape) {
    /* כללית: הקטנת גופנים ופדינג */
    .bets-table {
        font-size: 9px !important;
    }

    /* עמודת כוכב/לייב קטנה יותר */
    .bets-table th.live-header,
    .bets-table td.live-cell {
        width: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        padding: 1px !important;
        font-size: 6px !important;
    }

    /* פעולות (סטטיסטיקה/מגרש) קטנות יותר */
    .bets-table th.actions-header,
    .bets-table td.actions-cell {
        width: 22px !important;
        min-width: 22px !important;
        max-width: 22px !important;
        padding: 2px 2px !important;
    }
    .stats-buttons {
        gap: 3px !important;
    }
    .stats-btn,
    .field-btn {
        width: 14px !important;
        height: 14px !important;
        padding: 1px !important;
    }
    .stats-btn svg,
    .field-btn svg {
        width: 10px !important;
        height: 10px !important;
    }

    /* עמודת קבוצות: פחות רוחב ופדינג קטן יותר */
    .bets-table th:nth-child(2),
    .bets-table td:nth-child(2) {
        min-width: 85px !important;
        max-width: 115px !important;
        padding: 3px 3px !important;
        font-size: 9px !important;
    }

    /* לוגו ושמות: אליפסיס וגדלים קטנים יותר */
    .match-teams {
        width: 100%;
        gap: 3px;
    }
    .team-name {
        font-size: clamp(7px, 1.4vw, 9px) !important;
        gap: 2px !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding: 2px 3px 2px 30px !important;
        position: relative;
    }
    .match-teams .team-name:first-of-type {
        padding-right: 4px !important;
        padding-left: 0 !important;
    }
    .match-teams .team-name:last-of-type {
        padding-left: 4px !important;
        padding-right: 0 !important;
    }
    .team-logo {
        width: clamp(9px, 2.4vw, 14px) !important;
        height: clamp(9px, 2.4vw, 14px) !important;
        min-width: clamp(9px, 2.4vw, 14px) !important;
        min-height: clamp(9px, 2.4vw, 14px) !important;
        flex-shrink: 0 !important;
    }
    .match-info {
        padding: 0 4px !important;
        min-width: 24px !important;
        max-width: 32px !important;
    }

    /* LIVE: שתי שורות אנכיות והסתרת המידע המרכזי */
    #live-matches-container .bets-table td:nth-child(2) .match-teams {
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: stretch;
        width: 100%;
        padding: 4px 0;
    }
    #live-matches-container .bets-table td:nth-child(2) .match-teams .match-info {
        display: none !important;
    }
    #live-matches-container .bets-table td:nth-child(2) .match-teams .team-name {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        direction: rtl;
        text-align: right;
        padding-left: 30px !important;
        position: relative;
    }
    #live-matches-container .bets-table td:nth-child(2) .match-teams .team-name .match-score-inline {
        min-width: 28px;
        width: 28px;
        text-align: left;
        direction: ltr;
        font-size: 9px;
        position: absolute;
        left: 2px;
        top: 50%;
        transform: translateY(-50%);
    }

    /* הסתרת התוצאה המרכזית בנייד */
    #live-matches-container .bets-table td:nth-child(2) .match-teams .match-info .match-score {
        display: none !important;
    }

    /* UPCOMING/FINISHED: כמו לייב בנייד */
    #upcoming-matches-container .bets-table td:nth-child(3) .match-teams,
    #finished-matches-container .bets-table td:nth-child(3) .match-teams {
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: stretch;
        width: 100%;
        padding: 4px 0;
    }
    #upcoming-matches-container .bets-table td:nth-child(3) .match-teams .match-info,
    #finished-matches-container .bets-table td:nth-child(3) .match-teams .match-info {
        display: none !important;
    }
    #upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name,
    #finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        direction: rtl;
        text-align: right;
        padding: 2px 4px 2px 30px !important; /* אותו padding לשתי שורות כמו LIVE */
        position: relative;
    }

    #upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name:first-of-type,
    #upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name:last-of-type,
    #finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name:first-of-type,
    #finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name:last-of-type {
        flex-direction: row !important; /* למנוע row-reverse מהחוקים הכלליים */
        justify-content: flex-start !important;
        direction: rtl !important;
        text-align: right !important;
        padding: 2px 4px 2px 30px !important; /* לנעול התחלה באותו קו */
    }

    #upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name .team-logo,
    #finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name .team-logo {
        order: 0 !important; /* לוגו תמיד ראשון */
    }
    #upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name .match-score-inline,
    #finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name .match-score-inline {
        min-width: 28px;
        width: 28px;
        text-align: left;
        direction: ltr;
        font-size: 9px;
        position: absolute;
        left: 2px;
        top: 50%;
        transform: translateY(-50%);
    }

    /* עמודות 1X2 קטנות יותר בטווח הצר */
    .bets-table th:nth-child(3),
    .bets-table th:nth-child(4),
    .bets-table th:nth-child(5),
    .bets-table td:nth-child(3),
    .bets-table td:nth-child(4),
    .bets-table td:nth-child(5) {
        width: 20px !important;
        min-width: 20px !important;
        max-width: 20px !important;
        padding: 1px !important;
        font-size: 7px !important;
    }
}
.match-vs {
    font-size: clamp(8px, 1.8vw, 10px) !important;
}
.match-score {
    font-size: 10px !important;
    line-height: 1.1 !important;
    font-weight: 700;
}
.team-score {
    font-size: 10px !important;
    padding: 2px 3px !important;
    line-height: 1.0 !important;
}
.bets-table th:nth-child(3),
.bets-table th:nth-child(4),
.bets-table th:nth-child(5),
.bets-table td:nth-child(3),
.bets-table td:nth-child(4),
.bets-table td:nth-child(5) {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
}
/* התאמות למשחקים שהסתיימו בנייד */
/* התאמות שורת מידע בנייד */
.match-details-info {
    gap: 10px;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    direction: rtl;
}
.match-detail-item {
    font-size: clamp(9px, 1.6vw, 11px);
    gap: 5px;
}
.match-detail-item svg {
    width: 12px;
    height: 12px;
}
.bets-table td.match-details-cell {
    padding: 6px 8px;
}
/* התאמות למשחקים קרובים בנייד */
/* עמודה 2: תאריך - קטן יותר */
#upcoming-matches-container .bets-table th:nth-child(2),
#upcoming-matches-container .bets-table td.date-cell {
    min-width: 60px !important;
    max-width: 70px !important;
    padding: 5px 3px !important;
    font-size: 9px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%) !important;
    border-left: none !important;
}

/* עמודה 3: ליגה/קבוצות - יותר מקום */
#upcoming-matches-container .bets-table th:nth-child(3),
#upcoming-matches-container .bets-table td:nth-child(3) {
    min-width: 160px !important;
    padding: 6px 4px !important;
}

/* עמודות 4, 5, 6: יחסים - קטן עוד יותר */
#upcoming-matches-container .bets-table th:nth-child(4),
#upcoming-matches-container .bets-table th:nth-child(5),
#upcoming-matches-container .bets-table th:nth-child(6),
#upcoming-matches-container .bets-table td:nth-child(4),
#upcoming-matches-container .bets-table td:nth-child(5),
#upcoming-matches-container .bets-table td:nth-child(6) {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    padding: 5px !important;
    position: relative !important;
    vertical-align: middle !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%) !important;
}
#upcoming-matches-container .match-date-upcoming {
    font-size: clamp(8px, 1.6vw, 10px);
}
/* התאמות למשחקים שהסתיימו בנייד */
/* עמודה 2: תאריך */
#finished-matches-container .bets-table th:nth-child(2),
#finished-matches-container .bets-table td.date-cell {
    min-width: 75px !important;
    max-width: 95px !important;
    padding: 6px 4px !important;
    font-size: 10px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%) !important;
    border-left: none !important;
}
/* עמודה 4: סטטוס */
#finished-matches-container .bets-table th:nth-child(4),
#finished-matches-container .bets-table td.status-cell {
    min-width: 75px !important;
    max-width: 95px !important;
    padding: 6px 4px !important;
    font-size: 10px;
}
#finished-matches-container .match-date-finished {
    font-size: clamp(9px, 1.8vw, 11px);
}
#finished-matches-container .match-status-finished {
    font-size: clamp(9px, 1.8vw, 11px);
}

/* סגנונות נוספים למשחקים קרובים והסתיימו בנייד - שורות */
#upcoming-matches-container .bets-table tbody tr,
#finished-matches-container .bets-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#upcoming-matches-container .bets-table tbody tr:hover,
#finished-matches-container .bets-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

#upcoming-matches-container .bets-table tbody tr:last-child,
#finished-matches-container .bets-table tbody tr:last-child {
    border-bottom: none;
}

/* סגנונות נוספים למשחקים קרובים והסתיימו בנייד - תאים */
#upcoming-matches-container .bets-table tbody td,
#finished-matches-container .bets-table tbody td {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

#upcoming-matches-container .bets-table tbody td:last-child,
#finished-matches-container .bets-table tbody td:last-child {
    border-right: none;
}

/* border-radius לתאים האחרונים במשחקים קרובים והסתיימו בנייד */
#upcoming-matches-container .bets-table tbody tr:last-child td.live-cell,
#finished-matches-container .bets-table tbody tr:last-child td.live-cell {
    border-bottom-right-radius: 8px;
}

#upcoming-matches-container .bets-table tbody tr:last-child td.actions-cell,
#finished-matches-container .bets-table tbody tr:last-child td.actions-cell {
    border-bottom-left-radius: 8px;
}

/* הקטנת כרטיסים בנייד 768px */
.card-red-icon,
.card-flash-icon.yellow {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
}

.card-yellow-count,
.card-red-count {
    font-size: 8px !important;
    padding: 0 1px !important;
    min-width: 11px !important;
    top: -5px !important;
    right: -3px !important;
    line-height: 1.1 !important;
}

.match-cards {
    gap: 2px !important;
    margin-right: 1px !important;
    margin-left: 0.5px !important;
}

.bets-table td {
    padding: 4px 3px;
    font-size: 11px;
    line-height: 1.1;
    vertical-align: middle;
}
.bets-table th:nth-child(2) {
    font-size: 10px;
    padding: 8px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* עמודת הכוכב, מגרש וסטטיסטיקה - גודל מותאם */
.bets-table th.actions-header {
    width: 50px;
    min-width: 50px;
    padding: 8px 4px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 215, 0, 0.15) 100%);
    background-color: rgba(255, 215, 0, 0.2);
    border-left: 1px solid rgba(255, 215, 0, 0.4);
}
.bets-table th.actions-header svg {
    width: 16px;
    height: 16px;
}
.bets-table td.actions-cell {
    width: 50px;
    min-width: 50px;
    padding: 6px 4px;
    vertical-align: middle;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
}
.stats-buttons {
    gap: 4px;
}
.stats-btn,
.field-btn {
    width: 20px;
    height: 20px;
    padding: 3px;
}
.stats-btn svg,
.field-btn svg {
    width: 14px;
    height: 14px;
}
.bets-table th.date-header {
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    padding: 5px 2px;
    background: linear-gradient(315deg, var(--green-dark) 0%, var(--green-light) 50%, var(--green-dark) 100%);
    border-radius: 0;
    border-top-right-radius: 8px;
    box-sizing: border-box;
    overflow: hidden;
}
.bets-table td.date-cell {
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    padding: 3px 2px;
    vertical-align: middle;
    background: linear-gradient(315deg, var(--green-dark) 0%, var(--green-light) 50%, var(--green-dark) 100%);
    border-left: 2px solid var(--green-light);
    box-sizing: border-box;
    overflow: hidden;
}
.bets-table td.date-cell .date-title {
    font-size: 11px;
}
.bets-table thead tr:first-child th.actions-header {
    border-top-left-radius: 8px;
}
.bets-table thead tr:first-child th:nth-child(1) {
    border-top-right-radius: 8px;
}
.bets-table tbody tr:last-child td.actions-cell {
    border-bottom-left-radius: 8px;
}
.bets-table tbody tr:last-child td.live-cell {
    border-bottom-right-radius: 8px;
}
.stats-buttons {
    gap: 6px;
}
.stats-btn,
.field-btn {
    padding: 2px;
}
.stats-btn svg,
.field-btn svg,
.star-btn svg {
    width: 14px;
    height: 14px;
}
.bets-table td.live-cell {
    padding: 6px 4px !important;
    vertical-align: middle;
    font-size: 8px !important;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.3) 0%, rgba(255, 0, 0, 0.15) 100%) !important;
}
.bets-table td.live-cell .live-time-text {
    font-size: 8px !important;
    line-height: 1.1 !important;
}
.bets-table th:nth-child(2) {
    width: auto;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
}
.bets-table td:nth-child(2),
.bets-table td:nth-child(3) {
    padding: 0;
    vertical-align: top;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
}
.bets-table th:nth-child(2),
.bets-table th:nth-child(3),
.bets-table th:nth-child(4) {
    width: 40px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
}
.bets-table td:nth-child(3),
.bets-table td:nth-child(4),
.bets-table td:nth-child(5) {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
}
.match-teams {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.team-name {
    font-size: 12px;
    line-height: 1.2;
    gap: 5px;
}
.match-teams .team-name:first-of-type {
    padding-right: 12px;
    flex-direction: row;
    direction: rtl;
    justify-content: flex-start;
}
.match-teams .team-name:last-of-type {
    padding-left: 12px;
    flex-direction: row-reverse;
    justify-content: flex-start;
}
.match-info {
    padding: 0 10px;
    min-width: 65px;
    gap: 2px;
}
.match-vs {
    font-size: clamp(9px, 2vw, 11px);
}
.team-logo {
    width: 20px;
    height: 20px;
}
.team-score {
    color: #333333;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 4px;
    line-height: 1.0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-shadow: 0 0.5px 1px rgba(255, 255, 255, 0.5);
}
.match-time {
    font-size: 7px;
    line-height: 1.2;
}
.match-score {
    font-size: 10px;
    line-height: 1.2;
}
.bet-odds-btn {
    font-size: 10px;
    min-width: 0;
    max-width: 100%;
    padding: 2px;
    letter-spacing: 0;
}
.site-footer {
    padding: 15px;
}
.footer-content {
    gap: 8px;
}
.footer-copyright {
    font-size: 11px;
}
.footer-link {
    font-size: 11px;
}
.footer-separator {
    font-size: 11px;
}
.upcoming-filters-modern {
    margin-bottom: 8px;
}
.filters-header {
    padding: 8px 10px;
}
.filters-header span {
    font-size: 11px;
}
.filters-content {
    padding: 10px 10px;
    gap: 10px;
    /* בנייד: 2 שורות קבועות */
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: visible;
}
.filters-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}
.filters-row1 {
    overflow-x: auto; /* ימים בשורה אחת */
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 0;
}
.filters-row1::-webkit-scrollbar { display:none; }
.filters-row2 {
    /* שורה 2: תאריך + ליגה + נקה באותו קו, מיושר וסימטרי */
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 10px;
    overflow: visible;
}

/* שורה 1: chips */
body[data-page="football"] .filters-chip {
    height: 34px;
    font-size: 11px;
    padding: 0 10px;
    flex: 1 0 0;              /* חלוקה שווה */
    min-width: 72px;          /* שלא יידחסו מדי */
    max-width: 120px;
    text-align: center;
    border-radius: 0;
}
body[data-page="football"] .filters-chips {
    width: 100%;
    justify-content: center;
    gap: 10px;
}
body[data-page="football"] .filters-row1 .filters-chips {
    gap: 0;
    border-radius: 0;
}

/* שורה 2: כפתורים באותו גובה ורוחב מלא לתאריך/ליגה */
body[data-page="football"] .filters-row2 .filters-date-btn,
body[data-page="football"] .filters-row2 .league-dd-btn {
    width: 100%;
    height: 34px;
    border-radius: 0;
}
body[data-page="football"] .filters-row2 .filters-league {
    min-width: 0;
}
body[data-page="football"] .filters-row2 .league-dd-btn {
    min-width: 0;
}
body[data-page="football"] .filters-row2 .league-dd-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* נקה: לא יימתח לרוחב מלא בנייד (זה מה שגרם למלבן אדום ענק) */
body[data-page="football"] .filters-row2 .clear-filters-btn-modern {
    width: auto !important;
    min-width: 70px;
    height: 34px;
    padding: 0 12px !important;
    align-self: auto !important;
    border-radius: 0;
}

/* רקע יפה לשורה 2 כדי שתיראה "בר" אחיד */
body[data-page="football"] .filters-row2 {
    padding: 2px 0;
}

/* טיפוגרפיה אחידה לסינון בכדורגל (768px) */
body[data-page="football"] .upcoming-filters-modern {
    --filters-h: 34px;
    --filters-fs: 12px;
    --filters-icon: 13px;
}

/* =========================================================
   football.php (768px) - איחוד גדלים/עמודות לכל הטאבים
   (Live/Upcoming/Finished) כדי שהכותרות/עמודות יהיו אחידים
   ========================================================= */
body[data-page="football"] {
    --bets-th-fs: 11px;
    --bets-td-fs: 11px;
    --bets-date-header-fs: 14px;
    --bets-date-sub-fs: 9px;
    --bets-status-fs: 10px;

    --col-star-w: 40px;
    --col-time-w: 40px;
    --col-date-w: 64px;
    --col-odds-w: 40px;
    --col-actions-w: 50px;
    --col-status-w: 70px;
}

body[data-page="football"] #live-matches-container .bets-table th,
body[data-page="football"] #upcoming-matches-container .bets-table th,
body[data-page="football"] #finished-matches-container .bets-table th {
    font-size: var(--bets-th-fs) !important;
}

body[data-page="football"] #live-matches-container .bets-table td,
body[data-page="football"] #upcoming-matches-container .bets-table td,
body[data-page="football"] #finished-matches-container .bets-table td {
    font-size: var(--bets-td-fs) !important;
}

body[data-page="football"] .date-header-title {
    font-size: var(--bets-date-header-fs) !important;
}

body[data-page="football"] #upcoming-matches-container .match-date-upcoming .date-part,
body[data-page="football"] #upcoming-matches-container .match-date-upcoming .time-part,
body[data-page="football"] #finished-matches-container .match-date-finished .date-part,
body[data-page="football"] #finished-matches-container .match-date-finished .time-part {
    font-size: var(--bets-date-sub-fs) !important;
    line-height: 1.1 !important;
}

body[data-page="football"] #finished-matches-container .bets-table th:nth-child(4),
body[data-page="football"] #finished-matches-container .bets-table td.status-cell {
    width: var(--col-status-w) !important;
    min-width: var(--col-status-w) !important;
    max-width: var(--col-status-w) !important;
    font-size: var(--bets-status-fs) !important;
}

body[data-page="football"] #finished-matches-container .match-status-finished {
    font-size: var(--bets-status-fs) !important;
    line-height: 1.2 !important;
    white-space: pre-line !important; /* מאפשר \n לשבור שורה */
    word-break: break-word !important;
}
/* (בוטל) פריסה ישנה של שורה2 כגלילה אופקית – עברנו ל-grid סימטרי */
.quick-date-buttons {
    gap: 8px;
    width: 100%;
}
.quick-date-btn {
    padding: 8px 12px;
    font-size: 11px;
    border-radius: 999px;
    flex: 1;
    min-width: 0;
}
.quick-date-icon {
    font-size: 9px;
}
.date-picker-wrapper,
.league-select-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: auto;
}
.upcoming-date-input-modern,
.upcoming-league-select-modern {
    padding: 8px 10px;
    font-size: 11px;
}
/* כלל ישן (ל-UI הישן של הסינון) – לא להחיל בתוך football.php כדי שלא ידרוס את bar החדש */
body:not([data-page="football"]) .clear-filters-btn-modern {
    width: 100%;
    min-width: auto;
    padding: 8px 10px;
    font-size: 11px;
    align-self: stretch;
}
.favorite-btn {
    padding: 4px;
}
.favorite-btn svg {
    width: 14px;
    height: 14px;
}

/* אירועים - עיצוב חדש - 768px - קטן יותר */
.match-detail-container .event-card {
    padding: 0 !important;
    margin-bottom: 5px !important;
    border-radius: 6px !important;
}

.match-detail-container .event-info {
    padding: 5px 8px !important;
    gap: 4px !important;
}

.match-detail-container .event-header {
    gap: 4px !important;
}

.match-detail-container .event-icon-badge {
    width: 18px !important;
    height: 18px !important;
    padding: 2.5px !important;
    border-radius: 4px !important;
}

.match-detail-container .event-icon {
    font-size: 9px !important;
}

.match-detail-container .event-type-name {
    font-size: 8px !important;
    line-height: 1.2 !important;
}

.match-detail-container .event-details {
    gap: 2.5px !important;
}

.match-detail-container .event-player-name,
.match-detail-container .event-assist-name {
    gap: 3.5px !important;
    font-size: 7px !important;
    line-height: 1.2 !important;
}

.match-detail-container .event-player-icon,
.match-detail-container .event-assist-icon {
    font-size: 8px !important;
    width: 11px !important;
    height: 11px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.match-detail-container .event-player-text,
.match-detail-container .event-assist-text {
    font-size: 7px !important;
    line-height: 1.2 !important;
}

.match-detail-container .event-detail-text {
    font-size: 6px !important;
    line-height: 1.2 !important;
}

.match-detail-container .event-divider {
    width: 1px !important;
}

.match-detail-container .event-time {
    min-width: 45px !important;
    max-width: 45px !important;
    width: 45px !important;
    padding: 5px 3px !important;
}

.match-detail-container .event-time .event-minute {
    font-size: 9px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

/* כותרות קבוצות - 768px */
.match-events-timeline {
    gap: 3px !important;
    padding: 3px 0 !important;
}

.events-column-header {
    padding: 3px 6px !important;
    margin-bottom: 2px !important;
    gap: 5px !important;
}

.team-logo-small {
    width: 15px !important;
    height: 15px !important;
}

.team-name-small {
    font-size: 7px !important;
    line-height: 1.2 !important;
}

.events-list {
    gap: 2.5px !important;
}

.event-item {
    padding: 3px 4px !important;
    gap: 2.5px !important;
    overflow: visible !important;
}

/* אייקונים על הציר - 768px */
.match-detail-container .timeline-event-icon {
    width: 18px !important;
    height: 18px !important;
}

.match-detail-container .timeline-event-icon-inner {
    width: 16px !important;
    height: 16px !important;
    padding: 2px !important;
}

.match-detail-container .timeline-event-icon .timeline-event-icon-symbol {
    font-size: 8px !important;
}

.match-detail-container .timeline-marker-label {
    font-size: 7px !important;
    padding: 1px 2px !important;
}

.match-detail-container .timeline-vs-badge-header {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 0 !important;
    font-size: 9px !important;
    border: 1.5px solid rgba(255, 215, 0, 0.5) !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
}

/* סגנונות ישנים - שמירה לתאימות */
.event-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    overflow: visible !important;
}

.event-player {
    font-size: 9px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--text-white) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin-top: 1px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

.event-assist,
.event-detail {
    font-size: 8px !important;
    display: block !important;
    visibility: visible !important;
    white-space: normal !important;
}

/* סטטיסטיקות - 768px */
.match-stats-container {
    border-radius: 7px;
}

.stats-table-header {
    padding: 4px 6px !important;
    gap: 3px !important;
    margin-bottom: 2px !important;
}

.stats-team-logo {
    width: 15px !important;
    height: 15px !important;
}

.stats-team-name {
    font-size: 8px !important;
    line-height: 1.2 !important;
}

.stats-header-label {
    font-size: 7px !important;
}

.stats-table-row {
    padding: 3px 4px !important;
    gap: 2px !important;
}

.stats-label {
    font-size: 7px !important;
    line-height: 1.2 !important;
}

.stats-value {
    font-size: 8px !important;
    padding: 2px 3px !important;
    min-width: 28px !important;
}

/* הרכבים - 768px */
.match-lineups-timeline {
    gap: 3px !important;
    padding: 3px 0 !important;
}

.lineups-column {
    gap: 3px !important;
}

.lineups-column-header {
    padding: 3px 6px !important;
    margin-bottom: 2px !important;
    gap: 5px !important;
}

.lineup-coach-info {
    padding: 0 2px !important;
    gap: 2px !important;
    margin-bottom: 3px !important;
}

.lineup-pill {
    font-size: 7px !important;
    padding: 2px 3px !important;
}

.lineup-section {
    padding: 4px !important;
    margin-bottom: 3px !important;
}

.lineup-section-title {
    font-size: 8px !important;
    margin-bottom: 2px !important;
    padding-bottom: 1px !important;
    line-height: 1.2 !important;
}

.lineup-players-list {
    padding-right: 3px !important;
}

.lineup-player-item {
    padding: 2px 3px !important;
    margin: 1px 0 !important;
    font-size: 8px !important;
    line-height: 1.2 !important;
}

.lineup-player-meta {
    font-size: 6px !important;
    line-height: 1.2 !important;
}

.lineup-player-name {
    font-size: 8px !important;
    line-height: 1.2 !important;
}