@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Typography */
h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

p {
    color: #4b5563;
    margin-bottom: 1rem;
}

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

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background-color: #f9fafb;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
}

.auth-body .btn-primary,
.quiz-card .btn-primary {
    width: 100%;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-secondary {
    background-color: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    color: #111827;
}

/* Navbar */
.navbar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    margin-bottom: 2rem;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4f46e5;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: #111827;
}

.nav-link.active {
    color: #4f46e5;
}

/* Auth Pages */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-body .container {
    width: 100%;
    max-width: 380px; /* Slight increase for better breathing room */
}

.auth-body .card {
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.auth-body h1 {
    text-align: center;
    font-size: 1.5rem;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Dashboard Grid */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
}

.quiz-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.quiz-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #4f46e5;
}

.quiz-card h3 {
    color: #111827;
    margin-bottom: 0.75rem;
}

.quiz-card p {
    flex-grow: 1;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Profile Section */
.profile-header {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.profile-info h1 {
    margin-bottom: 0.25rem;
    font-size: 1.8rem;
}

.profile-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-admin {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-siswa {
    background-color: #d1fae5;
    color: #065f46;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.results-table th {
    background-color: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.results-table td {
    padding: 1rem 1.5rem;
    color: #374151;
    font-size: 0.95rem;
    border-bottom: 1px solid #f3f4f6;
}

.results-table tr:last-child td {
    border-bottom: none;
}

/* Quiz Interface */
.question-block {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.question-block:last-child {
    border-bottom: none;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.75rem;
    background: white;
}

.answer-option:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.answer-option input[type="radio"] {
    margin-right: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #4f46e5;
}

/* Results Formatting */
.score-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    margin: 2rem 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

.score-value {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.score-total {
    font-size: 1rem;
    opacity: 0.9;
}

.grade-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.grade-message {
    color: #6b7280;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 2rem;
}
