/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #f2f2f2;
    overflow-x: hidden;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    width: 100%;
}

.screen.active {
    display: block;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
}

/* Home Screen */
.home-container {
    display: flex;
    gap: 40px;
    min-height: 100vh;
}

.left-section {
    flex: 1;
    background-color: #82a486;
    padding: 60px 80px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.right-section {
    flex: 1.5;
    background-color: #f2f2f2;
    padding: 40px;
}

.main-title {
    font-size: 50px;
    font-weight: bold;
    color: #1f2a2e;
    margin-bottom: 60px;
    line-height: 1.2;
}

.module-menu {
    background-color: #f2f2f2;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    margin-bottom: 80px;
}

.module-menu h2 {
    font-size: 30px;
    font-weight: normal;
    margin-bottom: 20px;
}

.module-menu ol {
    font-size: 30px;
    padding-left: 45px;
    line-height: 1.8;
}

.module-menu li {
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    width: 371px;
    height: 81px;
    border-radius: 24px;
    border: none;
    font-size: 29px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-primary {
    background-color: #255b5e;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4648;
    transform: translateY(-2px);
    box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background-color: #255b5e;
    color: white;
}

.btn-secondary:hover {
    background-color: #1d4648;
    transform: translateY(-2px);
    box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.3);
}

/* Steps Preview */
.steps-preview {
    overflow-y: auto;
    height: calc(100vh - 80px);
    padding-right: 10px;
}

.step-card {
    background-color: #A4CEE4;
    border-radius: 27px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    display: flex;
    gap: 20px;
    position: relative;
}

.step-image {
    width: 306px;
    height: 230px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

#steps-list .step-image {
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

#steps-list .step-image:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.step-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-text ol {
    font-size: 23px;
    color: #111a21;
    padding-left: 35px;
    margin-bottom: 0;
}

.expand-btn {
    position: absolute;
    right: 30px;
    bottom: 30px;
    width: 35px;
    height: 35px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M21 3l-6 6m6-6v6m0-6h-6M3 21l6-6m-6 6v-6m0 6h6"/></svg>') center/contain no-repeat;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.expand-btn:hover {
    opacity: 1;
}

/* Learning Screen */
#learning-screen {
    background-color: #f2f2f2;
}

.learning-container {
    background-color: #f2f2f2;
    padding: 40px 60px;
}

.page-title {
    font-size: 48px;
    font-weight: bold;
    color: #1f2a2e;
    margin-bottom: 20px;
}

.page-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.instructions-box {
    background-color: white;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    margin-bottom: 30px;
}

.instructions-box p {
    font-size: 30px;
    line-height: 1.5;
}

.instructions-box strong {
    font-weight: bold;
}

.instructions-box em {
    font-style: italic;
}

.steps-scroll-container {
    position: relative;
    margin-bottom: 30px;
}

.steps-list {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 40px;
}

.scroll-indicator {
    position: absolute;
    right: 0;
    top: 0;
    width: 30px;
    height: 100%;
    background-color: white;
    border-radius: 12px;
    box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: #A4CEE4;
    border-radius: 12px;
    transition: transform 0.2s ease;
    transform: translateY(calc(var(--scroll-position, 0%) * 2.33));
}

.button-group {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

/* Step Detail Screen */
.detail-container {
    background-color: #f2f2f2;
    padding: 60px;
    min-height: 100vh;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 66px;
    height: 66px;
    background-color: transparent;
    border: none;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    color: #000;
    line-height: 1;
    transition: transform 0.3s;
}

.close-btn:hover {
    transform: scale(1.1);
}

.step-detail-content {
    background-color: #A4CEE4;
    border-radius: 35px;
    padding: 60px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    max-width: 900px;
    margin: 0 auto;
}

.step-detail-content h2 {
    font-size: 40px;
    font-weight: bold;
    color: #1f2a2e;
    text-align: center;
    margin-bottom: 40px;
}

.step-detail-image {
    width: 100%;
    max-width: 531px;
    height: auto;
    border-radius: 24px;
    display: block;
    margin: 0 auto 40px;
}

.step-detail-content p {
    font-size: 32px;
    color: #111a21;
    line-height: 1.6;
    text-align: left;
}

/* Quiz Screens */
.quiz-container {
    background-color: #82a486;
    min-height: 100vh;
    padding: 40px;
}

.quiz-container .container {
    background-color: #f2f2f2;
    border-radius: 0;
    padding: 40px 60px;
    margin: 0 auto;
    max-width: 1000px;
}

.lightbulb-icon {
    display: inline-block;
    margin-left: 15px;
    font-size: 40px;
}

.hint-button {
    background-color: #FFD700;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 32px;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
    padding: 0;
    font-family: inherit;
}

.hint-button:hover {
    background-color: #FFC700;
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.hint-button:active {
    transform: scale(0.98);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);
}

.quiz-content {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    min-height: 400px;
}

.options-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-pill {
    background-color: #A4CEE4;
    border-radius: 35px;
    padding: 25px 30px;
    font-size: 25px;
    color: #111a21;
    text-align: center;
    cursor: move;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    transition: all 0.3s;
    user-select: none;
}

.option-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.3);
}

