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

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --success: #28a745;
    --success-light: #20c997;
    --danger: #dc3545;
    --warning: #e9b949;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #333;
    --gray: #666;
    --light-gray: #f0f0f0;
    --white: #fff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    padding: 20px;
    font-size: 14px; /* Ukuran font dasar lebih kecil */
}

.container {
    max-width: 1400px; /* Lebih lebar untuk menampung lebih banyak kolom */
    margin: 0 auto;
}

/* HEADER STYLES */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
}

.header h1 {
    color: var(--dark);
    font-size: 2rem; /* Lebih kecil */
    margin-bottom: 8px;
}

.header p {
    color: var(--gray);
    font-size: 1rem; /* Lebih kecil */
    margin-bottom: 15px;
}

.header-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-register {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem; /* Lebih kecil */
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

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

.stat-card {
    background: var(--light);
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 120px; /* Lebih kecil */
}

.stat-number {
    font-size: 1.5rem; /* Lebih kecil */
    font-weight: bold;
    color: var(--primary);
    display: block;
}

.stat-label {
    color: var(--gray);
    font-size: 0.8rem; /* Lebih kecil */
}

/* FILTER SECTION */
.filter-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    margin-bottom: 4px;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.85rem; /* Lebih kecil */
}

.filter-select, .filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.85rem; /* Lebih kecil */
    background: var(--white);
}

.filter-button {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.85rem; /* Lebih kecil */
}

.filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* QUIZ GRID - DIUBAH MENJADI 4 KOLOM */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Lebih kecil dan lebih banyak kolom */
    gap: 20px; /* Gap lebih kecil */
    margin-bottom: 25px;
}

.quiz-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px; /* Padding lebih kecil */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.quiz-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.quiz-title {
    flex: 1;
}

.quiz-title h3 {
    color: var(--dark);
    font-size: 1.1rem; /* Lebih kecil */
    margin-bottom: 4px;
    line-height: 1.3;
}

.quiz-id {
    color: var(--gray);
    font-size: 0.75rem; /* Lebih kecil */
    font-family: monospace;
    background: #f1f3f4;
    padding: 2px 5px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 6px;
}

.teacher-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.7rem; /* Lebih kecil */
    font-weight: 500;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.7rem; /* Lebih kecil */
    font-weight: bold;
    margin-left: 8px;
    white-space: nowrap;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.quiz-info {
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--light-gray);
    font-size: 0.8rem; /* Lebih kecil */
}

.info-label {
    color: var(--gray);
    font-weight: 500;
}

.info-value {
    color: var(--dark);
    font-weight: 600;
}

.security-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.security-badge {
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.65rem; /* Lebih kecil */
    font-weight: bold;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.security-badge.camera {
    background: var(--warning);
    color: var(--white);
}

.security-badge.fullscreen {
    background: var(--danger);
    color: var(--white);
}

.quiz-actions {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.85rem; /* Lebih kecil */
}

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

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

/* NO QUIZZES */
.no-quizzes {
    text-align: center;
    padding: 50px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.no-quizzes h3 {
    color: var(--gray);
    font-size: 1.3rem; /* Lebih kecil */
    margin-bottom: 12px;
}

.no-quizzes p {
    color: #888;
    font-size: 1rem; /* Lebih kecil */
}

/* FOOTER */
.footer {
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem; /* Lebih kecil */
}

/* QUIZ DESCRIPTION */
.quiz-description {
    color: var(--gray);
    font-size: 0.8rem; /* Lebih kecil */
    line-height: 1.4;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

/* TYPE BADGES */
.type-badge {
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.65rem; /* Lebih kecil */
    font-weight: bold;
    margin-left: 6px;
    display: inline-block;
}

.type-pg {
    background: #e3f2fd;
    color: #1976d2;
}

.type-essay {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* FILTER TYPE BUTTONS */
.filter-type {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.type-filter-btn {
    padding: 6px 12px;
    border: 2px solid #ddd;
    border-radius: 15px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.8rem; /* Lebih kecil */
}

.type-filter-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.type-filter-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.quiz-type-icon {
    margin-right: 4px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
    .quiz-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* 4 kolom di desktop besar */
    }
}

@media (max-width: 992px) {
    .quiz-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* 3-4 kolom di tablet landscape */
    }
    
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .quiz-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* 2-3 kolom di tablet */
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .quiz-card {
        padding: 15px;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-card {
        width: 100%;
        max-width: 180px;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-register {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .quiz-grid {
        grid-template-columns: 1fr; /* 1 kolom di mobile */
    }
    
    body {
        padding: 10px;
        font-size: 13px; /* Lebih kecil di mobile */
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-title h3 {
        font-size: 1rem;
    }
    
    .quiz-card {
        padding: 12px;
    }
    
    .filter-type {
        flex-direction: column;
        align-items: stretch;
    }
    
    .type-filter-btn {
        text-align: center;
    }
}