* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 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: #e8eaf6;
    border-left: 5px solid #5c6bc0;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.instruction {
    color: #333;
    line-height: 1.8;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
}

.sub-instruction {
    color: #555;
    font-size: 16px;
    font-style: italic;
}

/* Recurring Visual */
.recurring-visual {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.decimal-examples {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.example-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 150px;
    border: 3px solid #fbc02d;
}

.decimal-display {
    font-size: 32px;
    font-weight: bold;
    color: #e65100;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.recurring-note {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Game Area */
.game-area {
    margin: 30px 0;
}

.game-area h3 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 20px;
}

.matching-section {
    display: flex;
    justify-content: center;
}

.decimals-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 700px;
}

.decimal-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid #2196f3;
}

.decimal-value {
    font-size: 28px;
    font-weight: bold;
    color: #1565c0;
    text-align: center;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.notation {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
}

.drop-zone {
    background: white;
    border: 3px dashed #2196f3;
    border-radius: 12px;
    padding: 25px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.drop-zone.drag-over {
    background: #e3f2fd;
    border-color: #1976d2;
    border-style: solid;
    transform: scale(1.02);
}

.drop-zone.has-answer {
    border-style: solid;
    border-color: #4caf50;
}

.drop-zone.correct {
    background: #e8f5e9;
    border-color: #4caf50;
    animation: correct-drop 0.5s ease;
}

.drop-zone.incorrect {
    animation: shake-drop 0.5s ease;
}

@keyframes correct-drop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake-drop {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.drop-placeholder {
    color: #999;
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
}

.drop-zone.has-answer .drop-placeholder {
    display: none;
}

/* Options Section */
.options-section {
    background: #f5f5f5;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
}

.options-section h3 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
}

.fractions-pool {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.fraction-tile {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 3px solid #d81b60;
    border-radius: 12px;
    padding: 18px 25px;
    cursor: move;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(240, 147, 251, 0.3);
    user-select: none;
}

.fraction-tile:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.5);
}

.fraction-tile.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.fraction-tile.correct {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-color: #388e3c;
    cursor: default;
    pointer-events: none;
}

.fraction-display {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 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;
}

/* 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;
    }

    .decimal-examples {
        flex-direction: column;
    }

    .decimal-value {
        font-size: 24px;
    }

    .fractions-pool {
        gap: 10px;
    }

    .fraction-tile {
        padding: 15px 20px;
    }

    .fraction-display {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .story-box {
        padding: 15px;
    }

    .instruction {
        font-size: 16px;
    }

    .decimal-display {
        font-size: 26px;
    }

    .drop-zone {
        padding: 20px;
        min-height: 70px;
    }

    .fraction-tile {
        padding: 12px 18px;
    }

    .fraction-display {
        font-size: 18px;
    }
}
