* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary-red: #C8102E;
            --dark-red: #8B0000;
            --gold: #FFD700;
            --dark-gray: #2C2C2C;
            --light-gray: #F5F5F5;
            --white: #FFFFFF;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, var(--dark-gray) 0%, var(--dark-red) 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .container {
            width: 100%;
            max-width: 500px;
            animation: fadeIn 0.5s ease-in;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .screen {
            display: none;
        }

        .screen.active {
            display: block;
        }

        .card {
            background: var(--white);
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }

        .logo {
            text-align: center;
            margin-bottom: 30px;
        }

        .logo-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            border-radius: 50%;
            margin: 0 auto 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 40px;
            color: var(--gold);
            box-shadow: 0 5px 15px rgba(200, 16, 46, 0.4);
        }

        h1 {
            color: var(--dark-gray);
            font-size: 28px;
            text-align: center;
            margin-bottom: 10px;
        }

        h2 {
            color: var(--primary-red);
            font-size: 24px;
            margin-bottom: 20px;
            text-align: center;
        }

        .subtitle {
            text-align: center;
            color: #666;
            margin-bottom: 30px;
            font-size: 14px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            color: var(--dark-gray);
            font-weight: 600;
            margin-bottom: 8px;
            font-size: 14px;
        }

        input[type="text"],
        input[type="email"],
        input[type="password"] {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #E0E0E0;
            border-radius: 10px;
            font-size: 16px;
            transition: all 0.3s;
            background: var(--light-gray);
        }

        input:focus {
            outline: none;
            border-color: var(--primary-red);
            background: var(--white);
        }

        .btn {
            width: 100%;
            padding: 15px;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            color: var(--white);
            box-shadow: 0 5px 15px rgba(200, 16, 46, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 7px 20px rgba(200, 16, 46, 0.4);
        }

        .btn-secondary {
            background: var(--light-gray);
            color: var(--dark-gray);
            margin-top: 10px;
        }

        .btn-secondary:hover {
            background: #E0E0E0;
        }

        .link {
            text-align: center;
            margin-top: 20px;
            color: var(--primary-red);
            cursor: pointer;
            font-size: 14px;
            text-decoration: underline;
        }

        .link:hover {
            color: var(--dark-red);
        }

        /* Dashboard Styles */
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }

        .welcome {
            color: var(--dark-gray);
        }

        .welcome h2 {
            text-align: left;
            margin-bottom: 5px;
        }

        .welcome p {
            color: #666;
            font-size: 14px;
        }

        .logout-btn {
            background: none;
            border: 2px solid var(--primary-red);
            color: var(--primary-red);
            padding: 8px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
        }

        .logout-btn:hover {
            background: var(--primary-red);
            color: var(--white);
        }

        .stats {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            padding: 20px;
            border-radius: 15px;
            color: var(--white);
            text-align: center;
        }

        .stat-number {
            font-size: 32px;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .stat-label-db {
            font-size: 12px;
            opacity: 0.9;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .menu-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .menu-item {
            background: var(--light-gray);
            padding: 30px 20px;
            border-radius: 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
        }

        .menu-item:hover {
            transform: translateY(-5px);
            border-color: var(--primary-red);
            background: var(--white);
        }

        .menu-icon {
            font-size: 40px;
            margin-bottom: 10px;
        }

        .menu-label {
            color: var(--dark-gray);
            font-weight: 600;
            font-size: 14px;
        }

        .menu-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            color: var(--white);
            font-size: 12px;
            font-weight: 700;
            padding: 4px 8px;
            border-radius: 12px;
            min-width: 20px;
            text-align: center;
        }

        .menu-item {
            position: relative;
        }

        /* Categories Styles */
        .category-list {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .category-item {
            background: var(--light-gray);
            padding: 20px;
            border-radius: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
        }

        .category-item:hover {
            border-color: var(--primary-red);
            background: var(--white);
            transform: translateX(5px);
        }

        .category-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .category-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: var(--gold);
        }

        .category-details h3 {
            color: var(--dark-gray);
            font-size: 16px;
            margin-bottom: 5px;
        }

        .category-details p {
            color: #666;
            font-size: 12px;
        }

        .category-arrow {
            color: var(--primary-red);
            font-size: 24px;
        }

        /* Invitation Styles */
        .invitation-card {
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            padding: 30px;
            border-radius: 15px;
            color: var(--white);
            text-align: center;
            margin-bottom: 30px;
        }

        .invitation-card h3 {
            font-size: 20px;
            margin-bottom: 10px;
        }

        .invitation-card p {
            opacity: 0.9;
            font-size: 14px;
            margin-bottom: 20px;
        }

        .invitation-code {
            background: rgba(255, 255, 255, 0.2);
            padding: 15px;
            border-radius: 10px;
            font-size: 24px;
            font-weight: bold;
            letter-spacing: 3px;
            margin-bottom: 15px;
        }

        .btn-copy {
            background: var(--gold);
            color: var(--dark-gray);
            padding: 10px 30px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn-copy:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
        }

        .invitation-form {
            background: var(--white);
            padding: 30px;
            border-radius: 15px;
        }

        .invitation-form h3 {
            color: var(--dark-gray);
            margin-bottom: 20px;
            text-align: center;
        }

        .success-message {
            background: #4CAF50;
            color: var(--white);
            padding: 15px;
            border-radius: 10px;
            text-align: center;
            margin-top: 15px;
            display: none;
        }

        .success-message.show {
            display: block;
            animation: slideIn 0.3s ease-in;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Back Button */
        .back-btn {
            background: none;
            border: none;
            color: var(--primary-red);
            font-size: 18px;
            cursor: pointer;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 5px;
            font-weight: 600;
            transition: all 0.3s;
        }

        .back-btn:hover {
            transform: translateX(-5px);
        }

        /* Responsive */
        @media (max-width: 600px) {
            .card {
                padding: 30px 20px;
            }

            .stats {
                grid-template-columns: 1fr;
            }

            .menu-grid {
                grid-template-columns: 1fr;
            }

            h1 {
                font-size: 24px;
            }
        }

        /* Quiz Start Screen Styles */
        .quiz-info {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin: 30px 0;
        }

        .info-item {
            display: flex;
            align-items: center;
            gap: 15px;
            background: var(--light-gray);
            padding: 15px;
            border-radius: 12px;
        }

        .info-icon {
            font-size: 32px;
            width: 50px;
            text-align: center;
        }

        .info-text {
            display: flex;
            flex-direction: column;
        }

        .info-text strong {
            color: var(--dark-gray);
            font-size: 16px;
            margin-bottom: 3px;
        }

        .info-text span {
            color: #666;
            font-size: 13px;
        }

        .quiz-instructions {
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            padding: 25px;
            border-radius: 15px;
            color: var(--white);
            margin-bottom: 25px;
        }

        .quiz-instructions h3 {
            margin-bottom: 15px;
            font-size: 18px;
        }

        .quiz-instructions ul {
            list-style: none;
        }

        .quiz-instructions li {
            padding: 8px 0;
            font-size: 14px;
            opacity: 0.95;
        }

        /* Quiz Screen Styles */
        .quiz-card {
            max-width: 700px;
            margin: 0 auto;
        }

        .quiz-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }

        .quiz-timer {
            display: flex;
            align-items: center;
            gap: 8px;
            background: var(--light-gray);
            padding: 10px 20px;
            border-radius: 25px;
            font-weight: 600;
            color: var(--dark-gray);
        }

        .timer-icon {
            font-size: 20px;
        }

        .progress-container {
            margin-bottom: 30px;
        }

        .progress-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-size: 14px;
            color: #666;
            font-weight: 600;
        }

        .progress-percentage {
            color: var(--primary-red);
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: var(--light-gray);
            border-radius: 10px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary-red) 0%, var(--dark-red) 100%);
            transition: width 0.5s ease;
            width: 7%;
        }

        .question-container {
            margin-bottom: 30px;
        }

        .question-text {
            color: var(--dark-gray);
            font-size: 22px;
            line-height: 1.5;
            margin-bottom: 20px;
        }

        .question-type-hint {
            display: inline-block;
            background: linear-gradient(135deg, var(--gold) 0%, #FFA000 100%);
            color: var(--dark-gray);
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 15px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: 0 3px 8px rgba(255, 215, 0, 0.3);
        }

        #questionTypeHint {
            margin-bottom: 10px;
        }

        .question-image {
            width: 25%;
            max-width: 400px;
            margin: 20px auto;
            border-radius: 15px;
            overflow: hidden;
        }

        .question-image img {
            width: 100%;
            height: auto;
        }

        .answers-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 25px;
        }

        .answer-option {
            display: flex;
            align-items: center;
            gap: 15px;
            background: var(--light-gray);
            padding: 18px 20px;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
            position: relative;
        }

        .answer-option:hover {
            background: var(--white);
            /*border-color: var(--primary-red);*/
            border-color: #1a73e8;
            transform: translateX(5px);
        }

        /*
        .answer-option.selected {
            background: var(--white);
            border-color: var(--primary-red);
            box-shadow: 0 4px 12px rgba(200, 16, 46, 0.2);
        }*/
        .answer-option.selected {
            background: #EBF3FE;
            border-color: #1a73e8;
            box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
        }

        .answer-option.correct {
            background: #E8F5E9;
            border-color: #4CAF50;
        }

        .answer-option.missed {
            background: #E8F5E9;
            border-color: #4CAF50;
        }

        .answer-option.wrong {
            background: #FFEBEE;
            border-color: #F44336;
        }

        .answer-letter {
            width: 40px;
            height: 40px;
            background: var(--white);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: var(--dark-gray);
            flex-shrink: 0;
            transition: all 0.3s;
        }

        /* Multiple Choice Checkbox Style */
        .answer-option[data-type="multiple"] .answer-letter {
            border-radius: 8px;
            border: 2px solid #CCC;
            background: var(--white);
            position: relative;
        }

        .answer-option[data-type="multiple"] .answer-letter::after {
            content: '✓';
            position: absolute;
            color: var(--white);
            font-size: 20px;
            opacity: 0;
            transform: scale(0);
            transition: all 0.2s;
        }

        .answer-option[data-type="multiple"].selected .answer-letter::after {
            opacity: 1;
            transform: scale(1);
        }

        /*
        .answer-option.selected .answer-letter {
            background: var(--primary-red);
            color: var(--white);
        }*/

        .answer-option.selected .answer-letter {
            background: #1a73e8;
            color: var(--white);
        }

        /*
        .answer-option[data-type="multiple"].selected .answer-letter {
            background: var(--primary-red);
            border-color: var(--primary-red);
        }*/

        .answer-option[data-type="multiple"].selected .answer-letter {
            background: #1a73e8;
            border-color: #1a73e8;
        }

        .answer-option.correct .answer-letter {
            background: #4CAF50;
            color: var(--white);
        }

        .answer-option.wrong .answer-letter {
            background: #F44336;
            color: var(--white);
        }

        .answer-text {
            flex: 1;
            color: var(--dark-gray);
            font-size: 16px;
            font-weight: 500;
        }

        .answer-check {
            font-size: 24px;
            color: #4CAF50;
            display: none;
        }

        .answer-option.correct .answer-check {
            display: block;
        }

        .quiz-navigation {
            display: flex;
            gap: 10px;
        }

        .quiz-navigation .btn {
            flex: 1;
        }

        /* Quiz Result Screen Styles */
        .result-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .result-icon {
            width: 100px;
            height: 100px;
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            border-radius: 50%;
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 50px;
            animation: scaleIn 0.5s ease;
        }

        @keyframes scaleIn {
            from {
                transform: scale(0);
            }
            to {
                transform: scale(1);
            }
        }

        .result-icon.failed {
            background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
        }

        .result-score {
            display: flex;
            justify-content: center;
            margin-bottom: 30px;
        }

        .score-circle {
            position: relative;
            width: 200px;
            height: 200px;
        }

        .score-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
        }

        .score-number {
            font-size: 48px;
            font-weight: bold;
            color: var(--dark-gray);
            line-height: 1;
            margin-bottom: 5px;
        }

        .score-label {
            font-size: 14px;
            color: #666;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .result-details {
            background: var(--light-gray);
            padding: 25px;
            border-radius: 15px;
            margin-bottom: 25px;
        }

        .result-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #E0E0E0;
        }

        .result-row:last-child {
            border-bottom: none;
        }

        .result-row span {
            color: #666;
            font-size: 14px;
        }

        .result-row strong {
            color: var(--dark-gray);
            font-size: 16px;
        }

        .result-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        /* Responsive Quiz Styles */
        @media (max-width: 600px) {
            .quiz-card {
                padding: 25px 15px;
            }

            .question-text {
                font-size: 18px;
            }

            .answer-text {
                font-size: 14px;
            }

            .quiz-navigation {
                flex-direction: column;
            }

            .score-circle {
                width: 160px;
                height: 160px;
            }

            .score-number {
                font-size: 36px;
            }
        }

        /* Active Quiz Styles */
        .active-quiz-card {
            background: var(--white);
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            transition: all 0.3s;
        }

        .active-quiz-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
        }

        .active-quiz-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }

        .active-quiz-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            margin-right: 15px;
        }

        .active-quiz-info h3 {
            color: var(--dark-gray);
            font-size: 18px;
            margin-bottom: 5px;
        }

        .active-quiz-info p {
            color: #666;
            font-size: 13px;
        }

        .active-quiz-progress {
            margin-bottom: 15px;
        }

        .progress-text {
            color: var(--dark-gray);
            font-weight: 600;
            margin-bottom: 8px;
            font-size: 14px;
        }

        .progress-bar-container {
            width: 100%;
            height: 12px;
            background: #E0E0E0;
            border-radius: 6px;
            overflow: hidden;
            position: relative;
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary-red) 0%, var(--dark-red) 100%);
            border-radius: 6px;
            transition: width 0.3s ease;
        }

        .progress-bar-percentage {
            position: absolute;
            right: 5px;
            top: -22px;
            color: var(--primary-red);
            font-weight: 700;
            font-size: 13px;
        }

        .btn-continue {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            color: var(--white);
            border: none;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 14px;
        }

        .btn-continue:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(200, 16, 46, 0.4);
        }

        /* Battle Waiting Room Styles */
        .participant-item {
            display: flex;
            align-items: center;
            padding: 12px 15px;
            background: white;
            border-radius: 10px;
            transition: all 0.3s;
            border: 2px solid transparent;
        }

        .participant-item.joined {
            border-color: #4CAF50;
        }

        .participant-item.pending {
            opacity: 0.5;
        }

        .participant-avatar {
            font-size: 32px;
            margin-right: 15px;
        }

        .participant-info {
            flex: 1;
        }

        .participant-name {
            font-weight: 600;
            color: var(--dark-gray);
            font-size: 15px;
        }

        .participant-status {
            font-size: 12px;
            color: #666;
            margin-top: 2px;
        }

        .participant-badge {
            background: #4CAF50;
            color: white;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
        }

        .participant-badge.pending {
            background: #999;
        }

        @keyframes fadeInParticipant {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .participant-item.new {
            animation: fadeInParticipant 0.5s ease-out;
        }

        /* Settings Screen Styles */
        .settings-section {
            margin-bottom: 35px;
            padding-bottom: 25px;
            border-bottom: 2px solid var(--light-gray);
        }

        .settings-section:last-child {
            border-bottom: none;
        }

        .section-title {
            color: var(--dark-gray);
            font-size: 18px;
            margin-bottom: 20px;
            font-weight: 600;
        }

        .toggle-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: var(--light-gray);
            border-radius: 12px;
            margin-bottom: 12px;
        }

        .toggle-item strong {
            display: block;
            color: var(--dark-gray);
            font-size: 15px;
            margin-bottom: 5px;
        }

        .toggle-item p {
            color: #666;
            font-size: 13px;
            margin: 0;
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 54px;
            height: 28px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: 0.4s;
            border-radius: 28px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: 0.4s;
            border-radius: 50%;
        }

        .toggle-switch input:checked + .toggle-slider {
            background-color: var(--primary-red);
        }

        .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(26px);
        }

        .btn-danger {
            background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
            color: var(--white);
            box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
        }

        .btn-danger:hover {
            transform: translateY(-2px);
            box-shadow: 0 7px 20px rgba(244, 67, 54, 0.4);
        }

        /* Achievements Screen Styles */
        .achievements-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-bottom: 30px;
        }

        .achievement-stat {
            background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
            padding: 20px;
            border-radius: 15px;
            text-align: center;
            color: var(--white);
        }

        .achievement-icon {
            font-size: 36px;
            margin-bottom: 10px;
        }

        .achievement-number {
            font-size: 28px;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .achievement-label {
            font-size: 12px;
            opacity: 0.9;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .quiz-history-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .quiz-history-item {
            display: flex;
            align-items: center;
            gap: 15px;
            background: var(--light-gray);
            padding: 18px;
            border-radius: 15px;
            border-left: 4px solid #4CAF50;
            transition: all 0.3s;
        }

        .quiz-history-item:hover {
            transform: translateX(5px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .quiz-history-item.failed {
            border-left-color: #F44336;
        }

        .history-icon {
            width: 50px;
            height: 50px;
            background: var(--white);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            flex-shrink: 0;
        }

        .history-details {
            flex: 1;
        }

        .history-details h4 {
            color: var(--dark-gray);
            font-size: 15px;
            margin-bottom: 5px;
            font-weight: 600;
        }

        .history-details p {
            color: #666;
            font-size: 13px;
            margin: 0;
        }

        .history-score {
            text-align: right;
        }

        .score-badge {
            display: inline-block;
            padding: 6px 14px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 16px;
            margin-bottom: 5px;
        }

        .score-badge.passed {
            background: #E8F5E9;
            color: #4CAF50;
        }

        .score-badge.failed {
            background: #FFEBEE;
            color: #F44336;
        }

        .score-detail {
            color: #666;
            font-size: 12px;
        }

        /* Responsive Settings and Achievements */
        @media (max-width: 600px) {
            .achievements-stats {
                grid-template-columns: 1fr;
            }

            .quiz-history-item {
                flex-wrap: wrap;
            }

            .history-score {
                width: 100%;
                text-align: left;
                margin-top: 10px;
                padding-top: 10px;
                border-top: 1px solid #E0E0E0;
            }
        }
		/* Konfigurationsbereich */
.quiz-config {
    margin: 25px 0;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #f9f9f9;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #C8102E;
    color: white;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.config-header:hover {
    background: #A00D25;
}

.config-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.config-content {
    padding: 20px;
    background: white;
    display: none;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.config-item:last-child {
    border-bottom: none;
}

.config-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.config-label span {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: #C8102E;
}

input:checked + .slider:before {
    transform: translateX(30px);
}

/* Dropdown Select */
.config-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.config-select:hover {
    border-color: #C8102E;
}

.config-select:focus {
    outline: none;
    border-color: #C8102E;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .config-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .switch,
    .config-select {
        align-self: flex-end;
    }
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 12px;
    height: 80px;
    margin-bottom: 12px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error State */
.error {
    text-align: center;
    padding: 40px 20px;
    color: #e63946;
    font-size: 16px;
    background-color: #ffe5e5;
    border-radius: 12px;
    margin: 20px 0;
}

.error::before {
    content: '⚠️';
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

.empty-state::before {
    content: '📭';
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Retry Button */
.retry-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(230, 57, 70, 0.2);
}

.retry-btn:hover {
    background-color: #d62828;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 57, 70, 0.3);
}

.retry-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(230, 57, 70, 0.2);
}

/* Spinner Animation (falls du später ein Loading Overlay brauchst) */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth Fade-in für geladene Items */
.category-item {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Config Input Field */
.config-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.config-input:focus {
    outline: none;
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.config-input::placeholder {
    color: #999;
}
/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow-y: auto; /* ← Macht das Overlay scrollbar */
    padding: 20px; /* ← Padding für bessere Mobile-Ansicht */
}

.loading-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    margin: auto; /* ← Zentriert den Container vertikal wenn gescrollt wird */
    max-height: 90vh; /* ← Maximale Höhe damit es nicht zu groß wird */
    overflow-y: auto; /* ← Macht den Container selbst auch scrollbar falls nötig */
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #e63946;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loadingTitle {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

.loading-steps {
    text-align: left;
    margin: 20px 0;
}

.loading-step {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.loading-step.active {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.loading-step.completed {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.loading-step.error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

.step-icon {
    font-size: 20px;
    margin-right: 12px;
    min-width: 24px;
}

.step-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.step-status {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

.loading-hint {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

/* Custom Scrollbar für den Loading Container */
.loading-container::-webkit-scrollbar {
    width: 8px;
}

.loading-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.loading-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.loading-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #d32f2f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    text-align: center;
    color: #666;
    margin-top: 10px;
}

.summary-card {
    text-align: center;
    padding: 40px 30px;
}

.summary-header h1 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #d32f2f;
}

.summary-message {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
}

.summary-result {
    margin: 30px 0;
}

.result-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d32f2f 0%, #ff6b6b 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.3);
}

.result-percentage {
    font-size: 3em;
    font-weight: bold;
}

.result-score {
    font-size: 1.2em;
    margin-top: 10px;
}

.summary-stats {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-icon {
    font-size: 2em;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #d32f2f;
}

.summary-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.summary-actions .btn {
    flex: 1;
    max-width: 250px;
}

.accordion {
    margin: 20px 0;
}
.accordion-item {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}
.accordion-header {
    background-color: #f5f5f5;
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}
.accordion-header:hover {
    background-color: #e8e8e8;
}
.accordion-header.active {
    background-color: #d32f2f;
    color: white;
}
.accordion-icon {
    transition: transform 0.3s;
}
.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}
.accordion-content {
    display: none;
    padding: 20px;
}
.accordion-content.active {
    display: block;
}

.question-text.correct {
    border: 3px solid #4caf50;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.question-text.incorrect {
    border: 3px solid #d32f2f;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.checkbox-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.checkbox-list label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    cursor: pointer;
}

.checkbox-list label:hover {
    background-color: #f0f0f0;
    padding-left: 5px;
}

.checkbox-list input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.tab-name {
    flex-grow: 1;
}

.question-count {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
    font-weight: normal;
}

.tab-summary {
    margin-top: 10px;
    padding: 8px;
    background-color: #e8f4f8;
    border-radius: 4px;
    text-align: right;
}

.tab-summary strong {
    color: #2c3e50;
}

.config-item--accordion {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border-bottom: 1px solid #eee;
}
.config-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
}
.config-accordion-header:hover {
    background-color: #f9f9f9;
}
.toggle-icon-small {
    font-size: 11px;
    color: #888;
}
.config-accordion-content {
    padding: 0 16px 14px 16px;
}
.category-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.category-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}
.category-checkbox-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #e74c3c;
    cursor: pointer;
    flex-shrink: 0;
}
.category-checkbox-item label { cursor: pointer; flex: 1; }
.category-checkbox-item .category-count { font-size: 12px; color: #999; }

.cat-indicator { font-size: 12px; font-weight: bold; padding: 2px 6px; border-radius: 10px; }
.cat-indicator.grey   { background: #f0f0f0; color: #888; }
.cat-indicator.orange { background: #fef3e2; color: #e67e22; }
.cat-indicator.red    { background: #fde8e8; color: #e74c3c; }