@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Alexandria', sans-serif;
    background-color: #F4D58D;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background-color: #6DB4F2;
    transition: width 0.3s ease;
    width: 0%;
}

/* Hint Button */
.hint-button {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s;
}

.hint-button:hover {
    transform: scale(1.1);
}

.hint-button img {
    width: 100%;
    height: 100%;
}

/* Screen Layout */
.screen {
    display: none;
    max-width: 1000px;
    margin: 60px auto 150px;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

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

/* Content Card */
.content-card {
    background: white;
    border-radius: 20px;
    padding: 60px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    position: relative;
}

.content-card h1 {
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: bold;
}

.content-card h2 {
    font-size: 28px;
    margin-bottom: 40px;
    text-align: center;
    font-weight: bold;
}

.content-card h3 {
    font-size: 20px;
    margin-bottom: 30px;
    font-weight: normal;
}

.content-card p {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

/* Video Section */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-description {
    text-align: center;
    color: #AFAAD2;
    margin-bottom: 10px;
}

.video-instruction {
    text-align: center;
    color: #999;
    font-size: 16px;
}

/* Diagram Section */
.diagram-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    min-height: 500px;
}

.epipen-image {
    max-width: 400px;
    height: auto;
    position: relative;
    z-index: 1;
}

.label-box {
    position: absolute;
    background-color: #9FC7FF;
    color: white;
    padding: 15px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.label-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.label-title {
    font-weight: bold;
    font-size: 16px;
}

.label-function {
    margin-top: 10px;
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: -10px;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
    background-color: #60A2FF;
    color: white;
    padding: 10px;
    border-radius: 10px;
}

.label-function.hidden {
    display: none;
}

/* Label Positioning */
.label-blue-cap {
    top: 20px;
    left: 20px;
    max-width: 280px;
}

.label-expiry {
    top: 20px;
    right: 20px;
    max-width: 280px;
}

.label-orange-cover {
    bottom: 20px;
    left: 20px;
    max-width: 280px;
}

.label-viewing-window {
    bottom: 20px;
    right: 20px;
    max-width: 280px;
}

/* Drag and Drop Quiz */
.drag-drop-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 30px;
}

.drop-zone {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.drop-slot {
    min-height: 120px;
    border: 3px solid #6DB4F2;
    border-radius: 30px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: all 0.3s ease;
}

.drop-slot.drag-over {
    background-color: #E8F4FD;
    border-color: #4A9FE0;
}

.source-zone {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.drag-item {
    background-color: #6DB4F2;
    color: white;
    padding: 20px;
    border-radius: 30px;
    cursor: grab;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drag-item:hover {
    background-color: #5BA3E1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.drag-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.submit-button {
    display: block;
    margin: 0 auto;
    padding: 15px 60px;
    background-color: #6DB4F2;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: #5BA3E1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Mistakes Grid */
.mistakes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.mistake-category {
    text-align: center;
}

.mistake-title {
    background-color: #6DB4F2;
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
    display: inline-block;
}

.mistake-description {
    background-color: #6DB4F2;
    color: white;
    padding: 20px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.6;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Multiple Choice Quiz */
.quiz-question h3 {
    font-size: 22px;
    margin-bottom: 40px;
    text-align: left;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.option-button {
    padding: 20px 40px;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-align: left;
}

.option-button.blue {
    background-color: #6DB4F2;
}

.option-button.orange {
    background-color: #6DB4F2;
}

.option-button.yellow {
    background-color: #6DB4F2;
}

.option-button.green {
    background-color: #6DB4F2;
}

.option-button:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.option-button.selected {
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Explain Why Grid */
.explain-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.explain-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.number {
    background-color: #D26127;
    color: white;
    font-size: 36px;
    font-weight: bold;
    padding: 15px 25px;
    border-radius: 10px;
    flex-shrink: 0;
}

.explain-text {
    background-color: #6DB4F2;
    color: white;
    padding: 20px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.6;
    flex: 1;
}

/* Text Input Quiz */
.scenario-container {
    max-width: 900px;
    margin: 0 auto;
}

.scenario-text {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.scenario-container label {
    display: block;
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

#answerText {
    width: 100%;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Alexandria', sans-serif;
    resize: vertical;
    background-color: #f5f5f5;
    margin-bottom: 20px;
}

#answerText:focus {
    outline: none;
    border-color: #6DB4F2;
    background-color: white;
}

.scenario-container .submit-button {
    margin-top: 20px;
}

/* Outro Card */
.outro-card {
    text-align: center;
}

.outro-card h2 {
    color: #6DB4F2;
    font-size: 36px;
    margin-bottom: 20px;
}

.outro-card h3 {
    color: #6DB4F2;
    font-size: 24px;
    margin-bottom: 40px;
}

.outro-text {
    font-size: 20px;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* Tip Boxes */
.tip-boxes {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.tip-box {
    background-color: white;
    padding: 15px 20px;
    border-radius: 15px;
    font-size: 14px;
    color: #666;
    flex: 1;
}

.tip-box.left {
    text-align: center;
}

.tip-box.center {
    text-align: center;
}

.tip-box.right {
    text-align: center;
    background-color: #ffffff;
    color: #666;
}

/* Footer Info */
.footer-info {
    margin-top: 40px;
    font-size: 14px;
    color: #666;
    text-align: left;
}

/* Navigation Buttons */
.navigation {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 100;
}

.nav-button {
    padding: 15px 50px;
    background-color: white;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.modal-content p {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-button {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #6DB4F2;
    color: white;
}

.modal-button:hover {
    background-color: #5BA3E1;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.modal-button.secondary {
    background-color: #ddd;
    color: #333;
}

.modal-button.secondary:hover {
    background-color: #ccc;
}
