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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 40px 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

nav {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: bold;
    font-size: 1.2em;
    color: #4CAF50;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #4CAF50;
}

.game-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.level-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.level-btn {
    padding: 12px 24px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.level-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.level-btn.active {
    background: #4CAF50;
    color: white;
}

.level-btn.locked {
    background: #ddd;
    cursor: not-allowed;
    opacity: 0.6;
}

.level-content {
    display: none;
}

.level-content.active {
    display: block;
}

.level-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4CAF50;
}

.level-title {
    font-size: 1.8em;
    color: #4CAF50;
    margin-bottom: 10px;
}

.level-description {
    color: #666;
}

.learning-objectives {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.learning-objectives h3 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.learning-objectives ul {
    margin-left: 20px;
}

.code-example {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.code-example pre {
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.challenge {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #4CAF50;
}

.challenge h3 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.challenge-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.submit-btn {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #45a049;
}

.feedback {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.progress-bar {
    background: #f0f0f0;
    border-radius: 20px;
    height: 20px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    background: #4CAF50;
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 20px;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #666;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}
