/* ===== RESET OCH BAS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
    position: relative;
}

/* Subtil animerad bakgrund */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

body > * {
    position: relative;
    z-index: 1;
}

/* ===== CONTAINER OCH LAYOUT ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
}

/* ===== INLOGGNING ===== */
.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 60px 70px;           /* Ökad padding från 50px 40px */
    max-width: 650px;             /* Ökad från 480px */
    width: 92%;                    /* Lägg till för responsivitet */
    margin: 60px auto;             /* Minskat från 80px för mer plats */
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    animation: slideUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Uppdatera också h1 för bättre proportioner (rad 77): */
.login-box h1 {
    color: #667eea;
    text-align: center;
    font-size: 3.5em;             /* Ökad från 3em */
    margin-bottom: 15px;          /* Ökad från 10px */
    font-weight: 800;             /* Ökad från 700 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    letter-spacing: -2px;
}

.login-box h1::after {
    content: '📚';
    margin-left: 15px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

/* Uppdatera subtitle (rad 89): */
.subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 45px;          /* Ökad från 40px */
    font-size: 1.15em;            /* Ökad från 1.1em */
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.08),
                0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #d0d0d0;
    background: white;
}

.form-group textarea {
    resize: vertical;
}

/* ===== KNAPPAR ===== */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    /* KOMMENTERA BORT HELA DENNA SEKTION */
    /* content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s; */
}

.btn:hover::before {
    /* KOMMENTERA BORT */
    /* width: 300px;
    height: 300px; */
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.45);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

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

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    color: #666;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.form-footer a:hover {
    text-decoration: underline;
    color: #764ba2;
}

.demo-info {
    margin-top: 40px;
    padding: 30px 35px;           /* Ökad från 25px */
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 18px;          /* Ökad från 15px */
    border: 2px solid rgba(102, 126, 234, 0.15);
    position: relative;
    z-index: 1;
}

.demo-info::before {
    content: '🎓';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5em;
    opacity: 0.3;
}

.demo-info h3 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.2em;
    font-weight: 700;
}

.demo-info p {
    margin: 12px 0;
    font-size: 14.5px;
    color: #555;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.demo-info p:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

.demo-info strong {
    color: #667eea;
    font-weight: 700;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0;
}

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

.navbar h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8em;
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-right span {
    font-weight: 600;
    color: #555;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    min-width: 280px;
    height: fit-content;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.sidebar-btn {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border: none;
    border-radius: 12px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #555;
    position: relative;
}

.sidebar-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
}

.sidebar-btn:hover {
    background: #e9ecef;
    transform: translateX(3px);     /* Minskad från 5px */
}

.sidebar-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.sidebar-btn.active::before {
    height: 60%;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;             /* Ökat från 35px */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
    max-width: 1200px;         /* Lägg till för bättre kontroll */
}

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

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.main-content h2 {
    color: #333;
    margin-bottom: 30px;       /* Ökat från 25px */
    padding-bottom: 20px;      /* Ökat från 15px */
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
    font-size: 2em;
    font-weight: 700;
}

.main-content h3 {
    color: #555;
    margin-top: 40px;          /* Ökat från 35px */
    margin-bottom: 25px;       /* Ökat från 20px */
    font-size: 1.4em;
}
/* ===== KORT ===== */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px 30px;        /* Bättre horisontell padding */
    margin-bottom: 20px;
    border-left: 5px solid #667eea;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);    /* Mildare än 0 8px 25px */
    transform: translateY(-3px);                    /* Mildare än -5px */
    /* Ta bort translateX(5px) helt */
}

.card h3 {
    margin: 0 0 20px 0;        /* Ökat från 15px */
    color: #333;
    font-size: 1.4em;
    line-height: 1.4;          /* Lägg till */
}

.card p {
    margin: 12px 0;            /* Ökat från 8px */
    color: #666;
    line-height: 1.7;          /* Ökat från 1.6 */
}

.card-actions {
    display: flex;
    gap: 12px;                     /* Ökat från 10px */
    margin-top: 25px;              /* Ökat från 20px */
    flex-wrap: wrap;
}

.card-actions .btn {
    padding: 10px 20px;            /* Minskad från 14px 28px */
    font-size: 14px;               /* Minskad från 15px */
}



/* ===== KURSKORT ===== */
.course-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.course-card h3 {
    color: white;
    position: relative;
    z-index: 1;
}

.course-card p {
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 1;
}

.course-code {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.course-link {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.course-link a {
    color: white;
    word-break: break-all;
    text-decoration: underline;
}

/* ===== QUIZ KORT ===== */
.quiz-card {
    border-left-color: #28a745;
}

.quiz-card.completed {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
}

/* ===== FRÅGOR ===== */
.question-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.question-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.1);
}

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

