/* Vlastní rozšíření Bootstrap */
:root {
    --bs-primary-rgb: 102, 126, 234;
    --bs-secondary-rgb: 118, 75, 162;
    --tournament-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    background: var(--tournament-gradient);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tournament-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.btn-gradient {
    background: var(--tournament-gradient);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.match-inputs {
    display: flex;
    flex-direction: row;
    gap: 3px;
    justify-content: center;
    align-items: center;
}

.match-input {
    width: 45px;
    font-size: 14px !important;
    padding: 3px 2px !important;
    height: auto !important;
    min-height: 18px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 3px;
}

.match-input.valid-set {
    border-color: #198754;
    background-color: #f8fff9;
}

.match-input.invalid-set {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.match-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.1rem rgba(102, 126, 234, 0.25);
}

/* Responsive úpravy */
@media (max-width: 768px) {
    .match-input {
        width: 35px;
        font-size: 9px !important;
        padding: 2px 1px !important;
        min-height: 18px;
    }
    
    .match-inputs {
        gap: 2px;
    }
}

@media (max-width: 576px) {
    .match-input {
        width: 30px;
        font-size: 8px !important;
        padding: 1px !important;
        min-height: 18px;
    }
    
    .match-inputs {
        gap: 1px;
    }
}

/* Styling pro lépe rozlišení setů */
.match-input[data-set="1"] {
    border-left: 3px solid #28a745;
}

.match-input[data-set="2"] {
    border-left: 3px solid #17a2b8;
}

/* Hover efekt */
.match-inputs:hover .match-input {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.match-table {
    font-size: 0.9rem;
}

.match-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.8rem;
    vertical-align: middle;
}

.match-table .player-name {
    background: #e9ecef;
    font-weight: 600;
    text-align: left;
    font-size: 0.85rem;
}

.match-table .diagonal-cell {
    background: #dee2e6;
    font-weight: bold;
    color: #6c757d;
}

.rankings-table {
    font-size: 0.95rem;
}

.winner-row {
    background: linear-gradient(45deg, #fff3cd, #ffeaa7);
    font-weight: 600;
}

.modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.info-card {
    background: linear-gradient(45deg, #e3f2fd, #bbdefb);
    border-left: 4px solid #2196f3;
}

.rules-card {
    background: linear-gradient(45deg, #fff3e0, #ffcc02);
    border-left: 4px solid #ff9800;
}

.tournament-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stats-badge {
    font-size: 0.9rem;
    font-weight: 600;
}

.medal-icon {
    font-size: 1.2rem;
}

/* Responsive úpravy */
@media (max-width: 768px) {
    .match-table {
        font-size: 0.75rem;
    }
    
    .match-input {
        width: 50px;
        font-size: 0.8rem;
        padding: 0.25rem;
    }
    
    .match-table th,
    .match-table td {
        padding: 0.25rem;
    }
    
    .tournament-header {
        padding: 1rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .match-table {
        font-size: 0.7rem;
    }
    
    .match-input {
        width: 40px;
        font-size: 0.75rem;
    }
    
    .rankings-table {
        font-size: 0.8rem;
    }
}

/* Animace pro loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hover efekty */
.tournament-item:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.btn-outline-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--tournament-gradient) border-box;
    color: #667eea;
    font-weight: 600;
}

.btn-outline-gradient:hover {
    background: var(--tournament-gradient);
    color: white;
}

/* Vlastní scrollbar */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--tournament-gradient);
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* V assets/css/style.css */
.readonly-input {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
    border-color: #dee2e6 !important;
}

.readonly-input:focus {
    box-shadow: none !important;
    border-color: #dee2e6 !important;
}

.tournament-locked {
    position: relative;
}

.tournament-locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.8);
    z-index: 1;
    pointer-events: none;
}