:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
}

.login-container {
    max-width: 450px;
    margin: 100px auto;
}

.login-card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 10px;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px 10px 0 0;
    text-align: center;
}

.login-header i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.stat-card {
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.badge-status {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-action {
    padding: 5px 15px;
    font-size: 0.9rem;
}

.score-input {
    max-width: 100px;
}

.navbar-brand i {
    margin-right: 8px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.alert {
    border-radius: 8px;
}

footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

.theme-badge {
    font-size: 0.9rem;
    padding: 8px 15px;
}

.rank-badge {
    font-size: 1.1rem;
    padding: 10px 15px;
    min-width: 50px;
}

.evaluation-form {
    max-width: 800px;
    margin: 0 auto;
}

.evaluation-form {
    max-width: 800px;
    margin: 0 auto;
}

/* Results Page Styling */
.table-warning {
    background-color: #ffd700 !important; /* Gold */
}

.table-warning td {
    font-weight: 500;
}

.table-secondary {
    background-color: #c0c0c0 !important; /* Silver */
}

.table-secondary td {
    font-weight: 500;
}

.table-danger {
    background-color: #cd7f32 !important; /* Bronze */
    color: white !important;
}

.table-danger td {
    font-weight: 500;
}

.table-danger .badge {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #cd7f32 !important;
}

.table-info {
    background-color: #d1ecf1 !important; /* Light blue for 4-10 */
}

.table-info td {
    font-weight: 400;
}

/* Clickable Judge Badge */
.badge.bg-dark[onclick] {
    transition: all 0.2s ease;
}

.badge.bg-dark[onclick]:hover {
    background-color: #0d6efd !important;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge.bg-dark[onclick]:active {
    transform: scale(0.98);
}

/* Score Input Validation Feedback */
.score-input.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.score-input.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 15px;
    }
    
    .login-container {
        margin: 50px auto;
        padding: 0 15px;
    }
    
    /* Judge Panel Mobile Optimizations */
    .navbar-brand {
        font-size: 1rem;
    }
    
    .dropdown-menu {
        font-size: 1rem;
    }
    
    .dropdown-item {
        padding: 12px 20px;
    }
    
    .card {
        border-radius: 8px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Larger touch targets for mobile */
    .btn {
        min-height: 44px;
        font-size: 1rem;
    }
    
    .btn-sm {
        min-height: 38px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        min-height: 50px;
        font-size: 1.1rem;
    }
    
    /* Better spacing for mobile */
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    /* Optimize form inputs for mobile */
    .form-control {
        font-size: 1rem;
        padding: 12px;
    }
    
    .form-control-lg {
        font-size: 1.5rem;
        padding: 15px;
    }
    
    /* Better badge visibility */
    .badge {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    /* Optimize progress bar */
    .progress {
        height: 20px;
    }
    
    /* Better card spacing */
    .card + .card {
        margin-top: 0.75rem;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    h5, h6 {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    /* Stack logos vertically on very small screens */
    .d-flex.gap-3 {
        gap: 0.5rem !important;
    }
}
