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

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    min-height: 100vh;
    padding: 20px;
}

.learn-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.header h1 {
    color: #ff6b6b;
    font-size: 2.5em;
    text-shadow: 3px 3px 0px #ffd93d;
    margin-bottom: 20px;
}

.btn-back {
    position: absolute;
    top: 0;
    right: 0;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    transition: transform 0.2s;
}

.btn-back:hover {
    transform: scale(1.05);
}

.characters-small {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
}

.char-small {
    width: 100px;
    height: 100px;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

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

.lesson-area {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 40px;
    min-height: 500px;
}

.lesson-step h2 {
    color: #2d3561;
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 30px;
}

.step-content {
    font-size: 1.8em;
    color: #2d3561;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 30px;
}

.visual-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    min-height: 250px;
    flex-wrap: wrap;
}

.number-display-big {
    font-size: 8em;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 5px 5px 0px #ffd93d;
}

.blocks-display {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.block-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.block-group-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #2d3561;
}

.blocks-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 300px;
}

.learn-block {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    color: white;
    animation: popIn 0.4s ease-out;
}

.learn-block-ten {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.learn-block-one {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

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

.equation {
    font-size: 3em;
    font-weight: bold;
    color: #2d3561;
    text-align: center;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}

.btn {
    padding: 15px 30px;
    font-size: 1.3em;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    transition: transform 0.2s;
}

.btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-nav {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

#step-indicator {
    font-size: 1.5em;
    font-weight: bold;
    color: #2d3561;
}

.speech-bubble {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 4px solid #ff6b6b;
    border-radius: 25px;
    padding: 20px 40px;
    font-size: 1.5em;
    font-weight: bold;
    color: #2d3561;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: none;
    z-index: 1000;
}

.speech-bubble.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.interactive-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.counter-display {
    font-size: 5em;
    font-weight: bold;
    color: #ff6b6b;
}

.counter-blocks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 400px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .btn-back {
        position: static;
        margin-top: 10px;
    }
    
    .lesson-area {
        padding: 20px;
    }
    
    .step-content {
        font-size: 1.4em;
    }
}
