* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8eaf6 0%, #f5f5f5 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin-bottom: 20px;
}

.card h2 {
    color: #1a237e;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1565c0;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(21, 101, 192, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(17, 153, 142, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(235, 51, 73, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(33, 150, 243, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f57c00 0%, #ffb300 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 124, 0, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #1565c0;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23555' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
    color: white;
    font-weight: 600;
}

table tr:hover {
    background: #f5f5f5;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.badge-student {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-staff {
    background: #f3e5f5;
    color: #7b1fa2;
}

.qrcode-container {
    text-align: center;
    padding: 20px;
}

.qrcode-container img {
    max-width: 300px;
    border: 5px solid #1565c0;
    border-radius: 10px;
}

.header {
    background: linear-gradient(135deg, #4393b2 0%, #414447 100%);
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: white;
    text-align: center;
    font-size: 2.2em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.project-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.project-tag {
    background: #e8eaf6;
    color: #3f51b5;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.2);
}

.stat-card h3 {
    font-size: 2em;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 1.1em;
    opacity: 0.9;
}

.result-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #1565c0;
}

.result-item h4 {
    color: #333;
    margin-bottom: 10px;
}

.result-item .time {
    font-size: 1.5em;
    font-weight: bold;
    color: #1565c0;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1565c0;
}

.modal-header h3 {
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #333;
}

.ranking-table tr:first-child {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.ranking-table tr:nth-child(2) {
    background: linear-gradient(135deg, #c0c0c0 0%, #e0e0e0 100%);
}

.ranking-table tr:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a860 100%);
}

.ranking-table tr:first-child td,
.ranking-table tr:nth-child(2) td,
.ranking-table tr:nth-child(3) td {
    font-weight: bold;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .card {
        padding: 20px;
    }

    table {
        font-size: 14px;
    }

    table th,
    table td {
        padding: 10px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
