* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 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: 1200px;
    width: 100%;
    position: relative;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 32px;
}

/* Story Box */
.story-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 5px solid #1565c0;
    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: #0d47a1;
    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;
}

/* Plane Section */
.plane-section {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.plane-wrapper {
    position: relative;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border: 3px solid #1976d2;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
}

.plane-svg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    background: white;
}

/* Drop Overlay - positioned over the image */
.drop-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    pointer-events: none;
}

/* Drop Zones */
.drop-zone {
    position: absolute;
    padding: 10px 15px;
    border: 2px dashed #2196f3;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    min-width: 100px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(5px);
    font-size: 14px;
}

/* Position drop zones based on typical Cartesian plane layout */
.drop-zone-xaxis {
    bottom: 15%;
    right: 10%;
    transform: translateX(0);
}

.drop-zone-yaxis {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.drop-zone-origin {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.drop-zone.drag-over {
    border-color: #1565c0;
    background: rgba(33, 150, 243, 0.2);
    transform: scale(1.05);
}

.drop-zone-xaxis.drag-over {
    transform: translateX(0) scale(1.05);
}

.drop-zone-yaxis.drag-over {
    transform: translateX(-50%) scale(1.05);
}

.drop-zone-origin.drag-over {
    transform: translate(-50%, -50%) scale(1.05);
}

.drop-placeholder {
    color: #9e9e9e;
    font-size: 14px;
    font-style: italic;
}

.dropped-answer {
    font-size: 16px;
    font-weight: bold;
    color: #1565c0;
    display: none;
}

.drop-zone.has-answer .drop-placeholder {
    display: none;
}

.drop-zone.has-answer .dropped-answer {
    display: block;
}

/* Blink Animations */
.drop-zone.blink-green {
    animation: blinkGreen 1.8s ease-in-out;
}

.drop-zone.blink-red {
    animation: blinkRed 1.8s ease-in-out;
}

@keyframes blinkGreen {
    0%, 100% { 
        background: rgba(255, 255, 255, 0.9);
        border-color: #2196f3;
    }
    16.67%, 50%, 83.33% { 
        background: rgba(76, 175, 80, 0.3);
        border-color: #4caf50;
    }
    33.33%, 66.67% { 
        background: rgba(255, 255, 255, 0.9);
        border-color: #2196f3;
    }
}

@keyframes blinkRed {
    0%, 100% { 
        background: rgba(255, 255, 255, 0.9);
        border-color: #2196f3;
    }
    16.67%, 50%, 83.33% { 
        background: rgba(244, 67, 54, 0.3);
        border-color: #f44336;
    }
    33.33%, 66.67% { 
        background: rgba(255, 255, 255, 0.9);
        border-color: #2196f3;
    }
}

/* Question Section */
.question-section {
    margin: 20px 0;
}

.question-label {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 10px;
    border-left: 5px solid #ff6f00;
}

/* Options Container */
.options-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.option-card {
    background: white;
    border: 3px solid #2196f3;
    border-radius: 12px;
    padding: 18px;
    cursor: grab;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.option-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(33, 150, 243, 0.3);
    border-color: #1565c0;
}

.option-card:active {
    cursor: grabbing;
}

.option-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.option-card.hidden {
    display: 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%);
}

/* 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: 968px) {
    .options-container {
        grid-template-columns: 1fr;
    }

    .drop-zone {
        min-width: 100px;
        min-height: 40px;
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .plane-wrapper {
        padding: 20px;
    }

    .question-label {
        font-size: 18px;
    }

    .option-card {
        font-size: 18px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 22px;
    }

    .story-text {
        font-size: 16px;
    }

    .plane-wrapper {
        padding: 15px;
    }

    .drop-zone {
        min-width: 80px;
        min-height: 35px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .question-label {
        font-size: 16px;
    }

    .option-card {
        font-size: 16px;
        padding: 15px;
    }

    .feedback {
        font-size: 18px;
    }
}
