* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Monaco', 'Consolas', monospace;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .game-container {
            background: white;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            max-width: 1000px;
            width: 100%;
        }

        .game-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .game-title {
            font-size: 2.5em;
            font-weight: 700;
            color: #2d3436;
            margin-bottom: 10px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .game-subtitle {
            color: #636e72;
            font-size: 1.1em;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .game-info {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 15px;
            margin: 20px 0;
            font-weight: bold;
            color: #2d3436;
            font-size: 1em;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .info-item {
            text-align: center;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 10px;
        }

        .score-info {
            color: #e74c3c;
        }

        .level-info {
            color: #9b59b6;
        }

        .lesson-info {
            color: #3498db;
        }

        .challenge-card {
            background: #f8f9fa;
            padding: 25px;
            border-radius: 15px;
            margin: 20px 0;
        }

        .challenge-title {
            font-size: 1.4em;
            font-weight: 600;
            color: #2d3436;
            margin-bottom: 15px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .challenge-description {
            color: #636e72;
            line-height: 1.6;
            margin-bottom: 20px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .code-editor {
            background: #2d3748;
            color: #e2e8f0;
            padding: 20px;
            border-radius: 10px;
            font-family: 'Monaco', 'Consolas', monospace;
            font-size: 14px;
            line-height: 1.5;
            margin: 15px 0;
            min-height: 200px;
            position: relative;
            overflow-x: auto;
        }

        .code-input {
            width: 100%;
            background: transparent;
            border: none;
            color: #e2e8f0;
            font-family: 'Monaco', 'Consolas', monospace;
            font-size: 14px;
            line-height: 1.5;
            resize: vertical;
            min-height: 120px;
            outline: none;
        }

        .code-example {
            background: #1a202c;
            color: #68d391;
            padding: 15px;
            border-radius: 8px;
            margin: 10px 0;
            font-family: 'Monaco', 'Consolas', monospace;
            font-size: 13px;
            line-height: 1.4;
            border-left: 4px solid #9b59b6;
        }

        .code-output {
            background: #1a365d;
            color: #63b3ed;
            padding: 15px;
            border-radius: 8px;
            margin: 10px 0;
            font-family: 'Monaco', 'Consolas', monospace;
            font-size: 13px;
            min-height: 80px;
            border-left: 4px solid #3182ce;
        }

        .game-controls {
            text-align: center;
            margin: 20px 0;
        }

        .control-button {
            padding: 12px 25px;
            background: #9b59b6;
            color: white;
            border: none;
            border-radius: 25px;
            font-size: 1em;
            font-weight: 600;
            cursor: pointer;
            margin: 0 10px;
            transition: all 0.3s ease;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .control-button:hover {
            background: #8e44ad;
            transform: translateY(-2px);
        }

        .control-button:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
        }

        .control-button.run-button {
            background: #27ae60;
        }

        .control-button.run-button:hover {
            background: #229954;
        }

        .control-button.hint-button {
            background: #f39c12;
        }

        .control-button.hint-button:hover {
            background: #e67e22;
        }

        .message {
            text-align: center;
            padding: 15px;
            border-radius: 10px;
            margin: 15px 0;
            font-weight: bold;
            display: none;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .message.show {
            display: block;
        }

        .message.success {
            background: #d5f4e6;
            color: #00b894;
        }

        .message.error {
            background: #ffeaa7;
            color: #e17055;
        }

        .message.final {
            background: #a29bfe;
            color: white;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: #ddd;
            border-radius: 4px;
            margin: 20px 0;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: #9b59b6;
            width: 0%;
            transition: width 0.3s ease;
        }

        .lesson-selector {
            text-align: center;
            margin: 20px 0;
        }

        .lesson-button {
            padding: 10px 20px;
            background: #ddd;
            color: #2d3436;
            border: none;
            border-radius: 20px;
            margin: 5px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            font-size: 0.9em;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .lesson-button.active {
            background: #9b59b6;
            color: white;
        }

        .lesson-button:hover {
            transform: translateY(-2px);
        }

        .hint-box {
            background: #e8f4f8;
            padding: 15px;
            border-radius: 10px;
            margin: 15px 0;
            display: none;
            border-left: 4px solid #3498db;
        }

        .hint-box.show {
            display: block;
        }

        .hint-text {
            color: #2980b9;
            font-style: italic;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .syntax-highlight .keyword {
            color: #ff79c6;
            font-weight: bold;
        }

        .syntax-highlight .string {
            color: #f1fa8c;
        }

        .syntax-highlight .number {
            color: #bd93f9;
        }

        .syntax-highlight .comment {
            color: #6272a4;
            font-style: italic;
        }

        .syntax-highlight .function {
            color: #50fa7b;
        }

        @media (max-width: 768px) {
            .game-container {
                padding: 20px;
                margin: 10px;
            }

            .game-info {
                grid-template-columns: repeat(2, 1fr);
            }

            .game-title {
                font-size: 2em;
            }

            .code-editor {
                font-size: 12px;
                padding: 15px;
            }

            .control-button {
                padding: 10px 20px;
                font-size: 0.9em;
                margin: 5px;
            }
        }