/* CSS Tournament Stats - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
}

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

/* Navbar */
.navbar-dark {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-link {
    transition: all 0.3s ease;
    border-radius: 5px;
    margin: 0 5px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: bold;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 5px;
}

/* Tables */
.table {
    color: #333;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Buttons */
.btn {
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-group .btn {
    margin: 2px;
}

/* Progress bars */
.progress {
    height: 25px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    font-weight: 600;
    transition: width 0.6s ease;
}

/* Trophy Icons */
.bi-trophy-fill.text-warning {
    filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.5));
}

.bi-trophy-fill.text-secondary {
    filter: drop-shadow(0 2px 4px rgba(108, 117, 125, 0.5));
}

.bi-trophy-fill.text-danger {
    filter: drop-shadow(0 2px 4px rgba(220, 53, 69, 0.5));
}

/* Stats Cards on Home */
.card.bg-success,
.card.bg-info,
.card.bg-warning,
.card.bg-danger {
    overflow: hidden;
    position: relative;
}

.card.bg-success::before,
.card.bg-info::before,
.card.bg-warning::before,
.card.bg-danger::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ffffff !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin: 2px 0;
    }
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Toast notifications */
.toast {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* List group items */
.list-group-item {
    border-radius: 5px;
    margin-bottom: 5px;
    border: 1px solid rgba(0, 0, 0, 0.125);
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: translateX(5px);
}

/* Hero section */
.card.bg-primary.text-white {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 20px;
}

/* Status indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-dot.active {
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.status-dot.completed {
    background-color: #6c757d;
}

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

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

/* Print styles */
@media print {
    .navbar, .btn, footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}
