/* student.css - Moderne styling til elev-interfacet */

:root {
    /* Moderne farvepalette */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #64748b;
    --secondary-dark: #475569;
    --secondary-light: #94a3b8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Neutrale farver */
    --light-color: #f8fafc;
    --light-gray: #e2e8f0;
    --gray: #94a3b8;
    --dark-gray: #64748b;
    --dark-color: #1e293b;
    --darker-color: #0f172a;
    
    /* Gradienter */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Skygger */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border */
    --border-width: 1px;
    --border-color: var(--light-gray);
}

/* Basis styling med moderne skrifttype */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    width: 100%;
    padding-right: var(--spacing-md);
    padding-left: var(--spacing-md);
    margin-right: auto;
    margin-left: auto;
}

/* Studenter body med moderne gradient */
.student-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    background-attachment: fixed;
}

.student-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Moderne header med tekstskygge */
.student-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: white;
}

.student-header h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.025em;
}

.student-header .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.test-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.test-header h1 {
    color: white;
    margin-bottom: var(--spacing-sm);
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.result-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: white;
}

.result-header h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.result-header .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Moderne kort med glassmorphism effekt */
.student-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    padding: var(--spacing-xxl);
    animation: slideUp 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    padding: var(--spacing-xxl);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    animation: slideUp 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-top: 6px solid var(--success-color);
}

.result-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-top: 6px solid var(--warning-color);
}

.result-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-top: 6px solid var(--danger-color);
}

.question-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--light-gray);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Form styling */
.student-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--spacing-xl);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--darker-color);
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.form-label.required-label::after {
    content: " *";
    color: var(--danger-color);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.875rem var(--spacing-lg);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--darker-color);
    background-color: white;
    background-clip: padding-box;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    font-family: inherit;
    font-weight: 500;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--gray);
    font-weight: 400;
}

.form-control-lg {
    padding: 1.125rem var(--spacing-xl);
    font-size: 1.125rem;
}

.form-text {
    margin-top: var(--spacing-sm);
    font-size: 0.875em;
    color: var(--dark-gray);
    font-weight: 500;
}

/* Moderne knapper */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 2px solid transparent;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    letter-spacing: -0.01em;
    font-family: inherit;
}

.btn-lg {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    color: white;
    background: var(--gradient-primary);
    border-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-secondary {
    color: var(--secondary-dark);
    background-color: transparent;
    border-color: var(--secondary-light);
}

.btn-outline-secondary:hover {
    color: white;
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Test progress */
.test-progress {
    background: rgba(255, 255, 255, 0.15);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-info {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
}

.access-code-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* Spørgsmål styling */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--light-gray);
}

.question-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
}

.question-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--darker-color);
}

.question-content {
    margin-bottom: var(--spacing-xl);
}

.question-text {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--light-color);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
    font-weight: 500;
    line-height: 1.7;
}

.question-image img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

/* Svar muligheder med moderne checkbox design */
.answers-grid {
    display: grid;
    gap: var(--spacing-md);
}

.answer-option {
    position: relative;
}

.answer-input {
    position: absolute;
    opacity: 0;
}

.answer-label {
    display: flex;
    align-items: center;
    padding: var(--spacing-lg);
    background: var(--light-color);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    min-height: 70px;
}

.answer-label:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(4px);
}

.answer-input:checked + .answer-label {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.answer-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 700;
    margin-right: var(--spacing-lg);
    flex-shrink: 0;
    font-size: 0.875rem;
    transition: all var(--transition-normal);
}

