/* ========================================
   MOBİL ULTRA KOMPAKT TASARIM
   ======================================== */

/* HEADER - Mobil düzeltmeler */
@media (max-width: 768px) {
    .header {
        padding: 8px 12px;
    }
    
    .header-main {
        padding: 0;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .header-content {
        margin-bottom: 4px;
    }
    
    .logo-link {
        flex-shrink: 0;
    }
    
    .logo-text {
        font-size: 13px;
    }
    
    .logo-img {
        height: 26px;
    }
    
    .header-actions {
        gap: 6px;
    }
    
    /* ARAMA KUTUSU - Mobil düzeltmeleri */
    .search-box {
        flex: 1;
        min-width: 80px;
        max-width: 200px;
        position: relative;
    }
    
    .search-box input {
        width: 100%;
        padding: 6px 8px 6px 30px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .search-icon {
        left: 8px;
        width: 14px;
        height: 14px;
    }
    
    .search-results {
        position: fixed !important;
        top: 52px !important;
        left: 8px !important;
        right: 8px !important;
        bottom: auto !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        max-height: 50vh !important;
        z-index: 999999 !important;
        background: #161b22 !important;
        border: 1px solid #30363d !important;
        border-radius: 8px !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.8) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .search-results.show {
        display: block !important;
    }
    
    .search-result-item {
        padding: 10px;
        gap: 8px;
    }
    
    .search-result-item img {
        width: 20px;
        height: 20px;
    }
    
    .search-result-item span {
        font-size: 12px;
    }
    
    .search-section-title {
        padding: 6px 10px;
        font-size: 9px;
    }
    
    /* Header sag kisim */
    .header-right {
        gap: 4px;
        flex-shrink: 0;
    }
    
    .status-info {
        display: none;
    }
    
    .header-icon {
        width: 30px;
        height: 30px;
    }
    
    .header-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .live-indicator {
        padding: 3px 7px;
        gap: 5px;
        border-radius: 12px;
    }
    
    .live-text {
        font-size: 10px;
    }
    
    .live-dot {
        width: 5px;
        height: 5px;
    }
    
    .icon-btn {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }
    
    .icon-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .last-update {
        font-size: 10px;
    }
    
    /* LIGLER NAVIGASYONU - Mobil */
    .leagues-nav {
        padding: 6px 10px;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .leagues-nav::-webkit-scrollbar {
        display: none;
    }
    
    .league-nav-link {
        padding: 5px 10px;
        font-size: 10px;
        border-radius: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* GÜNLÜK BANNER - Çok kompakt horizontal scroll */
@media (max-width: 768px) {
    .daily-links-banner {
        padding: 6px 12px;
    }
    
    .daily-links-content {
        gap: 6px;
    }
    
    .daily-links-icon {
        font-size: 13px;
        display: none; /* Yer kazanmak için gizle */
    }
    
    .daily-links-text {
        font-size: 9px;
        white-space: nowrap;
    }
    
    .daily-links-buttons {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        flex: 1;
    }
    
    .daily-links-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .daily-link-btn {
        min-width: 42px;
        padding: 4px 6px;
        border-radius: 6px;
        flex-shrink: 0;
    }
    
    .daily-link-label {
        font-size: 7px;
        letter-spacing: 0;
    }
    
    .daily-link-date {
        font-size: 11px;
        font-weight: 700;
    }
}

/* NAVİGASYON - Tek satır, horizontal scroll */
@media (max-width: 768px) {
    .nav-section {
        flex-direction: row !important;
        padding: 6px 12px;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }
    
    .nav-section::-webkit-scrollbar {
        display: none;
    }
    
    .date-nav,
    .status-nav {
        display: flex;
        gap: 5px;
        flex-wrap: nowrap;
        min-width: auto;
        flex: 0 0 auto;
    }
    
    .date-btn,
    .status-btn {
        flex-shrink: 0;
        padding: 5px 10px;
        font-size: 10px;
        white-space: nowrap;
        border-radius: 8px;
    }
    
    .date-btn.special {
        padding: 5px 9px;
    }
    
    .ozet-icon {
        font-size: 11px;
        margin-right: 2px;
    }
}

/* LİG SEKSİYONU - Collapsible (Kapalı başlar) */
@media (max-width: 768px) {
    .league-section {
        padding: 0;
        border-bottom: none;
    }
    
    /* League Toggle Button */
    .league-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: var(--bg-secondary);
        border: none;
        border-bottom: 1px solid var(--border);
        padding: 10px 12px;
        color: var(--text-primary);
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .league-toggle:active {
        background: var(--bg-card);
    }
    
    .league-toggle-text {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .league-toggle-icon {
        font-size: 10px;
        transition: transform 0.3s;
    }
    
    .league-toggle.active .league-toggle-icon {
        transform: rotate(180deg);
    }
    
    /* League Content - Başlangıçta Gizli */
    .league-grid {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        padding: 0 12px;
        background: var(--bg-secondary);
    }
    
    .league-grid.show {
        max-height: 1000px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--border);
    }
    
    /* League buttons daha kompakt */
    .league-quick-access {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    .league-quick-btn {
        padding: 7px 6px;
        font-size: 10px;
        border-radius: 6px;
        gap: 5px;
    }
    
    .league-flag {
        font-size: 12px;
    }
    
    .league-search-input {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 8px;
    }
}

/* Çok küçük ekranlar için ekstra optimizasyon */
@media (max-width: 480px) {
    .header {
        padding: 6px 8px;
    }
    
    .header-main {
        gap: 6px;
    }
    
    .logo-text {
        font-size: 11px;
    }
    
    .logo-img {
        height: 24px;
    }
    
    /* Arama kutusu - cok kucuk ekran */
    .search-box {
        max-width: 140px;
        min-width: 60px;
    }
    
    .search-box input {
        padding: 5px 6px 5px 26px;
        font-size: 11px;
    }
    
    .search-box input::placeholder {
        font-size: 10px;
    }
    
    .search-icon {
        left: 6px;
        width: 12px;
        height: 12px;
    }
    
    .search-results {
        top: 44px;
        left: 6px;
        right: 6px;
        transform: none;
        width: auto;
        max-width: none;
    }
    
    /* Header sag */
    .header-right {
        gap: 3px;
    }
    
    .header-icon {
        width: 28px;
        height: 28px;
    }
    
    .header-icon svg {
        width: 12px;
        height: 12px;
    }
    
    /* Ligler nav - cok kucuk ekran */
    .leagues-nav {
        padding: 5px 8px;
        gap: 3px;
    }
    
    .league-nav-link {
        padding: 4px 8px;
        font-size: 9px;
        border-radius: 12px;
    }
    
    .daily-links-banner {
        padding: 5px 10px;
    }
    
    .daily-link-btn {
        min-width: 38px;
        padding: 3px 5px;
    }
    
    .daily-link-label {
        font-size: 6px;
    }
    
    .daily-link-date {
        font-size: 10px;
    }
    
    .nav-section {
        padding: 5px 10px;
        gap: 5px;
    }
    
    .date-btn,
    .status-btn {
        padding: 4px 8px;
        font-size: 9px;
    }
    
    .date-btn.special {
        padding: 4px 7px;
    }
    
    .ozet-icon {
        font-size: 10px;
    }
    
    .league-toggle {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .league-quick-btn {
        padding: 6px 5px;
        font-size: 9px;
    }
}

/* PC'de normal görünsün */
@media (min-width: 769px) {
    .league-toggle {
        display: none;
    }
    
    .league-grid {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* ========================================
   PRO NAV - MOBİL OPTİMİZASYON
   ======================================== */
@media (max-width: 768px) {
    .pro-nav {
        position: relative;
        z-index: 100;
    }
    
    .pro-leagues {
        padding: 10px 12px;
        gap: 8px;
        justify-content: center;
        -webkit-overflow-scrolling: touch;
    }
    
    .pro-league-item {
        padding: 8px 12px;
        font-size: 10px;
        gap: 6px;
        border-radius: 8px;
        flex-shrink: 0;
    }
    
    .pro-league-item span {
        display: none;
    }
    
    .pro-league-logo {
        width: 24px;
        height: 24px;
    }
    
    .pro-controls {
        padding: 10px 12px;
        gap: 10px;
        flex-direction: column;
    }
    
    .pro-dates {
        width: 100%;
        justify-content: center;
        gap: 6px;
        order: 1;
        -webkit-overflow-scrolling: touch;
    }
    
    .pro-dates .date-btn {
        padding: 8px 12px;
        min-width: 52px;
        border-radius: 8px;
        flex: 1;
        max-width: 70px;
    }
    
    .pro-dates .date-btn .day-name {
        font-size: 9px;
    }
    
    .pro-dates .date-btn .day-num {
        font-size: 15px;
    }
    
    .pro-filters {
        width: 100%;
        justify-content: center;
        order: 2;
        gap: 6px;
    }
    
    .pro-filter-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
        font-size: 11px;
        border-radius: 8px;
        max-width: 100px;
    }
    
    .live-dot {
        width: 6px;
        height: 6px;
    }
    
    /* Arama kutusu z-index fix */
    .search-results {
        z-index: 100000 !important;
    }
}

@media (max-width: 480px) {
    .pro-leagues {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .pro-league-item {
        padding: 6px 10px;
    }
    
    .pro-league-logo {
        width: 22px;
        height: 22px;
    }
    
    .pro-controls {
        padding: 8px 10px;
    }
    
    .pro-dates .date-btn {
        padding: 6px 10px;
        min-width: 46px;
        max-width: 60px;
    }
    
    .pro-dates .date-btn .day-name {
        font-size: 8px;
    }
    
    .pro-dates .date-btn .day-num {
        font-size: 13px;
    }
    
    .pro-filter-btn {
        padding: 6px 8px;
        font-size: 10px;
    }
}

/* ========================================
   POPUP - MOBİL TAM EKRAN TASARIM
   ======================================== */
@media (max-width: 768px) {
    .match-popup-overlay {
        padding: 0;
        align-items: stretch;
    }
    
    .match-popup {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        border: none;
        display: flex;
        flex-direction: column;
    }
    
    .match-popup-header {
        border-radius: 0;
        padding: 12px 16px;
        padding-top: max(12px, env(safe-area-inset-top));
        flex-shrink: 0;
    }
    
    .match-popup-close {
        top: max(10px, env(safe-area-inset-top));
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 18px;
        background: rgba(0, 0, 0, 0.3);
    }
    
    .popup-teams {
        gap: 12px;
        margin-bottom: 8px;
    }
    
    .popup-team {
        gap: 6px;
    }
    
    .popup-team-logo {
        width: 40px;
        height: 40px;
    }
    
    .popup-team-name {
        font-size: 11px;
        max-width: 80px;
    }
    
    .popup-score {
        gap: 6px;
        padding: 0 8px;
    }
    
    .popup-score-num {
        font-size: 26px;
    }
    
    .popup-score-sep {
        font-size: 18px;
    }
    
    .popup-match-status {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .popup-match-info {
        font-size: 10px;
        gap: 8px;
        margin-top: 8px;
    }
    
    .match-popup-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .popup-section {
        padding: 14px 16px;
    }
    
    .popup-section-title {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    /* Events */
    .popup-events-list {
        gap: 8px;
    }
    
    .popup-event {
        padding: 8px 10px;
        font-size: 11px;
        gap: 8px;
    }
    
    .popup-event-minute {
        min-width: 32px;
        font-size: 10px;
    }
    
    .popup-event-icon {
        font-size: 14px;
    }
    
    .popup-event-player {
        font-size: 11px;
    }
    
    .popup-event-detail {
        font-size: 9px;
    }
    
    /* Stats */
    .popup-stats-grid {
        gap: 8px;
    }
    
    .popup-stat-row {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .popup-stat-label {
        font-size: 10px;
    }
    
    .popup-stat-bar {
        height: 4px;
    }
    
    /* Lineups */
    .popup-lineups {
        gap: 12px;
    }
    
    .popup-lineup-team {
        padding: 10px;
    }
    
    .popup-lineup-title {
        font-size: 11px;
        margin-bottom: 8px;
    }
    
    .popup-lineup-player {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .popup-lineup-number {
        min-width: 20px;
        font-size: 10px;
    }
    
    /* Predictions */
    .popup-predictions {
        gap: 8px;
    }
    
    .popup-pred-item {
        padding: 10px;
    }
    
    .popup-pred-label {
        font-size: 10px;
    }
    
    .popup-pred-value {
        font-size: 16px;
    }
    
    /* Loading */
    .popup-loading {
        padding: 40px 20px;
    }
    
    .popup-spinner {
        width: 32px;
        height: 32px;
    }
    
    .popup-loading-text {
        font-size: 12px;
    }
    
    /* No data */
    .popup-no-data {
        padding: 30px 20px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .match-popup-header {
        padding: 10px 12px;
        padding-top: max(10px, env(safe-area-inset-top));
    }
    
    .popup-team-logo {
        width: 36px;
        height: 36px;
    }
    
    .popup-team-name {
        font-size: 10px;
        max-width: 70px;
    }
    
    .popup-score-num {
        font-size: 24px;
    }
    
    .popup-section {
        padding: 12px 14px;
    }
    
    .popup-event {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .popup-stat-row {
        padding: 6px 8px;
        font-size: 10px;
    }
}