.option-pill.dragging {
    opacity: 0.5;
}

.option-pill.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.option-pill.error-shake {
    animation: errorShake 0.5s ease;
    border: 3px solid #ff0000;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.hint-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.hint-content {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

.hint-content h2 {
    color: #255b5e;
    margin-bottom: 20px;
    font-size: 28px;
}

.hint-content ol {
    text-align: left;
    margin: 20px 0;
    padding-left: 30px;
}

.hint-content li {
    margin: 12px 0;
    font-size: 18px;
    color: #111a21;
    line-height: 1.6;
}

.hint-close {
    background-color: #255b5e;
    color: white;
    border: none;
    border-radius: 21px;
    padding: 12px 30px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.hint-close:hover {
    background-color: #1a4446;
}

.option-pill.success-pulse {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.drop-zone,
.answer-zone {
    flex: 1;
    background-color: #d9d9d9;
    border: 2px dashed #000;
    border-radius: 35px;
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    transition: all 0.3s;
}

.answer-zone {
    background-color: #d9d9d9;
}

.drop-placeholder {
    font-size: 21px;
    color: #000;
    text-align: center;
    margin-bottom: 20px;
}

.drop-corners {
    position: absolute;
    inset: 20px;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid #000;
}

.corner.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.corner.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.corner.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.corner.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.arrows {
    position: absolute;
    width: 100%;
    bottom: -60px;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
}

.arrow {
    font-size: 80px;
    color: #000;
    opacity: 0.5;
}

.answer-pill {
    background-color: rgba(109, 142, 160, 0.5);
    border-radius: 30px;
    padding: 20px 30px;
    font-size: 21px;
    color: #111a21;
    margin-bottom: 15px;
    width: 100%;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
    user-select: none;
}

.answer-pill:hover {
    background-color: rgba(109, 142, 160, 0.7);
}

.answer-pill.incorrect {
    background-color: #A4CEE4;
    border: 3px solid #ff0000;
}

.answer-pill.locked {
    background-color: rgba(109, 142, 160, 0.5);
    cursor: not-allowed !important;
    border: 3px solid transparent;
}

.answer-pill.locked:hover {
    transform: none;
}

.sample-answer-pill {
    background-color: rgba(109, 142, 160, 0.7);
    border-radius: 30px;
    padding: 20px 30px;
    font-size: 21px;
    color: #111a21;
    margin-bottom: 15px;
    width: 100%;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
    user-select: none;
}

.sample-answer-pill:hover:not(.locked) {
    background-color: rgba(109, 142, 160, 0.9);
    transform: scale(1.02);
}

.sample-answer-pill.incorrect {
    border: 3px solid #ff0000;
}

.sample-answer-pill.locked {
    background-color: rgba(109, 142, 160, 0.7);
    cursor: not-allowed !important;
    border: 3px solid transparent;
}

.sample-answer-pill.locked:hover {
    transform: none;
}

/* Results Screen */
.results-container {
    background-color: #82a486;
    min-height: 100vh;
    padding: 40px;
}

.results-container > .container {
    background-color: #f2f2f2;
    padding: 40px 60px;
    margin: 0 auto;
    max-width: 1000px;
}

.score-box {
    background-color: white;
    border-radius: 18px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.score-label {
    font-size: 30px;
    margin-bottom: 20px;
}

.score-value {
    font-size: 96px;
    font-weight: normal;
    color: #000;
}

.results-list {
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 30px;
    padding-right: 30px;
}

.result-item {
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.result-item.correct {
    background-color: #bdeca4;
}

.result-item.incorrect {
    background-color: #ffb7b7;
}

.result-item h3 {
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 15px;
}

.result-item p {
    font-size: 25px;
    margin-bottom: 8px;
}

.result-item strong {
    font-weight: bold;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 24px;
}

::-webkit-scrollbar-track {
    background: white;
    border-radius: 12px;
}

::-webkit-scrollbar-thumb {
    background: #A4CEE4;
    border-radius: 12px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a7a8a;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .home-container {
        flex-direction: column;
    }
    
    .main-title {
        font-size: 40px;
    }
    
    .module-menu h2,
    .module-menu ol {
        font-size: 24px;
    }
    
    .btn {
        width: 280px;
        height: 65px;
        font-size: 26px;
    }
    
    .step-card {
        flex-direction: column;
    }
    
    .step-image {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .quiz-content {
        flex-direction: column;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .instructions-box p {
        font-size: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fireworks Animation */
.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}

.firework {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
}

.firework-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes explode {
    0% {
        opacity: 1;
        transform: translate(0, 0);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty));
    }
}

.firework-particle.animated {
    animation: explode 1.2s ease-out forwards;
}
.screen.active {
    animation: fadeIn 0.5s ease;
}

/* Drag and Drop Visual Feedback */
.drag-over {
    background-color: #c5d5dc;
    border-color: #255b5e;
}