.answer-input:checked + .answer-label .answer-letter {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.answer-text {
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
    color: var(--darker-color);
}

/* Elev info form */
.student-info-form {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-xl);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.student-info-form.required {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.student-info-form h3 {
    color: var(--darker-color);
    margin-bottom: var(--spacing-lg);
    font-size: 1.5rem;
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

/* Test actions */
.test-actions {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xxl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--light-gray);
}

/* Resultat styling */
.result-icon {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xl);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.result-success .result-icon {
    color: var(--success-color);
    text-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.result-warning .result-icon {
    color: var(--warning-color);
    text-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.result-danger .result-icon {
    color: var(--danger-color);
    text-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.result-score {
    margin-bottom: var(--spacing-xl);
}

.score-percentage {
    font-size: 4rem;
    font-weight: 900;
    color: var(--darker-color);
    line-height: 1;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.05em;
}

.score-grade {
    margin: var(--spacing-lg) 0;
}

.grade-label {
    font-size: 1.25rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.grade-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-left: var(--spacing-md);
    letter-spacing: -0.05em;
}

.result-success .grade-number {
    color: var(--success-color);
}

.result-warning .grade-number {
    color: var(--warning-color);
}

.result-danger .grade-number {
    color: var(--danger-color);
}

.score-text {
    font-size: 1.25rem;
    color: var(--dark-gray);
    margin-top: var(--spacing-sm);
    font-weight: 500;
}

.result-message {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--light-color);
    border-radius: var(--radius-lg);
}

.result-message h3 {
    color: var(--darker-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1.75rem;
    font-weight: 800;
}

.result-message p {
    color: var(--dark-gray);
    font-size: 1.125rem;
    font-weight: 500;
}

/* Resultat detaljer */
.result-details {
    background: var(--light-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    text-align: left;
    border: 1px solid var(--light-gray);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--light-gray);
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-item i {
    color: var(--primary-color);
    width: 24px;
    text-align: center;
    font-size: 1.125rem;
}

.detail-item span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
}

.detail-item strong {
    color: var(--darker-color);
    font-weight: 700;
}

/* Karakter forklaring */
.grade-explanation {
    background: var(--light-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    text-align: center;
    border: 1px solid var(--light-gray);
}

.grade-explanation h4 {
    margin-bottom: var(--spacing-lg);
    color: var(--darker-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.grade-scale {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.grade-item {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    color: var(--dark-color);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.grade-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Student info */
.student-info {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: var(--light-color);
    border-radius: var(--radius-xl);
    border: 1px solid var(--light-gray);
}

.student-info h4 {
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.student-info ul {
    padding-left: var(--spacing-xl);
}

.student-info li {
    margin-bottom: var(--spacing-md);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--dark-color);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.student-info li i {
    color: var(--primary-color);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* Footer */
.student-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Resultat actions */
.result-actions {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* Animationer */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loader animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .student-header h1 {
        font-size: 2.25rem;
    }
    
    .result-header h1 {
        font-size: 2.25rem;
    }
    
    .test-header h1 {
        font-size: 2rem;
    }
    
    .score-percentage {
        font-size: 3rem;
    }
    
    .grade-number {
        font-size: 2.25rem;
    }
    
    .student-card,
    .result-card,
    .question-card {
        padding: var(--spacing-xl);
    }
    
    .result-actions {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .result-actions .btn {
        width: 100%;
    }
    
    .test-actions {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .test-actions > div {
        width: 100%;
    }
    
    .test-actions .btn {
        width: 100%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .grade-scale {
        flex-direction: column;
        align-items: center;
    }
    
    .grade-item {
        width: 100%;
        max-width: 250px;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .test-progress {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }
    
    .question-number {
        margin-bottom: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .student-body {
        padding: var(--spacing-sm);
    }
    
    .student-header h1 {
        font-size: 1.875rem;
    }
    
    .student-header .lead {
        font-size: 1.125rem;
    }
    
    .student-card,
    .result-card,
    .question-card {
        padding: var(--spacing-lg);
    }
    
    .score-percentage {
        font-size: 2.5rem;
    }
    
    .grade-number {
        font-size: 2rem;
    }
    
    .result-icon {
        font-size: 4rem;
    }
}

/* Tilføj til student.css */
.answer-selected {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
}

.question-hint {
    font-size: 0.85rem;
    color: #666;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
}

/* Tilføj Inter font via Google Fonts (skal tilføjes i HTML head) */
/* 
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
*/