/* Genel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header Stilleri */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.nav-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-btn.danger {
    background: #e74c3c;
}

.nav-btn.danger:hover {
    background: #c0392b;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* Ana İçerik */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Skor Paneli */
.scoreboard {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.scoreboard h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

/* Oyuncu Seçimi */
.player-selection {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.player-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-input label {
    font-weight: 600;
    color: #555;
    text-align: center;
}

.player-select {
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    min-width: 200px;
    background: white;
    transition: border-color 0.3s ease;
}

.player-select:focus {
    outline: none;
    border-color: #667eea;
}

.vs {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin: 0 1rem;
}

/* Skor Kartları */
.score-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.score-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.score-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.score-display {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.score-buttons {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.score-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 1.1rem;
}

.score-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.score-btn.active {
    background: #f39c12;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

/* Maç Kontrolleri */
.match-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.control-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.control-btn.reset {
    background: #e74c3c;
    color: white;
}

.control-btn.reset:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.control-btn.save {
    background: #27ae60;
    color: white;
}

.control-btn.save:hover {
    background: #229954;
    transform: translateY(-2px);
}

/* Maç Geçmişi */
.match-history {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.match-history h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
    border-left: 4px solid #667eea;
}

.history-item:hover {
    transform: translateX(5px);
}

.history-info {
    flex: 1;
}

.history-players {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.history-score {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: bold;
}

.history-date {
    color: #666;
    font-size: 0.9rem;
}

.history-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Kazanan Kişi Adı */
.winner-name {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.1rem;
    background: rgba(39, 174, 96, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid #27ae60;
}

/* Silme Butonları */
.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.delete-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* İstatistikler */
.statistics {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.statistics h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.stat-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
}

.stat-text {
    font-size: 1.5rem;
    font-weight: 600;
}

.player-stats, .head-to-head {
    margin-bottom: 3rem;
}

.player-stats h3, .head-to-head h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.player-stats-list, .head-to-head-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-stat-item, .head-to-head-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
}

.player-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.player-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: #667eea;
}

.player-record {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.player-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.head-to-head-players {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.head-to-head-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.h2h-stat {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.h2h-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.h2h-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

/* Modal Stilleri */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-body strong {
    color: #e74c3c;
}

.modal-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions, .modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-actions {
        justify-content: center;
    }
    
    main {
        padding: 1rem;
    }
    
    .scoreboard {
        padding: 1.5rem;
    }
    
    .scoreboard h1 {
        font-size: 2rem;
    }
    
    .player-selection {
        flex-direction: column;
        gap: 1rem;
    }
    
    .player-select {
        min-width: 100%;
    }
    
    .score-cards {
        grid-template-columns: 1fr;
    }
    
    .score-buttons {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.25rem;
    }
    
    .score-btn {
        padding: 0.5rem;
        font-size: 1rem;
    }
    
    .match-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .history-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .history-actions {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions, .modal-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary, .btn-danger {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .scoreboard h1 {
        font-size: 1.5rem;
    }
    
    .score-display {
        font-size: 3rem;
    }
    
    .score-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .score-btn {
        padding: 0.75rem;
        font-size: 1.1rem;
    }
    
    .vs {
        font-size: 1.5rem;
    }
    
    .player-stat-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .delete-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .winner-name {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
}
