:root {
    --scout-green: #009640;
    --scout-blue: #0054A6;
    --scout-yellow: #FFD700;
    --scout-red: #ED1C24;
    --bg-light: #f4f7f6;
    --text-dark: #333;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

header {
    background-color: var(--scout-blue);
    color: var(--white);
    padding: 1.5rem 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.2rem;
    width: 100%;
}

@media (min-width: 600px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 1rem 2rem;
    }
}

.header-info h1 {
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.header-info p {
    margin: 0.2rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.85;
}

.progress-wrapper {
    width: 100%;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 600px) {
    .progress-wrapper {
        align-items: flex-end;
    }
}

.progress-wrapper span {
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    font-weight: bold;
}

.progress-container {
    background: rgba(255,255,255,0.15);
    width: 100%;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

#progress-bar {
    background-color: var(--scout-yellow);
    height: 100%;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

main {
    flex: 1;
    width: 90%;
    max-width: 700px;
    margin: 1.5rem auto;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

@media (min-width: 600px) {
    main {
        margin: 2rem auto;
        padding: 2.5rem;
    }
}

.activity-header h2 {
    color: var(--scout-green);
    margin-top: 0;
    font-size: 1.5rem;
    line-height: 1.2;
}

.activity-header p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.content-area {
    margin: 1.5rem 0;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    padding: 0.9rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.option-btn:hover {
    border-color: var(--scout-blue);
    background-color: #f8fbff;
}

.option-btn.selected {
    border-color: var(--scout-blue);
    background-color: var(--scout-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 84, 166, 0.2);
}

.controls {
    display: flex;
    flex-direction: column-reverse;
    margin-top: 2rem;
    gap: 12px;
}

@media (min-width: 480px) {
    .controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

button.primary, button.secondary {
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: transform 0.1s, opacity 0.2s;
    width: 100%;
}

@media (min-width: 480px) {
    button.primary, button.secondary {
        width: auto;
        min-width: 120px;
    }
}

button.primary {
    background-color: var(--scout-green);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 150, 64, 0.2);
}

button.secondary {
    background-color: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.feedback {
    margin: 1.5rem 0;
    padding: 1.2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

/* Sequencing styles */
.sortable-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sortable-item {
    padding: 12px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: grab;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.sortable-item:active {
    cursor: grabbing;
}

.sortable-item.dragging {
    opacity: 0.5;
    background: #e9ecef;
}

.sortable-item::before {
    content: '☰';
    margin-right: 15px;
    color: #888;
    font-size: 1.2rem;
}

/* Matching styles */
.matching-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.matching-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.matching-key {
    flex: 1;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.media-area {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.activity-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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