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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    min-height: 100vh;
}

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

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo h1 {
    background: linear-gradient(45deg, #6461a2, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: bold;
}

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

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

.nav-links a:hover {
    color: #4f46e5;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 0 2rem;
    margin-top: 80px;
}

.hero-content {
    flex: 1;
    max-width: 500px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #60a5fa, #34d399, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #cbd5e1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cta-button {
    background: linear-gradient(45deg, #4f46e5, #06b6d4);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-animation {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.terminal-window {
    width: 400px;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: float 3s ease-in-out infinite;
}

.terminal-header {
    background: #2d2d2d;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca3f; }

.terminal-body {
    padding: 20px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
}

.code-line {
    color: #00ff00;
    margin-bottom: 8px;
    animation: typewriter 0.8s ease-in-out;
}

.code-line:nth-child(2) { animation-delay: 1s; }
.code-line:nth-child(3) { animation-delay: 2s; }

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

/* Features Section */
.features {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Specs Section */
.specs {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.specs h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.spec-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.spec-item h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.spec-item p {
    color: rgba(255, 255, 255, 0.9);
}

/* Games Section */
.games {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.games h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.game-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #4f46e5;
}

.game-card p {
    color: #666;
    line-height: 1.6;
}

/* Feature Card Enhancements */
.feature-demo {
    margin-top: 1rem;
}

.demo-btn {
    background: linear-gradient(45deg, #4f46e5, #06b6d4);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

/* Demo Section */
.demo-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.demo-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

/* Custom Counter Component */
.code-preview {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
}

/* Modern Button Styles */
.modern-btn {
    background: linear-gradient(45deg, #10b981, #06b6d4);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 5px;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* Fact Box */
.fact-box {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    min-height: 60px;
    display: flex;
    align-items: center;
    font-style: italic;
}

/* Animation Demo */
.morphing-shape {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 10px;
    margin: 20px auto;
    transition: all 0.5s ease;
    cursor: pointer;
}

/* Real-time Demo */
.live-clock {
    font-size: 2rem;
    font-weight: bold;
    color: #4f46e5;
    text-align: center;
    margin-bottom: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.battery-status {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
}

/* Playground Section */
.playground {
    padding: 80px 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
}

.playground-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    height: 500px;
}

@media (max-width: 1024px) {
    .playground-area {
        height: 400px;
        gap: 1.5rem;
    }
}

.code-editor, .output-panel {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.editor-header, .output-header {
    background: #2d2d2d;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.run-btn, .clear-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.run-btn:hover, .clear-btn:hover {
    background: #059669;
}

#codeEditor {
    width: 100%;
    height: calc(100% - 60px);
    background: #1e1e1e;
    color: #e5e7eb;
    border: none;
    padding: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    resize: none;
    outline: none;
}

.output-area {
    padding: 16px;
    height: calc(100% - 60px);
    overflow-y: auto;
    background: #0f172a;
}

.examples-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.example-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.example-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Animations */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes typewriter {
    0% { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    25% { filter: hue-rotate(90deg); }
    50% { filter: hue-rotate(180deg); }
    75% { filter: hue-rotate(270deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .terminal-window {
        width: 300px;
        margin-top: 2rem;
    }
    
    .features-grid,
    .specs-grid,
    .demo-grid {
        grid-template-columns: 1fr;
    }
    
    /* Playground Responsive */
    .playground {
        padding: 40px 0;
    }
    
    .playground-area {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1rem;
    }
    
    .code-editor, .output-panel {
        height: 300px;
    }
    
    #codeEditor {
        height: calc(100% - 50px);
        font-size: 12px;
    }
    
    .output-area {
        height: calc(100% - 50px);
    }
    
    .examples-row {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .example-btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .editor-header, .output-header {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .run-btn, .clear-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .playground {
        padding: 30px 0;
    }
    
    .code-editor, .output-panel {
        height: 250px;
    }
    
    .terminal-window {
        width: 250px;
    }
    
    .feature-card, .demo-card {
        padding: 1.5rem;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
}