/* Základní styly */
body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Hlavička */
header h1 {
    margin-bottom: 1rem;
}

/* Card styly */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Formulář */
#nameInput {
    border-radius: 8px;
    border: 2px solid #dee2e6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#nameInput:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Tlačítka */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

.btn:active {
    transform: translateY(0);
}

/* Žebříček */
.list-group-item {
    border: none;
    border-radius: 8px !important;
    margin-bottom: 8px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.list-group-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateX(4px);
}

/* Zvýraznění vlastního jména */
.list-group-item-primary {
    background-color: #cfe2ff !important;
    border-left: 4px solid #0d6efd;
}

/* Animace pro nové položky */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-item {
    animation: slideIn 0.3s ease;
}

/* Medaile a odznaky */
.bi-trophy-fill {
    font-size: 1.5rem;
}

.bi-award-fill {
    font-size: 1.5rem;
}

/* Top 3 zvýraznění */
.list-group-item:nth-child(1) {
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    border-left: 4px solid #ffc107;
}

.list-group-item:nth-child(2) {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    border-left: 4px solid #6c757d;
}

.list-group-item:nth-child(3) {
    background: linear-gradient(135deg, #ffe6e6 0%, #ffffff 100%);
    border-left: 4px solid #dc3545;
}

/* Toast notifikace */
.toast-header.bg-success .btn-close,
.toast-header.bg-danger .btn-close,
.toast-header.bg-info .btn-close {
    filter: brightness(0) invert(1);
}

/* Admin panel */
#adminPanel .card-body {
    background: linear-gradient(135deg, #fff3cd 0%, #ffffff 100%);
}

/* Připojovací status */
#connectionStatus {
    font-size: 0.875rem;
}

#connectionStatus i {
    font-size: 0.5rem;
    vertical-align: middle;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Prázdný žebříček */
#leaderboardEmpty i {
    opacity: 0.3;
}

/* Responzivita */
@media (max-width: 991px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    header h1 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 1rem;
    }

    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus states pro lepší accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Loading state */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Badge styly */
.badge {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Dark mode media query (volitelné) */
@media (prefers-color-scheme: dark) {
    /* Můžete přidat dark mode styly, pokud chcete */
}