.question-type {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

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

.question-actions button {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.answer-option {
    display: flex;
    align-items: center;
    margin: 12px 0;
    padding: 12px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.answer-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.answer-option input[type="checkbox"],
.answer-option input[type="radio"] {
    margin-right: 12px;
    width: auto;
    cursor: pointer;
}

.answer-option input[type="text"] {
    flex: 1;
    margin-right: 12px;
}

.remove-option {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.remove-option:hover {
    background: #c82333;
    transform: scale(1.1);
}

.add-option {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s;
}

.add-option:hover {
    background: #218838;
    transform: translateY(-2px);
}

.add-question-buttons {
    margin: 25px 0;
    display: flex;
    gap: 15px;
}

/* ===== QUIZ GENOMFÖRANDE ===== */
.quiz-header {
    text-align: center;
    margin-bottom: 35px;
}

.quiz-timer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    display: inline-block;
    font-weight: 600;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.quiz-progress {
    background: #e0e0e0;
    height: 12px;
    border-radius: 10px;
    margin: 25px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.quiz-question {
    margin-bottom: 35px;
}

.quiz-question h3 {
    margin-top: 0;
    font-size: 1.3em;
}

.quiz-options {
    margin-top: 20px;
}

.quiz-option {
    display: block;
    padding: 18px 20px;
    margin: 12px 0;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.quiz-option:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateX(10px);
}

.quiz-option input {
    margin-right: 15px;
    cursor: pointer;
}

.quiz-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.quiz-option.correct {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border-color: #28a745;
}

.quiz-option.incorrect {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-color: #dc3545;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 35px;
    gap: 15px;
}

/* ===== RESULTAT ===== */
.result-container {
    text-align: center;
    padding: 30px 20px;        /* Minskad från 50px */
    max-width: 900px;          /* Lägg till max-width */
    margin: 0 auto;            /* Centrera */
}


.result-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 35px 40px;        /* Minskad från 40px */
    border-radius: 20px;
    margin: 25px auto 30px;    /* Bättre spacing + auto för centrering */
    max-width: 600px;          /* Lägg till max-width */
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.result-score p {
    font-size: 1.4em;          /* Minskad från 1.6em */
    margin: 20px 0;            /* Ökat från 15px */
    line-height: 1.6;          /* Lägg till line-height */
}

.result-score span {
    font-size: 2.2em;          /* Minskad från 2.5em */
    font-weight: bold;
    display: block;
    margin-top: 15px;          /* Ökat från 10px */
}

.result-details {
    text-align: left;
    margin-top: 35px;
}

/* ===== STATISTIK ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));  /* Minskad från 280px */
    gap: 20px;                      /* Minskad från 25px */
    margin-bottom: 40px;            /* Ökat från 35px */
}

/* 12. MINDRE STAT-CARD - rad 758-783 */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;                  /* Minskad från 35px */
    border-radius: 18px;            /* Minskad från 20px */
    text-align: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.stat-card:hover {
    transform: translateY(-5px);    /* Minskad från -10px */
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.35);  /* Mildare */
}

.stat-card h3 {
    margin: 0 0 18px 0;            /* Minskad från 20px */
    color: white;
    font-size: 1em;                /* Minskad från 1.1em */
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 3em;                /* Minskad från 3.5em */
    font-weight: bold;
    margin: 0;
    position: relative;
    z-index: 1;
}


.stats-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 25px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

.stats-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

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

.stats-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* ===== TEMA-VÄLJARE ===== */
.theme-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    margin-bottom: 25px;
}

.filter-bar select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.filter-bar select:focus {
    border-color: #667eea;
    outline: none;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    padding: 35px;
    border-radius: 20px;
    max-width: 550px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
}

.modal-content h3 {
    margin-top: 0;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-actions .btn {
    width: auto;
    flex: 1;
}

/* ===== ANVÄNDAR LISTA ===== */
.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.user-item:hover {
    transform: translateX(5px);                    /* Minskad från 10px */
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);   /* Mildare */
}


.user-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
}

.user-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.user-badge.admin {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

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

.user-badge.student {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

/* ===== AKTIVITET ===== */
.activity-item {
    padding: 20px;
    border-left: 4px solid #667eea;
    background: white;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateX(5px);                    /* Minskad från 10px */
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.12);  /* Mildare */
}

.activity-time {
    color: #999;
    font-size: 13px;
    margin-top: 8px;
}

/* ===== QUIZ TEMAN ===== */
.quiz-theme-blue {
    --theme-color: #667eea;
}

.quiz-theme-green {
    --theme-color: #28a745;
}

.quiz-theme-purple {
    --theme-color: #764ba2;
}

.quiz-theme-orange {
    --theme-color: #fd7e14;
}

.quiz-theme-blue .quiz-option.selected,
.quiz-theme-green .quiz-option.selected,
.quiz-theme-purple .quiz-option.selected,
.quiz-theme-orange .quiz-option.selected {
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-color) 100%);
    border-color: var(--theme-color);
}

/* ===== RESPONSIV DESIGN ===== */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        min-width: auto;
        width: 100%;
    }
    
    .sidebar-btn {
        padding: 14px;
        font-size: 14px;
    }
    
    .main-content {
        padding: 25px;
    }
    
    .login-box {
        padding: 35px 25px;
        margin: 40px 20px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-selector {
        grid-template-columns: 1fr;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .card-actions .btn {
        width: 100%;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .quiz-navigation .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-box h1 {
        font-size: 2.5em;
    }
    
    .navbar h1 {
        font-size: 1.4em;
    }
    
    .result-score p {
        font-size: 1.3em;
    }
    
    .result-score span {
        font-size: 2em;
    }
    
    .stat-number {
        font-size: 2.5em;
    }
}

/* ===== HJÄLPKLASSER ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

.error-message {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    animation: slideDown 0.3s ease-out;
}

.course-actions {
    margin: 25px 0;
}