@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap");
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        html, body {
            height: 100%;
            width: 100%;
        }
        
        body {
            font-family: "Orbitron", monospace;
            background: #000;
            overflow: hidden;
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
        }
        
        #matrixCanvas {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1;
            pointer-events: none;
            width: 100% !important;
            height: 100% !important;
        }
        
        .game-container {
            position: relative;
            z-index: 10;
            height: 100vh;
            max-height: 100dvh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 0 1rem;
            text-align: center;
        }
        
        .start-btn {
            background: linear-gradient(45deg, #00ff00, #00aa00);
            border: 2px solid #00ff00;
            color: #000;
            font-size: 2rem;
            padding: 1rem 2rem;
            border-radius: 10px;
            cursor: pointer;
            text-transform: uppercase;
            font-weight: 900;
            letter-spacing: 2px;
            transition: all 0.3s ease;
            animation: pulse 2s infinite;
            max-width: 90vw;
            word-wrap: break-word;
            white-space: normal;
        }
        
        .start-btn:hover {
            background: linear-gradient(45deg, #00aa00, #00ff00);
            box-shadow: 0 0 30px #00ff00;
            transform: scale(1.05);
        }
        
        @keyframes pulse {
            0%, 100% { box-shadow: 0 0 20px #00ff00; }
            50% { box-shadow: 0 0 40px #00ff00, 0 0 60px #00ff00; }
        }
        
        .security-panel {
            background: rgba(0, 0, 0, 0.9);
            border: 2px solid #00ff00;
            border-radius: 15px;
            padding: 2rem;
            text-align: center;
            backdrop-filter: blur(10px);
            animation: fadeIn 0.5s ease;
            max-width: 100vw;
            box-sizing: border-box;
            width: 100%;
            max-width: 500px;
            margin: 0 auto;
        }
        
        .security-title {
            color: #00ff00;
            font-size: 1.8rem;
            margin-bottom: 1rem;
            text-shadow: 0 0 20px #00ff00;
            word-break: break-word;
        }
        
        .pin-input {
            background: transparent;
            border: 2px solid #00ff00;
            color: #00ff00;
            font-size: 1.5rem;
            padding: 1rem;
            text-align: center;
            letter-spacing: 5px;
            border-radius: 10px;
            width: 100%;
            max-width: 320px;
            font-family: "Orbitron", monospace;
            box-sizing: border-box;
        }
        
        .pin-input:focus {
            outline: none;
            box-shadow: 0 0 30px #00ff00;
            background: rgba(0, 255, 0, 0.1);
        }
        
        .submit-btn {
            background: linear-gradient(45deg, #00ff00, #00aa00);
            border: none;
            color: #000;
            font-size: 1.2rem;
            padding: 0.8rem 1.5rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 700;
            text-transform: uppercase;
            margin-top: 1rem;
            transition: all 0.3s ease;
            width: 100%;
            max-width: 320px;
            box-sizing: border-box;
            word-wrap: break-word;
            white-space: normal;
        }
        
        .submit-btn:hover {
            background: linear-gradient(45deg, #00aa00, #00ff00);
            box-shadow: 0 0 20px #00ff00;
        }
        
        .command-interface {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            max-height: 100dvh;
            background: rgba(0, 0, 0, 0.95);
            z-index: 100;
            display: flex;
            flex-direction: column;
            padding: 2rem;
            box-sizing: border-box;
            overflow: hidden;
        }
        
        .command-header {
            color: #00ff00;
            font-size: 1.5rem;
            text-align: center;
            margin-bottom: 2rem;
            text-shadow: 0 0 20px #00ff00;
            word-break: break-word;
        }
        
        .terminal {
            flex: 1;
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid #00ff00;
            border-radius: 10px;
            padding: 1rem;
            font-family: "Orbitron", monospace;
            overflow-y: auto;
            margin-bottom: 1rem;
            word-break: break-word;
            white-space: pre-wrap;
            max-height: 70vh;
            min-height: 150px;
        }
        
        .command-output {
            color: #00ff00;
            font-size: 0.9rem;
            line-height: 1.4;
            white-space: pre-wrap;
            margin-bottom: 1rem;
            word-break: break-word;
        }
        
        .error-text {
            color: #ff0000;
            text-shadow: 0 0 15px #ff0000;
        }
        
        .command-input-container {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        
        .command-prompt {
            color: #00ff00;
            font-size: 1.1rem;
            font-weight: bold;
            flex-shrink: 0;
            min-width: fit-content;
            white-space: nowrap;
        }
        
        .command-input {
            flex: 1 1 auto;
            background: transparent;
            border: 2px solid #00ff00;
            color: #00ff00;
            font-size: 1rem;
            padding: 0.8rem;
            border-radius: 8px;
            font-family: "Orbitron", monospace;
            min-width: 0;
            max-width: 100%;
            box-sizing: border-box;
        }
        
        .command-input:focus {
            outline: none;
            box-shadow: 0 0 20px #00ff00;
            background: rgba(0, 255, 0, 0.05);
        }
        
        .exit-btn {
            background: linear-gradient(45deg, #ff0000, #aa0000);
            border: 2px solid #ff0000;
            color: #fff;
            font-size: 1rem;
            padding: 0.8rem 1.5rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 700;
            text-transform: uppercase;
            transition: all 0.3s ease;
            flex-shrink: 0;
            white-space: nowrap;
        }
        
        .exit-btn:hover {
            background: linear-gradient(45deg, #aa0000, #ff0000);
            box-shadow: 0 0 20px #ff0000;
        }
        
        /* Quiz System Styles */
        .quiz-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.98);
            z-index: 200;
            display: flex;
            flex-direction: column;
            padding: 2rem;
            box-sizing: border-box;
            overflow-y: auto;
        }
        
        .quiz-header {
            color: #00ff00;
            font-size: 1.8rem;
            text-align: center;
            margin-bottom: 2rem;
            text-shadow: 0 0 20px #00ff00;
            text-transform: uppercase;
        }
        
        .subjects-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }
        
        .subject-btn {
            background: linear-gradient(45deg, #00ff00, #00aa00);
            border: 2px solid #00ff00;
            color: #000;
            font-size: 1rem;
            padding: 1rem;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 700;
            text-transform: uppercase;
            transition: all 0.3s ease;
            font-family: "Orbitron", monospace;
        }
        
        .subject-btn:hover:not(.completed):not(.disabled) {
            background: linear-gradient(45deg, #00aa00, #00ff00);
            box-shadow: 0 0 20px #00ff00;
            transform: scale(1.05);
        }
        
        .subject-btn.completed {
            background: linear-gradient(45deg, #ffaa00, #ff6600);
            border-color: #ffaa00;
            color: #000;
            cursor: not-allowed;
        }
        
        .subject-btn.disabled {
            background: linear-gradient(45deg, #666, #333);
            border-color: #666;
            color: #999;
            cursor: not-allowed;
        }
        
        .question-container {
            background: rgba(0, 0, 0, 0.9);
            border: 2px solid #00ff00;
            border-radius: 15px;
            padding: 2rem;
            margin-bottom: 2rem;
            text-align: center;
        }
        
        .question-header {
            color: #00ff00;
            font-size: 1.2rem;
            margin-bottom: 1rem;
            text-shadow: 0 0 15px #00ff00;
        }
        
        .question-text {
            color: #00ff00;
            font-size: 1.1rem;
            margin-bottom: 2rem;
            line-height: 1.6;
        }
        
        .options-container {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin-bottom: 2rem;
        }
        
        .option-btn {
            background: linear-gradient(45deg, #004400, #002200);
            border: 2px solid #00ff00;
            color: #00ff00;
            font-size: 1rem;
            padding: 1rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            font-family: "Orbitron", monospace;
            text-align: left;
        }
        
        .option-btn:hover {
            background: linear-gradient(45deg, #00ff00, #00aa00);
            color: #000;
            box-shadow: 0 0 15px #00ff00;
        }
        
        .option-btn.correct {
            background: linear-gradient(45deg, #00ff00, #00aa00);
            color: #000;
            box-shadow: 0 0 20px #00ff00;
        }
        
        .option-btn.incorrect {
            background: linear-gradient(45deg, #ff0000, #aa0000);
            color: #fff;
            box-shadow: 0 0 20px #ff0000;
        }
        
        .quiz-progress {
            background: rgba(0, 0, 0, 0.9);
            border: 2px solid #00ff00;
            border-radius: 10px;
            padding: 1rem;
            margin-bottom: 2rem;
            text-align: center;
        }
        
        .progress-bar {
            background: #001100;
            border: 1px solid #00ff00;
            border-radius: 10px;
            height: 20px;
            margin: 1rem 0;
            overflow: hidden;
        }
        
        .progress-fill {
            background: linear-gradient(45deg, #00ff00, #00aa00);
            height: 100%;
            width: 0%;
            transition: width 0.3s ease;
        }
        
        .quiz-stats {
            color: #00ff00;
            font-size: 1rem;
            display: flex;
            justify-content: space-between;
            margin-bottom: 1rem;
        }
        
        .results-container {
            background: rgba(0, 0, 0, 0.9);
            border: 2px solid #00ff00;
            border-radius: 15px;
            padding: 2rem;
            text-align: center;
        }
        
        .results-header {
            color: #00ff00;
            font-size: 2rem;
            margin-bottom: 2rem;
            text-shadow: 0 0 20px #00ff00;
            text-transform: uppercase;
        }
        
        .chart-container {
            height: 400px;
            margin: 2rem 0;
        }
        
        .total-score {
            color: #00ff00;
            font-size: 1.5rem;
            margin: 2rem 0;
            text-shadow: 0 0 15px #00ff00;
        }
        
        .replay-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
            margin-top: 2rem;
        }
        
        .replay-btn {
            background: linear-gradient(45deg, #00ff00, #00aa00);
            border: 2px solid #00ff00;
            color: #000;
            font-size: 1.1rem;
            padding: 1rem 2rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 700;
            text-transform: uppercase;
            transition: all 0.3s ease;
            font-family: "Orbitron", monospace;
        }
        
        .replay-btn:hover {
            background: linear-gradient(45deg, #00aa00, #00ff00);
            box-shadow: 0 0 20px #00ff00;
        }
        
        .replay-btn.no {
            background: linear-gradient(45deg, #ff0000, #aa0000);
            border-color: #ff0000;
            color: #fff;
        }
        
        .replay-btn.no:hover {
            background: linear-gradient(45deg, #aa0000, #ff0000);
            box-shadow: 0 0 20px #ff0000;
        }
        
        .alert-mode {
            background: #ff0000 !important;
            color: #fff !important;
        }
        
        .alert-mode .pin-input {
            border-color: #ff0000;
            color: #ff0000;
        }
        
        .alert-mode .security-title {
            color: #ff0000;
            text-shadow: 0 0 20px #ff0000;
        }
        
        .hidden {
            display: none !important;
        }
        
        .fade-in {
            animation: fadeIn 0.5s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-50px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .warning-text {
            color: #ff0000;
            font-size: 1.2rem;
            margin-top: 1rem;
            text-shadow: 0 0 15px #ff0000;
            animation: blink 1s infinite;
            word-wrap: break-word;
            white-space: normal;
            max-width: 320px;
            margin-left: auto;
            margin-right: auto;
        }
        
        @keyframes blink {
            0%, 50% { opacity: 1; }
            51%, 100% { opacity: 0; }
        }
        
        .game-disclaimer {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            color: #00ff00;
            font-size: 0.8rem;
            text-align: center;
            opacity: 0.7;
            z-index: 100;
            max-width: 90vw;
            word-wrap: break-word;
        }
        
        /* Responsive Design */
        @media (max-width: 640px) {
            .start-btn { font-size: 1.4rem; padding: 0.8rem 1.4rem; }
            .pin-input { font-size: 1.2rem; width: 100%; max-width: 280px; }
            .security-title { font-size: 1.4rem; }
            .command-header { font-size: 1.2rem; margin-bottom: 1.5rem; }
            .terminal { max-height: 50vh; font-size: 0.8rem; margin-bottom: 0.7rem; }
            .command-output { font-size: 0.8rem; }
            .command-input { font-size: 0.9rem; }
            .exit-btn { font-size: 0.9rem; padding: 0.6rem 1rem; }
            .subjects-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
            .quiz-header { font-size: 1.4rem; }
            .replay-buttons { flex-direction: column; }
        }
        
        @media (min-width: 641px) and (max-width: 1024px) {
            .start-btn { font-size: 1.6rem; padding: 0.9rem 1.8rem; }
            .pin-input { font-size: 1.4rem; max-width: 300px; }
            .subjects-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
        }
        
        @media (orientation: landscape) and (max-height: 480px) {
            .game-container { padding: 0 0.5rem; }
            .security-panel { padding: 1rem 1.5rem; }
            .command-interface { padding: 1rem 1.5rem; }
            .terminal { max-height: 50vh; }
            .quiz-container { padding: 1rem; }
        }
        
        .chart-container {
    height: 400px;
    margin: 2rem 0;
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff00;
    border-radius: 10px;
    padding: 1rem;
}

#resultsChart {
    max-height: 350px !important;
    width: 100% !important;
}

/* Mobile responsive chart */
@media (max-width: 640px) {
    .chart-container {
        height: 300px;
        padding: 0.5rem;
    }
    
    #resultsChart {
        max-height: 250px !important;
    }
}
/* Enhanced File Upload Styles */
.file-upload-container {
    position: relative;
    display: inline-block;
    margin-left: 10px;
}

.file-upload-btn {
    background: linear-gradient(45deg, #00ff00, #00cc00, #00ff00);
    background-size: 300% 300%;
    color: #000;
    border: 2px solid #00ff00;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    animation: pulse-glow 2s infinite alternate;
}

.file-upload-btn::before {
    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.6s;
}

.file-upload-btn:hover {
    background: linear-gradient(45deg, #00cc00, #00ff00, #00cc00);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.6), 0 0 80px rgba(0, 255, 0, 0.3);
    animation: matrix-flicker 0.1s infinite;
}

.file-upload-btn:hover::before {
    left: 100%;
}

.file-upload-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
}

.file-upload-input {
    display: none;
}

.file-upload-progress {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 12px;
    color: #00ff00;
    display: none;
    white-space: nowrap;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    animation: upload-pulse 1s infinite;
    min-width: 150px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.file-upload-progress::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #00ff00;
}

.file-upload-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
    animation: scanning 2s infinite;
}

/* Keyframe Animations */
@keyframes pulse-glow {
    0% { 
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    }
    100% { 
        box-shadow: 0 0 30px rgba(0, 255, 0, 0.6), 0 0 50px rgba(0, 255, 0, 0.2);
    }
}

@keyframes matrix-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

@keyframes upload-pulse {
    0%, 100% { 
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    }
    50% { 
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 0 30px rgba(0, 255, 0, 0.8), 0 0 50px rgba(0, 255, 0, 0.3);
    }
}

@keyframes scanning {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Enhanced command input container to accommodate the new button */
.command-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 50px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .file-upload-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .file-upload-progress {
        font-size: 10px;
        padding: 6px 12px;
        min-width: 120px;
    }
    
    .command-input-container {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .file-upload-container {
        margin-left: 5px;
    }
    
    .file-upload-btn {
        padding: 6px 10px;
        font-size: 12px;
        gap: 5px;
    }
    
    .file-upload-progress {
        top: -30px;
        font-size: 9px;
        padding: 4px 8px;
        min-width: 100px;
    }
}
