/* Custom Styles for İddaa Web App */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Navbar arka planı için yeşil stil */
.navbar {
    background: linear-gradient(145deg, #2d5016 0%, #4a7c59 100%) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 3px solid rgba(255, 215, 0, 0.6);
}

.navbar-brand {
    color: white !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: white !important;
    font-weight: 600;
}

.jumbotron {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.table th {
    background-color: #343a40;
    color: white;
    border: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.5rem 0.3rem;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    border-color: #dee2e6;
    font-size: 0.8rem;
    padding: 0.4rem 0.3rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.pagination .page-link {
    color: #007bff;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.loading {
    text-align: center;
    padding: 2rem;
}

.loading i {
    font-size: 2rem;
    color: #007bff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.alert {
    border: none;
    border-radius: 0.5rem;
}

.badge {
    font-size: 0.75em;
}

/* DataTables custom styles */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .table-responsive {
        font-size: 0.75rem;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
    }
}

/* Portfolio Design Styles */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-background-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.4;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}


.hero-section .container {
    position: relative;
    z-index: 2;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 6px solid rgba(255, 215, 0, 0.8);
    object-fit: cover;
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.3),
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 215, 0, 0.3);
    position: relative;
    animation: glow 2s ease-in-out infinite alternate;
}

.profile-img::before {
    content: '👑';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    z-index: 10;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

@keyframes glow {
    from {
        box-shadow: 
            0 0 0 4px rgba(255, 255, 255, 0.3),
            0 15px 40px rgba(0, 0, 0, 0.4),
            inset 0 0 20px rgba(255, 215, 0, 0.3);
    }
    to {
        box-shadow: 
            0 0 0 6px rgba(255, 255, 255, 0.5),
            0 20px 50px rgba(0, 0, 0, 0.6),
            inset 0 0 30px rgba(255, 215, 0, 0.5);
    }
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-card {
    background: linear-gradient(145deg, #2d5016 0%, #4a7c59 100%);
    border: 3px solid rgba(255, 215, 0, 0.6);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.service-card:hover::before {
    opacity: 1;
    animation: shine 0.6s ease-in-out;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 215, 0, 1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffc107;
}

.service-card h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.service-card p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

.service-card .btn {
    background: linear-gradient(145deg, #ffc107 0%, #ff8c00 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #2d5016;
    font-weight: 600;
    text-shadow: none;
    border-radius: 15px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.service-card .btn:hover {
    background: linear-gradient(145deg, #ff8c00 0%, #ffc107 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
    color: white;
}

.social-links .btn {
    margin-bottom: 0.5rem;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.8);
    background: rgba(45, 80, 22, 0.8);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.social-links .btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.9);
    color: #2d5016;
    border-color: rgba(255, 215, 0, 1);
}

.feature-item {
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    transition: all 0.3s ease;
}

.feature-item:hover i {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .profile-img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .social-links .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .service-icon {
        font-size: 2rem;
    }
}

/* Animation for cards */
.card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status indicators */
.status-ms {
    background-color: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-ft {
    background-color: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Score styling */
.score {
    font-weight: bold;
    font-size: 1.1rem;
    color: #007bff;
}

/* Team name styling */
.team-name {
    font-weight: 500;
    color: #495057;
}

/* League name styling */
.league-name {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

/* İstatistik tablosu için özel stiller */
#istatistikTable {
    font-size: 0.75rem;
    width: 100%;
    min-width: 2200px; /* Tüm kolonlar için minimum genişlik */
    table-layout: auto;
    margin-bottom: 0; /* Alt boşluk kaldır */
}

#istatistikTable th {
    font-size: 0.7rem;
    padding: 0.6rem 0.4rem;
    text-align: center;
    white-space: nowrap;
    min-width: 80px;
}

#istatistikTable td {
    font-size: 0.7rem;
    padding: 0.5rem 0.4rem;
    text-align: center;
    white-space: nowrap;
}

/* Saha sütunu için özel stil */
#istatistikTable td:first-child {
    font-weight: bold;
    color: #007bff;
}

/* Takım sütunu için özel stil */
#istatistikTable td:nth-child(4) {
    font-weight: bold;
    color: #495057;
    text-align: left;
    padding-left: 0.5rem;
}

/* Lig sütunu için özel stil */
#istatistikTable td:nth-child(5) {
    font-size: 0.65rem;
    color: #6c757d;
    text-align: left;
    padding-left: 0.3rem;
}

/* Yüzde değerleri için özel stil */
#istatistikTable td:nth-child(n+6) {
    font-weight: 500;
    color: #28a745;
}

/* Container genişliği */
.container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: auto;
    margin-right: auto;
}

/* İstatistik sayfası için container */
.istatistik-container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

/* Card body padding */
.card-body {
    padding: 1.5rem;
}

/* Table responsive wrapper */
.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* İstatistik sayfası için table-responsive özel - SABİT YÜKSEKLİK */
.istatistik-container .table-responsive {
    height: 600px; /* Sabit yükseklik */
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
}

/* Table sticky header - Scroll sırasında başlık sabit kalır */
.istatistik-container .table-responsive thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #343a40;
}

/* İstatistik sayfası için özel düzenlemeler */
#istatistikTableWrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

/* Navbar yüksekliği */
.navbar {
    min-height: 70px;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    margin-right: 0.75rem;
}

.navbar-nav .nav-link {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
}

/* Card header için */
.card-header {
    padding: 1.25rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.card-header h4 {
    margin: 0;
    font-size: 1.5rem;
}

/* Body minimum height */
body {
    min-height: 100vh;
}

/* Card genişliği */
.istatistik-container .card {
    width: 100%;
    margin-bottom: 2rem;
}

/* Number input spinner'larını gizle (yukarı-aşağı oklar) */
.column-filter::-webkit-outer-spin-button,
.column-filter::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.column-filter[type=number] {
    -moz-appearance: textfield;
}

/* Autocomplete dropdown için z-index ve görünürlük */
#takimFilterResults {
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

#takimFilterResults .list-group-item {
    cursor: pointer;
    border: none;
    border-bottom: 1px solid #f0f0f0;
}

#takimFilterResults .list-group-item:hover {
    background-color: #f8f9fa;
}

#takimFilterResults .list-group-item:last-child {
    border-bottom: none;
}

#sezonFilterDropdown {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
}

#sezonFilterDropdown .dropdown-item {
    cursor: pointer;
}

#sezonFilterDropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

#sezonFilterDropdown .dropdown-item.active {
    background-color: #0d6efd;
    color: white;
}

/* Kolon autocomplete önerileri */
.column-autocomplete-results {
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
    overflow-x: visible;
    font-size: 11px;
    word-wrap: break-word;
    min-width: 150px;
}

.column-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    white-space: nowrap;
}

.column-autocomplete-item i {
    font-size: 12px;
    color: #6c757d;
    flex-shrink: 0;
}

.column-autocomplete-item span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #212529;
}

.column-autocomplete-item:hover {
    background-color: #f8f9fa !important;
}

.column-autocomplete-item:last-child {
    border-bottom: none;
}
.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999 !important;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.ui-autocomplete .ui-menu-item {
    padding: 0;
}

.ui-autocomplete .ui-menu-item-wrapper {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.ui-autocomplete .ui-menu-item-wrapper:hover,
.ui-autocomplete .ui-menu-item-wrapper.ui-state-active {
    background: #f0f0f0;
    border-color: #f0f0f0;
}

.ui-autocomplete .ui-menu-item:last-child .ui-menu-item-wrapper {
    border-bottom: none;
}
