* {
    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 100%);
    min-height: 100vh;
    color: #333;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.trial-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

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

.feature-card h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

/* Pricing */
.pricing {
    background: white;
    padding: 4rem 2rem;
    text-align: center;
}

.pricing h2 {
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    position: relative;
}

.pricing-card.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #ffd700;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    margin: 1rem 0;
}

.price span {
    font-size: 1rem;
    opacity: 0.8;
}

.pricing-card ul {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.pricing-card li {
    padding: 0.5rem 0;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #667eea;
}

.auth-container input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.auth-container input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-container button {
    width: 100%;
    margin-top: 1rem;
}

.auth-container p {
    text-align: center;
    margin-top: 1rem;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #667eea;
    text-decoration: none;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.welcome-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.welcome-section h1 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.lesson-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.lesson-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.lesson-card h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.lesson-card .difficulty {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e0e0e0;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* AI Tutor */
.ai-tutor {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 1000;
}

.tutor-header {
    background: #667eea;
    color: white;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.tutor-content {
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.message {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    max-width: 80%;
}

.message.ai {
    background: #f0f0f0;
    margin-right: auto;
}

.message.user {
    background: #667eea;
    color: white;
    margin-left: auto;
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
}

.chat-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-right: 0.5rem;
}

.chat-input button {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Lesson Page */
.lesson-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem 2rem;
}

.lesson-content {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.lesson-main {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.code-blocks-workspace {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.blocks-container {
    min-height: 200px;
    background: white;
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .ai-tutor {
        width: calc(100% - 40px);
        right: 20px;
    }
}