/**
 * Forebet Tahmin Yönetim Sistemi
 * Custom CSS - Mobil Öncelikli Responsive Tasarım
 */

/* ============================================
   Genel Ayarlar
   ============================================ */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
}

/* ============================================
   Navbar Düzenlemeleri
   ============================================ */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin: 0 0.2rem;
    transition: background-color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* Mobil menü düzenlemeleri */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: rgba(13, 110, 253, 0.95);
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
}

/* ============================================
   Card Tasarımları
   ============================================ */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid var(--light-bg);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Stat Cards */
.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.stat-card.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card.danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-icon {
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* ============================================
   Tablo Düzenlemeleri
   ============================================ */
.table-responsive {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.75rem;
}

.table tbody td {
    vertical-align: middle;
    padding: 0.75rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Mobil tablo düzenlemeleri */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Küçük ekranlarda bazı kolonları gizle */
    .table .d-none-mobile {
        display: none;
    }
}

/* ============================================
   Badge & Status
   ============================================ */
.badge {
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    border-radius: 0.5rem;
}

.status-bekliyor {
    background-color: var(--warning-color);
    color: #000;
}

.status-kazandi {
    background-color: var(--success-color);
    color: #fff;
}

.status-kaybetti {
    background-color: var(--danger-color);
    color: #fff;
}

/* ============================================
   Butonlar
   ============================================ */
.btn {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Touch-friendly butonlar (mobil) */
@media (max-width: 768px) {
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        min-height: 44px; /* Apple HIG önerisi */
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        min-height: 38px;
    }
}

/* ============================================
   Form Düzenlemeleri
   ============================================ */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 2px solid #e0e0e0;
    padding: 0.625rem 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Mobil form düzenlemeleri */
@media (max-width: 768px) {
    .form-control,
    .form-select {
        font-size: 16px; /* iOS zoom'u engelle */
        padding: 0.75rem 1rem;
    }
}

/* ============================================
   Login Sayfası
   ============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    max-width: 400px;
    width: 100%;
    margin: 1rem;
}

.login-card .card-body {
    padding: 2rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 4rem;
    color: var(--primary-color);
}

.login-logo h3 {
    margin-top: 1rem;
    color: var(--dark-text);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

/* ============================================
   Alertler
   ============================================ */
.alert {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert .btn-close {
    padding: 0.75rem;
}

/* ============================================
   DataTables Özelleştirmeleri
   ============================================ */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
}

/* Mobil DataTables */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        float: none !important;
    }
}

/* ============================================
   Yardımcı Sınıflar
   ============================================ */
.match-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.prediction-bar {
    height: 8px;
    border-radius: 4px;
    background-color: #e0e0e0;
    overflow: hidden;
}

.prediction-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    transition: width 0.3s ease;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Dark Mode Support (Opsiyonel) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #f0f0f0;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #f0f0f0;
    }
    
    .card-header {
        background-color: #2d2d2d;
        border-bottom-color: #3d3d3d;
    }
    
    .table {
        color: #f0f0f0;
    }
    
    .table tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .form-control,
    .form-select {
        background-color: #2d2d2d;
        color: #f0f0f0;
        border-color: #3d3d3d;
    }
}

/* ============================================
   Animasyonlar
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* ============================================
   Smooth Scrolling
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .navbar,
    .footer,
    .btn,
    .alert {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

