* {
    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: 1000px;
    width: 100%;
    position: relative;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 32px;
}

/* Story Box */
.story-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 5px solid #4caf50;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.story-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.icon {
    font-size: 50px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.header-text strong {
    color: #2e7d32;
    font-size: 20px;
    display: block;
}

.header-text p {
    color: #666;
    font-size: 14px;
    margin-top: 3px;
}

.story-text {
    color: #333;
    line-height: 1.8;
    font-size: 16px;
    text-align: center;
}

.story-text strong {
    color: #2e7d32;
}

/* Harvest Display */
.harvest-display {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin: 30px 0;
}

.harvest-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.harvest-card.maize {
    border: 3px solid #fbc02d;
}

.harvest-card.beans {
    border: 3px solid #8d6e63;
}

.card-header {
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.maize .card-header {
    background: linear-gradient(135deg, #fbc02d 0%, #f9a825 100%);
}

.beans .card-header {
    background: linear-gradient(135deg, #8d6e63 0%, #6d4c41 100%);
}

.crop-icon {
    font-size: 32px;
}

.crop-name {
    font-size: 18px;
    font-weight: bold;
}

.harvest-body {
    padding: 25px;
    text-align: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #fffde7 100%);
}

.bags-icon {
    font-size: 40px;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.quantity {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.weight {
    font-size: 16px;
    color: #666;
}

.plus-sign {
    font-size: 50px;
    color: #4caf50;
    font-weight: bold;
    text-align: center;
}

/* Questions Section */
.questions-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 30px 0;
}

.question-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 3px solid #1976d2;
    border-radius: 15px;
    padding: 25px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.question-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1976d2;
}

.q-icon {
    font-size: 32px;
}

.q-label {
    font-size: 20px;
    font-weight: bold;
    color: #0d47a1;
}

.question-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.question-text {
    color: #333;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
}

.question-content label {
    font-size: 18px;
    font-weight: bold;
    color: #1565c0;
    text-align: center;
}

.question-content input {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 15px;
    font-size: 20px;
    text-align: center;
    border: 3px solid #1976d2;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.question-content input:focus {
    border-color: #0d47a1;
    box-shadow: 0 0 10px rgba(25, 118, 210, 0.3);
}

.question-content input.blink-green {
    animation: blink-green 0.6s ease;
}

.question-content input.blink-red {
    animation: blink-red 0.6s ease;
}

@keyframes blink-green {
    0%, 100% { background: white; border-color: #1976d2; }
    50% { background: #4caf50; border-color: #2e7d32; color: white; }
}

@keyframes blink-red {
    0%, 100% { background: white; border-color: #1976d2; }
    50% { background: #f44336; border-color: #c62828; color: white; }
}

.question-content button {
    width: 200px;
    margin: 0 auto;
    padding: 15px 30px;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.question-content button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.question-content button:active {
    transform: translateY(0);
}

.question-content button:disabled {
    background: #9e9e9e;
    cursor: not-allowed;
    transform: none;
}

/* Feedback */
.feedback {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    min-height: 25px;
    margin-top: 15px;
}

.feedback.success {
    color: #4caf50;
}

.feedback.error {
    color: #f44336;
}

/* Reset Button */
.reset-btn {
    display: block;
    margin: 20px auto;
    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;
}

.reset-btn:hover {
    background: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Balloons Animation */
.balloons-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.balloons-animation.active {
    display: block;
}

.balloon {
    position: absolute;
    bottom: -100px;
    font-size: 60px;
    animation: rise 4s ease-out forwards;
    opacity: 0;
}

@keyframes rise {
    0% {
        bottom: -100px;
        opacity: 0;
        transform: translateX(0) rotate(0deg);
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateX(20px) rotate(10deg);
    }
    100% {
        bottom: 120%;
        opacity: 0;
        transform: translateX(-20px) rotate(-10deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .harvest-display {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .plus-sign {
        transform: rotate(0deg);
    }

    .question-content input {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 22px;
    }

    .story-text {
        font-size: 14px;
    }

    .quantity {
        font-size: 24px;
    }

    .question-text {
        font-size: 16px;
    }

    .question-content input {
        font-size: 16px;
        padding: 12px;
    }
}
