* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 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: 900px;
    width: 100%;
    position: relative;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 32px;
}

/* Story Box */
.story-box {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    border-left: 5px solid #c2185b;
    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: #880e4f;
    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: 18px;
    text-align: center;
}

.story-text strong {
    color: #c2185b;
}

/* Equation Display */
.equation-display {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    color: #c2185b;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 25px 0;
    border: 3px solid #ff6f00;
    font-family: 'Courier New', monospace;
}

/* Table Section */
.table-section {
    margin: 30px 0;
    overflow-x: auto;
}

.values-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.values-table th {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    padding: 15px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    border: 2px solid #c2185b;
}

.values-table td {
    padding: 10px;
    text-align: center;
    border: 2px solid #e91e63;
}

.values-table tbody th {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
}

.y-input {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border: 3px solid #e91e63;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
}

.y-input:focus {
    outline: none;
    border-color: #c2185b;
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.3);
    transform: scale(1.05);
}

.y-input.correct {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.y-input.incorrect {
    border-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    animation: shake 0.5s ease-in-out;
}

.y-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Submit Button */
.submit-btn {
    display: block;
    margin: 30px auto 20px;
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #c2185b 0%, #880e4f 100%);
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(233, 30, 99, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Feedback */
.feedback {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    min-height: 30px;
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
}

.feedback.success {
    color: #4caf50;
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
}

.feedback.error {
    color: #f44336;
    background: linear-gradient(135deg, #ffcdd2 0%, #ef9a9a 100%);
}

/* Thumbs Up Animation */
.thumbs-up-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.thumbs-up-container.active {
    display: block;
}

.thumbs-up {
    position: absolute;
    font-size: 60px;
    opacity: 0;
    animation: riseUp 2s ease-out forwards;
}

.thumbs-up:nth-child(1) { left: 10%; animation-delay: 0s; }
.thumbs-up:nth-child(2) { left: 20%; animation-delay: 0.2s; }
.thumbs-up:nth-child(3) { left: 30%; animation-delay: 0.4s; }
.thumbs-up:nth-child(4) { left: 40%; animation-delay: 0.6s; }
.thumbs-up:nth-child(5) { left: 50%; animation-delay: 0.8s; }
.thumbs-up:nth-child(6) { left: 60%; animation-delay: 1s; }
.thumbs-up:nth-child(7) { left: 70%; animation-delay: 1.2s; }
.thumbs-up:nth-child(8) { left: 80%; animation-delay: 1.4s; }
.thumbs-up:nth-child(9) { left: 90%; animation-delay: 1.6s; }
.thumbs-up:nth-child(10) { left: 15%; animation-delay: 1.8s; }

@keyframes riseUp {
    0% {
        bottom: -100px;
        opacity: 0;
        transform: translateY(0) rotate(0deg);
    }
    50% {
        opacity: 1;
    }
    100% {
        bottom: 120%;
        opacity: 0;
        transform: translateY(-100px) rotate(360deg);
    }
}

/* 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);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .equation-display {
        font-size: 24px;
        padding: 15px;
    }

    .values-table th {
        font-size: 16px;
        padding: 10px 5px;
    }

    .y-input {
        font-size: 16px;
        padding: 10px 5px;
    }

    .submit-btn {
        font-size: 16px;
        padding: 12px 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 22px;
    }

    .story-text {
        font-size: 16px;
    }

    .equation-display {
        font-size: 20px;
        padding: 12px;
    }

    .values-table th {
        font-size: 14px;
        padding: 8px 3px;
    }

    .y-input {
        font-size: 14px;
        padding: 8px 3px;
    }

    .thumbs-up {
        font-size: 40px;
    }
}
