* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1100px;
    width: 100%;
    position: relative;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 32px;
}

.story-box {
    background: #e3f2fd;
    border-left: 5px solid #2196f3;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.story-box p {
    color: #555;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 10px;
}

.story-box p:last-child {
    margin-bottom: 0;
}

.story-box .question {
    color: #1565c0;
    font-weight: bold;
    font-size: 17px;
    margin-top: 15px;
}

/* Computer Scene */
.computer-scene {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.student-with-computer {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.student-char {
    text-align: center;
}

.student-avatar {
    font-size: 100px;
    animation: typing-bob 2s ease-in-out infinite;
}

@keyframes typing-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.student-label {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    background: #4caf50;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
}

.computer-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.monitor {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.screen {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    width: 450px;
    height: 320px;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 8px solid #2c3e50;
    position: relative;
}

.screen-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
}

.school-logo {
    font-size: 30px;
}

.school-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.storage-visualization {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.storage-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

.storage-bar {
    display: flex;
    width: 100%;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.storage-used {
    width: 40%;
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    border-right: 3px solid white;
}

.storage-free {
    width: 60%;
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
}

.storage-label {
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.storage-total {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #555;
}

.programs-installed {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.program-icon {
    font-size: 35px;
    animation: icon-pulse 2s ease-in-out infinite;
}

.program-icon:nth-child(2) { animation-delay: 0.3s; }
.program-icon:nth-child(3) { animation-delay: 0.6s; }
.program-icon:nth-child(4) { animation-delay: 0.9s; }

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.monitor-stand {
    width: 100px;
    height: 40px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-radius: 0 0 15px 15px;
    margin-top: -5px;
}

.keyboard {
    display: flex;
    gap: 8px;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    padding: 15px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.key {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* Calculation Helper */
.calculation-helper {
    background: #fff3e0;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
}

.calculation-helper h3 {
    color: #e65100;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
}

.helper-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.helper-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 3px solid #2196f3;
}

.helper-card:hover {
    transform: translateY(-5px);
}

.helper-card.used-card {
    border-color: #f44336;
}

.helper-card.free-card {
    border-color: #4caf50;
}

.helper-card.fraction-card {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
}

.card-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 14px;
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
}

.card-value {
    font-size: 18px;
    font-weight: bold;
    color: #1565c0;
}

/* Answer Section */
.answer-section {
    margin: 30px 0;
    text-align: center;
}

.answer-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.instruction {
    color: #555;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: bold;
}

.input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

#answerInput {
    width: 300px;
    padding: 18px 25px;
    font-size: 28px;
    font-weight: bold;
    border: 3px solid #2196f3;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

#answerInput:focus {
    outline: none;
    border-color: #1565c0;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
    transform: scale(1.05);
}

#answerInput.correct {
    border-color: #4caf50;
    background: #e8f5e9;
}

#answerInput.incorrect {
    animation: shake-input 0.5s ease;
}

@keyframes shake-input {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.hint {
    color: #ff9800;
    font-size: 14px;
    font-style: italic;
    margin-top: 10px;
}

/* Buttons */
.button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0 20px 0;
}

button {
    background: #4caf50;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

button:active {
    transform: translateY(0);
}

.feedback {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    min-height: 30px;
    margin: 20px 0;
}

.feedback.success {
    color: #4caf50;
}

.feedback.error {
    color: #f44336;
}

.feedback.warning {
    color: #ff9800;
}

.info-box {
    background: #e8f5e9;
    border-left: 5px solid #4caf50;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.info-box h3 {
    color: #2e7d32;
    margin-bottom: 10px;
    font-size: 18px;
}

.info-box p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
}

.info-box ul {
    margin: 10px 0;
    padding-left: 25px;
}

.info-box li {
    color: #555;
    line-height: 1.8;
    margin-bottom: 8px;
}

.final-answer-display {
    background: #c8e6c9;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-top: 15px;
}

.final-answer {
    background: #4caf50;
    padding: 5px 15px;
    border-radius: 8px;
    font-weight: bold;
    color: white;
    font-size: 24px;
}

/* Thumbs Up Animation */
.thumbs-up-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.thumbs-up-animation.active {
    display: block;
}

.thumb-emoji {
    position: absolute;
    font-size: 80px;
    animation: thumbsUp 1.5s ease-out forwards;
    opacity: 0;
}

.thumb-emoji:nth-child(1) {
    left: 15%;
    top: 25%;
    animation-delay: 0s;
}

.thumb-emoji:nth-child(2) {
    left: 45%;
    top: 15%;
    animation-delay: 0.2s;
}

.thumb-emoji:nth-child(3) {
    left: 75%;
    top: 30%;
    animation-delay: 0.4s;
}

.thumb-emoji:nth-child(4) {
    left: 30%;
    top: 55%;
    animation-delay: 0.6s;
}

.thumb-emoji:nth-child(5) {
    left: 65%;
    top: 60%;
    animation-delay: 0.8s;
}

.thumb-emoji:nth-child(6) {
    left: 85%;
    top: 45%;
    animation-delay: 1s;
}

.thumb-emoji:nth-child(7) {
    left: 20%;
    top: 75%;
    animation-delay: 1.2s;
}

.thumb-emoji:nth-child(8) {
    left: 55%;
    top: 80%;
    animation-delay: 1.4s;
}

@keyframes thumbsUp {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(0) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: scale(1.3) translateY(-30px) rotate(10deg);
    }
    40% {
        transform: scale(1) translateY(-50px) rotate(-5deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-120px) rotate(15deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .computer-scene {
        padding: 20px;
    }

    .student-with-computer {
        flex-direction: column;
    }

    .student-avatar {
        font-size: 70px;
    }

    .screen {
        width: 350px;
        height: 280px;
        padding: 15px;
    }

    .helper-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    #answerInput {
        width: 250px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .story-box {
        padding: 15px;
    }

    .screen {
        width: 280px;
        height: 240px;
    }

    .school-text {
        font-size: 14px;
    }

    .storage-bar {
        height: 60px;
    }

    .program-icon {
        font-size: 25px;
    }

    .keyboard {
        gap: 5px;
        padding: 10px 20px;
    }

    .key {
        width: 35px;
        height: 35px;
    }

    .helper-cards {
        grid-template-columns: 1fr;
    }

    #answerInput {
        width: 200px;
        font-size: 20px;
        padding: 15px;
    }
}
