/**
 * Klassenarbeitstool - Stylesheet
 */

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Gelbbraune Farbpalette */
    --primary: #d4a574;
    --primary-dark: #b8864f;
    --primary-light: #e8d5b7;
    --secondary: #8b6f3d;
    --secondary-light: #a68a5f;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #faf5ed;
    --light-bg: #f5e6d3;
    --dark: #6b4e2f;
    --dark-text: #8b6f3d;
    --border: rgba(212, 165, 116, 0.3);
    --border-dark: rgba(139, 111, 61, 0.4);
    --text: #6b4e2f;
    --text-muted: #8b6f3d;
    --card-bg: linear-gradient(135deg, #fffbf5 0%, #faf5ed 100%);
    --header-bg: linear-gradient(135deg, #faf5ed 0%, #f5e6d3 100%);
    --page-bg: linear-gradient(135deg, #faf5ed 0%, #f5e6d3 50%, #f0dcc4 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--page-bg);
    background-attachment: fixed;
    min-height: 100vh;
}

/* === Student Dashboard Background === */
body:has(.student-dashboard),
body.student-dashboard {
    background: linear-gradient(135deg, #faf5ed 0%, #f5e6d3 50%, #f0dcc4 100%);
    background-attachment: fixed;
}

/* === Admin Dashboard Background === */
body:has(.admin-dashboard),
body.admin-dashboard {
    background: var(--page-bg);
    background-attachment: fixed;
}

.student-dashboard .card {
    background: linear-gradient(135deg, #fffbf5 0%, #faf5ed 100%);
    border: 2px solid rgba(212, 165, 116, 0.2);
    box-shadow: 0 4px 15px rgba(139, 111, 61, 0.15);
}

.student-dashboard .card h2 {
    color: #6b4e2f;
    border-bottom: 2px solid rgba(212, 165, 116, 0.3);
    padding-bottom: 10px;
}

.student-dashboard .btn-primary {
    background: linear-gradient(135deg, #d4a574 0%, #b8864f 100%);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(184, 134, 79, 0.3);
}

.student-dashboard .btn-primary:hover {
    background: linear-gradient(135deg, #b8864f 0%, #9d7345 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 79, 0.4);
}

.student-dashboard .exam-item {
    background: linear-gradient(135deg, #fffbf5 0%, #faf5ed 100%);
    border: 2px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 4px 12px rgba(139, 111, 61, 0.1);
}

.student-dashboard .exam-item:hover {
    border-color: #d4a574;
    box-shadow: 0 6px 20px rgba(184, 134, 79, 0.2);
    transform: translateY(-2px);
}

.student-dashboard .main-header {
    background: linear-gradient(135deg, #faf5ed 0%, #f5e6d3 100%);
    border-bottom: 2px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 2px 10px rgba(139, 111, 61, 0.15);
}

.student-dashboard .logo {
    color: #6b4e2f;
    font-weight: 700;
}

.student-dashboard .header-nav a {
    color: #8b6f3d;
    font-weight: 600;
}

.student-dashboard .header-nav a:hover {
    color: #6b4e2f;
}

.student-dashboard .user-name {
    color: #8b6f3d;
    font-weight: 600;
}

.student-dashboard .btn-secondary {
    background: linear-gradient(135deg, #e8d5b7 0%, #d4a574 100%);
    border: none;
    color: #6b4e2f;
    font-weight: 600;
}

.student-dashboard .btn-secondary:hover {
    background: linear-gradient(135deg, #d4a574 0%, #b8864f 100%);
    color: white;
}

/* === Header === */
.main-header {
    background: var(--header-bg);
    border-bottom: 2px solid var(--border-dark);
    box-shadow: 0 4px 15px rgba(139, 111, 61, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: color 0.2s;
}

.logo:hover {
    color: var(--primary-dark);
}

.header-nav {
    display: flex;
    gap: 25px;
}

.header-nav a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    padding: 8px 12px;
    border-radius: 6px;
}

.header-nav a:hover {
    color: var(--dark);
    background: rgba(212, 165, 116, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: var(--dark-text);
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
}

/* === Container === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* === Page Header === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
}

/* === Cards === */
.card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(139, 111, 61, 0.15);
    padding: 30px;
    margin-bottom: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 111, 61, 0.2);
}

.card h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--dark);
    font-weight: 700;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
}

/* === Stats Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(184, 134, 79, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(184, 134, 79, 0.45);
}

.stat-icon {
    font-size: 48px;
    opacity: 0.9;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Forms === */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.form-group label {
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--text-muted);
}

textarea {
    resize: vertical;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(184, 134, 79, 0.3);
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #9d7345 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 79, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: var(--dark);
    border: 2px solid var(--border-dark);
    font-weight: 600;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-dark);
    color: var(--dark-text);
    font-weight: 600;
}

.btn-outline:hover {
    background: rgba(212, 165, 116, 0.2);
    border-color: var(--primary);
    color: var(--dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
    display: block;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* === Tables === */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    font-weight: 700;
    color: var(--dark);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-dark);
}

.data-table td {
    background: rgba(255, 255, 255, 0.5);
}

.data-table tr:hover {
    background: rgba(212, 165, 116, 0.15);
}

.data-table .actions {
    white-space: nowrap;
}

/* === Alerts === */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid;
    background: var(--card-bg);
    border: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(139, 111, 61, 0.1);
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left-color: var(--success);
    border-color: rgba(40, 167, 69, 0.3);
    color: #155724;
}

.alert-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left-color: var(--danger);
    border-color: rgba(220, 53, 69, 0.3);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left-color: var(--info);
    border-color: rgba(23, 162, 184, 0.3);
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left-color: var(--warning);
    border-color: rgba(255, 193, 7, 0.3);
    color: #856404;
}

/* === Login Page === */
.login-page {
    background: linear-gradient(135deg, #d4a574 0%, #b8864f 50%, #8b6f3d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 235, 200, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 220, 180, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: linear-gradient(135deg, #f5e6d3 0%, #f0dcc4 100%);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(139, 111, 61, 0.4), 0 5px 15px rgba(0,0,0,0.2);
    padding: 45px;
    border: 2px solid rgba(212, 165, 116, 0.3);
}

.login-box h1 {
    color: #6b4e2f;
    margin-bottom: 10px;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    color: #8b6f3d;
    margin-bottom: 30px;
    font-size: 15px;
    font-weight: 500;
}

.login-form .form-group label {
    color: #6b4e2f;
    font-weight: 600;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    background: white;
    border: 2px solid #d4a574;
    color: #333;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #b8864f;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.login-form .btn-primary {
    background: linear-gradient(135deg, #d4a574 0%, #b8864f 100%);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(184, 134, 79, 0.4);
}

.login-form .btn-primary:hover {
    background: linear-gradient(135deg, #b8864f 0%, #9d7345 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 79, 0.5);
}

.login-help {
    color: #8b6f3d;
    background: rgba(255, 245, 235, 0.6);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

/* === Question Forms === */
.option-item,
.keyword-item,
.grading-rule {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: var(--light);
    border-radius: 6px;
}

/* === Question Preview === */
.question-preview {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.question-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.question-points {
    color: var(--text-muted);
    font-weight: 600;
}

.question-prompt {
    margin-bottom: 15px;
    font-size: 16px;
}

.options-list {
    list-style: none;
    margin: 15px 0;
}

.options-list li {
    padding: 8px 12px;
    margin-bottom: 5px;
    background: var(--light);
    border-radius: 4px;
}

.correct-option {
    background: #d4edda !important;
    border-left: 3px solid var(--success);
}

.badge-success {
    background: var(--success);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 10px;
}

.badge-error {
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 10px;
}

.badge-info {
    background: var(--info);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 10px;
}

.keywords-list {
    margin: 15px 0;
}

.keyword-tag {
    display: inline-block;
    background: var(--light);
    padding: 6px 12px;
    border-radius: 20px;
    margin: 5px;
    font-size: 13px;
}

.question-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* === Exam Page === */
.exam-page {
    background: var(--light);
}

.exam-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.exam-header {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.exam-header h1 {
    color: var(--dark);
    margin-bottom: 15px;
}

.exam-info p {
    margin-bottom: 5px;
    color: var(--text-muted);
}

/* === Questions Navigation === */
.questions-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    justify-content: center;
}

.question-nav-btn {
    width: 45px;
    height: 45px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    color: var(--text);
}

.question-nav-btn:hover {
    border-color: var(--primary);
    background: var(--light);
    transform: translateY(-2px);
}

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

.question-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    transition: all 0.3s ease;
}

.question-card.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light);
}

.question-number {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-points {
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--dark);
}

.mc-options {
    margin: 20px 0;
}

.mc-option {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.mc-option:hover {
    background: var(--light);
    border-color: var(--primary);
}

.mc-option input[type="checkbox"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.save-status {
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}

.save-status.saving {
    color: var(--info);
}

.save-status.saved {
    color: var(--success);
}

.save-status.warning {
    color: var(--warning);
    font-weight: 600;
}

.save-status.error {
    color: var(--danger);
    font-weight: 600;
}

/* === Large Textarea === */
.large-textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s;
}

.large-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.large-textarea::placeholder {
    color: var(--text-muted);
}

/* === Question Navigation === */
.question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: white;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.question-counter {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.exam-footer {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.exam-description {
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 10px;
    font-style: italic;
}

/* === Success Message === */
.success-message {
    text-align: center;
    background: white;
    border-radius: 12px;
    padding: 60px 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    font-size: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.exam-summary {
    background: var(--light);
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.exam-summary h2 {
    margin-bottom: 15px;
}

/* === Results === */
.filter-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form select {
    padding: 8px 15px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
}

.result-summary {
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    color: white;
}

.result-summary h2 {
    color: white;
}

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

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

.result-value {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 5px;
}

.result-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grade-display {
    display: inline-block;
    min-width: 80px;
}

/* Grade Colors */
.grade-1 { color: #28a745; }
.grade-2 { color: #5cb85c; }
.grade-3 { color: #ffc107; }
.grade-4 { color: #fd7e14; }
.grade-5 { color: #dc3545; }
.grade-6 { color: #c82333; }

/* === Answer Card === */
.answer-card {
    border-left: 4px solid var(--primary);
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.answer-header .badge {
    background: var(--info);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.answer-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--light);
    border-radius: 6px;
}

.answer-section h4 {
    margin-bottom: 15px;
    color: var(--dark);
}

.answer-options {
    list-style: none;
}

.answer-options li {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.answer-options li.correct {
    background: #d4edda;
    border-left: 3px solid var(--success);
}

.answer-options li.wrong {
    background: #f8d7da;
    border-left: 3px solid var(--danger);
}

.answer-options li.missed {
    background: #fff3cd;
    border-left: 3px solid var(--warning);
}

.answer-text {
    padding: 15px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    white-space: pre-wrap;
    font-family: inherit;
}

.solution-keywords {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
}

/* === Grading Section === */
.grading-section {
    margin-top: 20px;
    padding: 20px;
    background: #f0f4ff;
    border-radius: 6px;
}

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

.points-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
}

.points-item.active {
    border: 2px solid var(--primary);
}

.points-label {
    font-weight: 600;
    color: var(--text-muted);
}

.points-value {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

.manual-grading-form {
    margin-top: 15px;
}

.manual-points-input {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}

.manual-points-input input {
    width: 150px;
}

/* === Utility === */
.text-muted {
    color: var(--text-muted);
}

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

/* === Responsive === */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }

    .header-nav {
        width: 100%;
        justify-content: center;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 14px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}

code {
    background: var(--light);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* === Schüler-Dashboard === */
.exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.exam-item {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
    background: white;
}

.student-dashboard .exams-grid .exam-item {
    background: linear-gradient(135deg, #fffbf5 0%, #faf5ed 100%);
    border: 2px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 4px 15px rgba(139, 111, 61, 0.15);
}

.exam-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.student-dashboard .exams-grid .exam-item:hover {
    border-color: #d4a574;
    box-shadow: 0 8px 25px rgba(184, 134, 79, 0.25);
    transform: translateY(-4px);
}

.exam-item.abgegeben {
    border-color: var(--success);
    background: #f0fff4;
}

.exam-item .exam-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.exam-item h3 {
    margin: 0;
    color: var(--dark);
}

.exam-item .exam-info {
    margin: 15px 0;
    font-size: 14px;
}

.exam-item .exam-info p {
    margin: 8px 0;
}

.time-left {
    color: var(--warning);
    font-weight: 600;
}

.exam-actions {
    margin-top: 20px;
}

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

.badge-offen {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #856404;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.badge-begonnen {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.badge-abgegeben {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.badge-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.badge-muted {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 111, 61, 0.3);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: 12px;
    margin: 30px 0;
}

.empty-state h3 {
    color: var(--dark);
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 16px;
}

.points-earned {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: #f0f4ff;
    border-radius: 6px;
    border-left: 4px solid var(--primary);
}

.points-earned .points-label {
    font-weight: 600;
    color: var(--text-muted);
}

.points-earned .points-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

/* === Neue Aufgabentypen === */

/* Match-Aufgabe (Verbindungsaufgabe) */
.match-question {
    margin: 20px 0;
}

.match-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.match-left, .match-right {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.match-left h4, .match-right h4 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 700;
}

.match-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: var(--dark);
    border-radius: 8px;
    cursor: move;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid var(--border-dark);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.match-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 134, 79, 0.3);
}

.match-item:active {
    cursor: grabbing;
}

.match-target {
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
}

.match-drop-zone {
    min-height: 50px;
    margin-top: 10px;
    padding: 10px;
    border: 2px dashed var(--border-dark);
    border-radius: 6px;
    background: rgba(212, 165, 116, 0.1);
    transition: all 0.2s;
}

.matched-item {
    display: inline-block;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 6px;
    font-weight: 600;
}

.drop-hint {
    color: var(--text-muted);
    font-style: italic;
}

/* Grid Color (Karierte Kästchen) */
.grid-color-question {
    margin: 20px 0;
}

.instruction {
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 600;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 5px;
    max-width: 600px;
    margin: 20px 0;
}

.color-cell {
    aspect-ratio: 1;
    border: 2px solid var(--border-dark);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.color-cell:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.color-cell.black {
    background: #000;
    border-color: #000;
}

/* Huffman-Baum */
.huffman-tree-question {
    margin: 20px 0;
}

.tree-visualization {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--border);
    margin-bottom: 20px;
    text-align: center;
}

.tree-node {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 8px;
    margin: 10px;
    font-weight: 600;
    min-width: 80px;
}

.tree-node.root {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    font-size: 18px;
    padding: 15px 25px;
}

.tree-branches {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.tree-sub-branches {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* Lückentext */
.fill-blank-question {
    margin: 20px 0;
}

.blank-text {
    font-size: 18px;
    line-height: 2;
    color: var(--dark);
}

.blank-input {
    display: inline-block;
    min-width: 150px;
    padding: 8px 12px;
    margin: 0 5px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    font-size: 16px;
    background: white;
    color: var(--dark);
    font-weight: 600;
}

.blank-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.3);
}

.blank-select {
    display: inline-block;
    min-width: 150px;
    padding: 8px 12px;
    margin: 0 5px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    font-size: 16px;
    background: white;
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
}

.blank-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.3);
}

/* Binär-Visualisierung */
.binary-visual-question {
    margin: 20px 0;
}

.binary-grid {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.binary-cell-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bit-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-text);
}

.binary-cell {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-dark);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: var(--dark);
}

.binary-cell:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.binary-cell.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-dark);
}

.binary-cell.active::after {
    content: '1';
}

.binary-cell:not(.active)::after {
    content: '0';
    opacity: 0.3;
}

/* Tabellen-Aufgabe */
.table-fill-question {
    margin: 20px 0;
}

.fill-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(139, 111, 61, 0.1);
}

.fill-table th {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: var(--dark);
    padding: 15px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--border-dark);
}

.fill-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

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

.table-input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
}

.table-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.checkbox-group label {
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkbox-group label:hover {
    background: var(--light);
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}
/**
 * CSS für neue interaktive Aufgabentypen
 * Füge diese Styles zu deinem Haupt-CSS hinzu oder verlinke diese Datei
 */

/* Sequence (Reihenfolge sortieren) */
.sequence-question {
    margin: 20px 0;
}

.sequence-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 600px;
}

.sequence-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: move;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.sequence-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sequence-item:active {
    cursor: grabbing;
}

.sequence-number {
    background: rgba(255,255,255,0.3);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    flex-shrink: 0;
}

.sequence-text {
    flex: 1;
    font-size: 1em;
    line-height: 1.4;
}

/* Mark Incorrect (Falsches markieren) */
.mark-incorrect-question {
    margin: 20px 0;
}

.statements-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 700px;
}

.statement-item {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.statement-item:hover {
    border-color: #007bff;
    background: #e7f3ff;
}

.statement-item.marked {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-color: #ee5a6f;
    color: white;
}

.statement-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.statement-text {
    flex: 1;
    font-size: 1em;
    line-height: 1.5;
}

/* Allgemeine Verbesserungen */
.instruction {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 0.95em;
}

/* Grid Color (Kästchen färben) - Enhanced */
.color-grid {
    display: grid;
    gap: 4px;
    margin: 20px 0;
    max-width: fit-content;
}

.color-grid[data-grid-size="12"] {
    grid-template-columns: repeat(12, 40px);
}

.color-grid[data-grid-size="16"] {
    grid-template-columns: repeat(16, 35px);
}

.color-cell {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #333;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.color-cell:hover {
    transform: scale(1.1);
    border-color: #007bff;
}

.color-cell.black {
    background: #000;
}

/* Binary Visual (Binär-Kästchen) - Enhanced */
.binary-visual-question {
    margin: 20px 0;
}

.binary-grid {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.binary-cell-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.bit-label {
    font-weight: bold;
    font-size: 0.9em;
    color: #666;
}

.binary-cell {
    width: 50px;
    height: 50px;
    border: 3px solid #333;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
}

.binary-cell:hover {
    transform: scale(1.05);
    border-color: #007bff;
}

.binary-cell.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.binary-cell.active::after {
    content: "1";
}

.binary-cell:not(.active)::after {
    content: "0";
    color: #ccc;
}

/* Huffman Info Box */
.huffman-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.tree-hint {
    margin-top: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sequence-item {
        padding: 12px 15px;
    }

    .sequence-number {
        width: 30px;
        height: 30px;
        font-size: 1em;
    }

    .binary-cell {
        width: 40px;
        height: 40px;
    }

    .color-grid[data-grid-size="12"] {
        grid-template-columns: repeat(12, 30px);
    }

    .color-grid[data-grid-size="16"] {
        grid-template-columns: repeat(16, 25px);
    }
}

/* iPad und Tablet-spezifische Optimierungen */
@media (min-width: 768px) and (max-width: 1024px) {
    .match-container {
        gap: 20px;
    }

    .match-item, .match-target {
        font-size: 16px;
        padding: 14px 18px;
        min-height: 50px;
    }

    .match-drop-zone {
        min-height: 60px;
        padding: 12px;
    }

    .sequence-item {
        padding: 16px 20px;
        min-height: 60px;
        touch-action: none;
    }

    .sequence-number {
        width: 38px;
        height: 38px;
        font-size: 1.05em;
    }

    .binary-cell {
        width: 55px;
        height: 55px;
        font-size: 1.4em;
    }

    .color-cell {
        min-width: 38px;
        min-height: 38px;
    }

    .statement-item {
        padding: 16px 20px;
        min-height: 60px;
    }

    .question-card {
        padding: 35px;
    }

    .exam-container {
        max-width: 95%;
    }
}

/* Touch-Optimierungen für alle mobile Geräte */
@media (hover: none) and (pointer: coarse) {
    .color-cell, .binary-cell {
        -webkit-tap-highlight-color: rgba(212, 165, 116, 0.3);
        touch-action: manipulation;
        min-width: 44px;
        min-height: 44px;
    }

    .statement-item {
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.2);
        touch-action: manipulation;
        padding: 18px 22px;
    }

    .mc-option {
        -webkit-tap-highlight-color: rgba(212, 165, 116, 0.2);
        touch-action: manipulation;
        padding: 18px;
    }

    input[type="checkbox"], input[type="radio"] {
        min-width: 24px;
        min-height: 24px;
        touch-action: manipulation;
    }

    .btn {
        min-height: 48px;
        touch-action: manipulation;
        padding: 14px 24px;
    }

    .blank-input, .blank-select {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 17px;
    }

    .table-input {
        min-height: 44px;
        padding: 12px;
        font-size: 16px;
    }
}

/* === Manuell bewertete Arbeiten === */
tr.manually-graded {
    background-color: #3b82f6 !important;
}

tr.manually-graded td {
    color: white !important;
    font-weight: 500;
}

tr.manually-graded td:first-child {
    font-weight: 700;
}

tr.manually-graded a {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: white !important;
}

tr.manually-graded a:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

tr.manually-graded strong {
    color: white !important;
}


/* --- INTERACTIVE GRADING WIDGET STYLES --- */

.final-grade-display {
    text-align: center;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px -1px rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
    border: 1px solid #e2e8f0;
}

.final-grade-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.25rem;
}

.final-grade-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.final-grade-info {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
    min-height: 1rem;
}

.interactive-grading-widget {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05), 0 1px 1px -1px rgba(0,0,0,.05);
}

.criterion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.criterion-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

.criterion-weight {
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
}

.grading-controls {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
}

.grading-controls.is-na {
    opacity: 0.6;
}

.grading-controls.is-na .point-buttons,
.grading-controls.is-na .override-input-wrapper {
    pointer-events: none;
}

.point-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 0.375rem;
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 0.375rem;
    max-width: 100%;
}

.point-btn {
    border: none;
    background: transparent;
    color: #475569;
    font-weight: 600;
    /* iPad-optimiert: Kompakter aber noch touch-freundlich (min. 40x40px) */
    padding: 0.625rem 0.5rem;
    min-height: 40px;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    text-align: center;
    /* Verhindert unerwünschte Touch-Effekte */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.point-btn:hover {
    background-color: #e2e8f0;
    transform: scale(1.05);
}

/* Active-State für besseres Touch-Feedback */
.point-btn:active {
    background-color: #cbd5e1;
    transform: scale(0.98);
}

.point-btn.selected {
    background-color: #2196f3;
    color: #fff;
    box-shadow: 0 4px 12px -2px rgba(33, 150, 243, 0.5);
    transform: scale(1.05);
    font-weight: 700;
}

.point-btn.selected:active {
    transform: scale(1.02);
}

.override-input-wrapper {
    width: 55px;
}

.override-input {
    width: 100%;
    padding: 0.5rem 0.375rem;
    border-radius: 0.375rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    -moz-appearance: textfield;
}
.override-input::-webkit-outer-spin-button,
.override-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.na-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

.na-btn:hover {
    border-color: #94a3b8;
}

.na-btn.selected {
    background-color: #ef4444;
    border-color: #dc2626;
    color: #fff;
}

/* iPad & Tablet Optimierungen - Kompakter */
@media (min-width: 768px) and (max-width: 1024px) {
    .final-grade-display {
        padding: 0.875rem 1.25rem;
    }
    .final-grade-value {
        font-size: 1.75rem;
    }
    .interactive-grading-widget {
        padding: 0.625rem 0.875rem;
        margin-bottom: 0.625rem;
    }
    .criterion-header {
        margin-bottom: 0.375rem;
    }
    .point-btn {
        padding: 0.5rem 0.375rem;
        min-height: 38px;
        font-size: 0.875rem;
    }
    .point-buttons {
        gap: 0.25rem;
        padding: 0.375rem;
        grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
    }
    .grading-controls {
        gap: 0.375rem;
    }
}

/* Responsive styles for grading widget */
@media (max-width: 640px) {
    .grading-controls {
        grid-template-columns: 1fr;
    }
    .point-buttons {
        grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
        gap: 0.5rem;
    }
    .point-btn {
        padding: 0.875rem 0.5rem;
        font-size: 1rem;
    }
    .override-input-wrapper {
        width: 100%;
    }
    .na-btn {
        width: 100%;
        justify-content: center;
    }
}

