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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
            min-height: 100vh;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }

        /* Анимированный фон */
        .floating-shapes {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
        }

        .shape {
            position: absolute;
            opacity: 0.1;
            animation: float 20s infinite linear;
        }

        .shape:nth-child(1) { background: #ff6b6b; width: 100px; height: 100px; border-radius: 50%; top: 10%; left: 5%; animation-delay: 0s; }
        .shape:nth-child(2) { background: #4ecdc4; width: 150px; height: 150px; border-radius: 30% 70% 70% 30%; top: 60%; left: 80%; animation-delay: -5s; }
        .shape:nth-child(3) { background: #45b7d1; width: 80px; height: 80px; border-radius: 20px; top: 20%; left: 90%; animation-delay: -10s; }
        .shape:nth-child(4) { background: #96ceb4; width: 120px; height: 120px; border-radius: 60% 40% 30% 70%; top: 80%; left: 10%; animation-delay: -15s; }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            25% { transform: translateY(-20px) rotate(90deg); }
            50% { transform: translateY(0px) rotate(180deg); }
            75% { transform: translateY(20px) rotate(270deg); }
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: 0 20px 50px rgba(0,0,0,0.3);
            overflow: hidden;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            position: relative;
        }

        .header {
            background: linear-gradient(135deg, #2c3e50, #3498db);
            color: white;
            padding: 40px 30px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .header::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
            animation: shine 3s infinite;
        }

        @keyframes shine {
            0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
            100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
        }

        .header h1 {
            font-size: 3em;
            margin-bottom: 15px;
            text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
            background: linear-gradient(45deg, #fff, #f1c40f);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: titleGlow 2s ease-in-out infinite alternate;
        }

        @keyframes titleGlow {
            from { text-shadow: 3px 3px 6px rgba(0,0,0,0.3); }
            to { text-shadow: 3px 3px 20px rgba(241, 196, 15, 0.6); }
        }

        .progress-container {
            background: rgba(255,255,255,0.2);
            border-radius: 10px;
            padding: 15px;
            margin: 20px 0;
        }

        .progress-bar {
            height: 15px;
            background: #34495e;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
        }

        .progress {
            height: 100%;
            background: linear-gradient(90deg, #e74c3c, #f39c12);
            width: 0%;
            transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
        }

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

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

        .level-indicator {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            color: white;
            font-weight: bold;
        }

        .quest-content {
            padding: 40px;
            min-height: 500px;
        }

        .challenge {
            display: none;
            animation: slideIn 0.6s ease-out;
        }

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

        .challenge.active {
            display: block;
        }

        .challenge-header {
            display: flex;
            align-items: center;
            margin-bottom: 30px;
            padding: 20px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-radius: 15px;
            color: white;
            box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        }

        .challenge-icon {
            font-size: 3em;
            margin-right: 20px;
            animation: bounce 2s infinite;
        }

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

        .task {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            padding: 25px;
            border-radius: 15px;
            margin: 25px 0;
            border-left: 6px solid #3498db;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
        }

        .task:hover {
            transform: translateY(-5px);
        }

        .code-editor {
            background: #1e272e;
            color: #f7f7f7;
            padding: 20px;
            border-radius: 12px;
            margin: 20px 0;
            font-family: 'Fira Code', 'Courier New', monospace;
            min-height: 120px;
            border: 2px solid #3498db;
            position: relative;
            overflow: hidden;
        }

        .code-editor::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 30px;
            background: rgba(52, 152, 219, 0.1);
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .input-group {
            margin: 25px 0;
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        input, select {
            flex: 1;
            min-width: 200px;
            padding: 15px;
            border: 2px solid #bdc3c7;
            border-radius: 10px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: white;
        }

        input:focus, select:focus {
            border-color: #3498db;
            box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
            transform: scale(1.02);
        }

        button {
            padding: 15px 25px;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .btn-primary {
            background: linear-gradient(135deg, #e74c3c, #e67e22);
            color: white;
            box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
        }

        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(231, 76, 60, 0.6);
        }

        .btn-secondary {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
        }

        .btn-secondary:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
        }

        .feedback {
            padding: 20px;
            border-radius: 12px;
            margin: 20px 0;
            display: none;
            animation: popIn 0.5s ease;
            border-left: 6px solid;
        }

        @keyframes popIn {
            0% { transform: scale(0.8); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }

        .feedback.success {
            background: linear-gradient(135deg, #d4edda, #c3e6cb);
            color: #155724;
            border-left-color: #28a745;
            display: block;
        }

        .feedback.error {
            background: linear-gradient(135deg, #f8d7da, #f5c6cb);
            color: #721c24;
            border-left-color: #dc3545;
            display: block;
        }

        .hint {
            background: linear-gradient(135deg, #fff3cd, #ffeaa7);
            color: #856404;
            padding: 15px;
            border-radius: 10px;
            margin: 15px 0;
            border-left: 4px solid #ffc107;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.8; }
        }

        .completion {
            text-align: center;
            padding: 60px 30px;
            display: none;
            background: linear-gradient(135deg, #27ae60, #2ecc71);
            color: white;
            border-radius: 20px;
            margin: 20px 0;
            animation: celebration 1s ease;
        }

        @keyframes celebration {
            0% { transform: scale(0); }
            70% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        .badge {
            font-size: 6em;
            margin: 20px 0;
            animation: spin 3s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg) scale(1); }
            50% { transform: rotate(180deg) scale(1.2); }
            100% { transform: rotate(360deg) scale(1); }
        }

        .confetti {
            position: fixed;
            width: 10px;
            height: 10px;
            background: #f00;
            animation: confettiFall 5s linear forwards;
        }

        @keyframes confettiFall {
            0% { 
                transform: translateY(-100px) rotate(0deg); 
                opacity: 1;
            }
            100% { 
                transform: translateY(100vh) rotate(720deg); 
                opacity: 0;
            }
        }

        /* Адаптивность */
        @media (max-width: 768px) {
            .header h1 { font-size: 2em; }
            .challenge-header { flex-direction: column; text-align: center; }
            .challenge-icon { margin-right: 0; margin-bottom: 15px; }
            .input-group { flex-direction: column; }
            input, select { min-width: auto; }
        }
