body {
    font-family: 'Helvetica Neue', Arial, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    min-height: 100vh;
    background-color: #f0f4f8; 
    margin: 0;
    color: #333;
    padding: 20px; 
    box-sizing: border-box;
}

#app-container {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
    max-width: 700px; 
    display: flex; 
    flex-direction: column;
    overflow: hidden; 
}

.page {
    display: none; 
    flex-direction: column;
    align-items: center;
    width: 100%;
    animation: slideInFade 0.6s ease-out forwards;
}

.page.active {
    display: flex; 
}

@keyframes slideInFade {
    from { 
        opacity: 0; 
        transform: translateX(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}


h1 {
    color: #007bff; 
    font-size: 2em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

h2 {
    color: #0056b3; 
    margin-top: 0.5em;
    margin-bottom: 1em;
}

.subtitle {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 1.5em;
}

/* Page 1: Introduction Styles */
.teaching-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin-bottom: 25px;
}

.teaching-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #007bff;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0; /* For animation */
    transform: translateX(-100%); /* For animation */
}

.teaching-card:nth-child(even) {
    transform: translateX(100%); /* For animation */
    border-left: none;
    border-right: 5px solid #fd7e14; /* Orange for alternating cards */
}
.teaching-card.visible {
    opacity: 1;
    transform: translateX(0);
}


.teaching-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.teaching-card-icon {
    width: 40px;
    height: 40px;
    float: left;
    margin-right: 15px;
    margin-top: 5px;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s; /* Delay to sync with card slide */
}

.teaching-card.visible .teaching-card-icon {
    opacity: 1;
    transform: scale(1);
}


.teaching-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #0056b3;
    font-size: 1.15em;
}
.teaching-card:nth-child(even) h3 {
    color: #c65e00;
}


.teaching-card p {
    font-size: 0.95em;
    line-height: 1.6;
    color: #444;
    margin-bottom: 5px;
}

.teaching-card p.example-urls {
    font-size: 0.9em;
    margin-top: 8px;
}

.teaching-card code {
    background-color: #e0e0e0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
}

.mnemonic-banner {
    background-color: #007bff;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    margin: 15px 0 25px 0;
    width: 90%;
    max-width: 500px;
    font-size: 1.05em;
}


.btn {
    padding: 12px 25px;
    margin-top: 20px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: bold;
}

.btn:hover {
    transform: scale(1.05);
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-info { /* For Share button */
    background-color: #17a2b8;
    color: white;
}
.btn-info:hover {
    background-color: #117a8b;
}


.question-text {
    font-size: 1.2em;
    margin-bottom: 1.5em;
    color: #333;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 450px; 
    margin-bottom: 20px;
}

.option-card {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.option-card:hover {
    border-color: #007bff;
    background-color: #e9ecef;
}

.option-card code {
    background-color: #e0e0e0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

.feedback-message {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: bold;
    min-height: 2em; 
    padding: 10px;
    border-radius: 5px;
    opacity: 0; /* For animation */
    transition: opacity 0.3s ease-in-out;
}
.feedback-message.visible {
    opacity: 1;
}


.feedback-message.correct {
    color: #155724; 
    background-color: #d4edda; 
    border: 1px solid #c3e6cb; 
}

.feedback-message.incorrect {
    color: #721c24; 
    background-color: #f8d7da; 
    border: 1px solid #f5c6cb; 
}

.option-card.selected.correct-answer {
    border-color: #28a745; 
    background-color: #d4edda;
    color: #155724;
}

.option-card.selected.incorrect-answer {
    border-color: #dc3545; 
    background-color: #f8d7da;
    color: #721c24;
}

.animate-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}


.sms-mockup {
    background-color: #e9f5ff; 
    padding: 15px;
    border-radius: 10px;
    margin: 15px auto;
    width: 90%;
    max-width: 400px;
    text-align: left;
    border: 1px solid #cce0ff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sms-mockup p {
    margin: 0;
    line-height: 1.6;
}

.sms-link {
    color: #007bff;
    text-decoration: underline;
    cursor: default; 
}

.tips-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    margin: 20px 0;
}

.tip-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    opacity: 0; 
    transform: translateY(20px); 
    animation: slideUpFadeIn 0.5s ease-out forwards;
}

.tip-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #007bff;
}
.tip-card p {
    font-size: 0.95em;
    line-height: 1.5;
    color: #444;
}
.tip-icon {
    font-size: 1.8em;
    display: block;
    margin-bottom: 10px;
}

/* Staggered animation for tip cards */
#tip-card-1 { animation-delay: 0s; }
#tip-card-2 { animation-delay: 0.2s; }
#tip-card-3 { animation-delay: 0.4s; }
#tip-card-4 { animation-delay: 0.6s; }


@keyframes slideUpFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reporting-links {
    margin-top: 20px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-align: left;
    font-size: 0.9em;
    width: 100%;
    max-width: 500px;
}
.reporting-links h4 {
    margin-top: 0;
    color: #333;
}
.reporting-links p {
    margin: 5px 0;
    color: #555;
}
.reporting-links code {
    font-family: 'Courier New', Courier, monospace;
    background: #eef;
    padding: 2px 4px;
    border-radius: 3px;
}


/* Responsive adjustments */
@media (max-width: 600px) {
    #app-container {
        padding: 15px;
    }
    h1 {
        font-size: 1.6em; /* Adjusted for new longer title */
    }
    .subtitle {
        font-size: 1em;
    }
    .teaching-card {
        padding: 15px;
    }
    .teaching-card-icon {
        width: 30px;
        height: 30px;
        margin-right: 10px;
    }
    .teaching-card h3 {
        font-size: 1.1em;
    }
    .mnemonic-banner {
        font-size: 0.95em;
        padding: 10px;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.95em;
    }
    .options-container {
        gap: 10px;
    }
    .option-card {
        padding: 12px;
    }
    .tips-container {
        grid-template-columns: 1fr; 
    }
}