/* Guess the Origin Activity Styles */

/* ===== Start Overlay ===== */
.start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(250, 251, 252, 0.98) 0%, rgba(245, 247, 250, 0.98) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    padding: 1rem;
}

.start-overlay.hidden {
    display: none;
}

.start-content {
    text-align: center;
    padding: 1.5rem 2rem;
    background: var(--bg-section, #fff);
    border-radius: var(--radius-large, 20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 360px;
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.start-icon {
    font-size: 3rem;
    color: var(--primary-blue, #5B9BD5);
    margin-bottom: 0.75rem;
}

.start-title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark, #333);
    margin-bottom: 0.5rem;
}

.start-text {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted, #666);
    margin-bottom: 1.25rem;
}

.start-btn {
    font-size: 1rem;
    padding: 0.75rem 2rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Header Layout ===== */
.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 200px;
}

.activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-blue, #5B9BD5) 0%, var(--primary-teal, #6BC5C5) 100%);
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ===== Activity Main Layout ===== */
.activity-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.activity-main.hidden {
    display: none;
}

/* ===== Horizontal Content Row ===== */
.activity-content-row {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
}

.activity-content-row .item-section {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.activity-content-row .country-buttons-section {
    flex: 1;
    min-width: 0;
}

/* ===== Section Cards ===== */
.section-card {
    background: var(--bg-section, #fff);
    border-radius: var(--radius-medium, 16px);
    padding: 1.5rem;
    box-shadow: var(--shadow-card, 0 4px 15px rgba(0, 0, 0, 0.08));
}

.section-label {
    font-family: 'Baloo 2', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark, #333);
    text-align: center;
    margin-bottom: 1rem;
}

/* ===== Item Section (Image Display) ===== */
.item-section {
    text-align: center;
    padding: 1.5rem;
}

.item-image-container {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-medium, 16px);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.item-image:hover {
    transform: scale(1.05);
}

.item-name {
    font-family: 'Baloo 2', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark, #333);
    margin: 0 0 0.75rem 0;
}

.theme-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    border-radius: 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #666);
}

.theme-badge i {
    font-size: 0.8rem;
    color: var(--primary-blue, #5B9BD5);
}

/* ===== Country Buttons Section ===== */
.country-buttons-section {
    padding: 1.25rem;
}

.country-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}

.country-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    border: 3px solid #e0e0e0;
    border-radius: var(--radius-medium, 16px);
    background: var(--bg-section, #fff);
    cursor: pointer;
    transition: all 0.2s ease;
}

.country-btn:hover:not(.disabled):not(.correct):not(.incorrect) {
    border-color: #9B7EBD;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(155, 126, 189, 0.25);
}

.country-btn:active:not(.disabled) {
    transform: translateY(-1px);
}

.country-btn .flag-img {
    width: 48px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.country-btn .country-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark, #333);
}

/* Button States */
.country-btn.correct {
    border-color: #7CB97C;
    background: rgba(124, 185, 124, 0.15);
    animation: correctBounce 0.5s ease;
}

.country-btn.correct .country-name {
    color: #5a9a5a;
}

.country-btn.incorrect {
    border-color: #E87B73;
    background: rgba(232, 123, 115, 0.1);
    animation: shake 0.4s ease;
}

.country-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

@keyframes correctBounce {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.08); }
    60% { transform: scale(0.96); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

/* ===== Feedback Section ===== */
.feedback-section {
    text-align: center;
    min-height: 60px;
    width: 100%;
}

.feedback-tryagain {
    font-family: 'Baloo 2', cursive;
    font-size: 1.4rem;
    color: #F5A962;
    animation: shake 0.3s ease;
    padding: 0.5rem;
}

.feedback-correct {
    background: #fff;
    border-radius: var(--radius-medium, 16px);
    padding: 1.25rem 1.5rem;
    border: 2px solid #7CB97C;
    animation: fadeInUp 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.feedback-correct .correct-label {
    font-family: 'Baloo 2', cursive;
    font-size: 1.2rem;
    color: #5a9a5a;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.feedback-correct .correct-label i {
    color: #7CB97C;
}

.feedback-correct .origin-reveal {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark, #333);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feedback-correct .origin-reveal .item-name-reveal {
    color: var(--primary-blue, #5B9BD5);
}

.feedback-correct .flag-img-small {
    width: 24px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    vertical-align: middle;
}

/* Fun Fact Styling */
.feedback-correct .fun-fact {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    margin: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    text-align: left;
}

.feedback-correct .fun-fact i {
    color: #f59e0b;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.feedback-correct .fun-fact span {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.4;
}

.feedback-correct .next-btn-inline {
    margin-top: 1rem;
}

/* ===== Next Section ===== */
.next-section {
    display: none;
}

/* ===== Progress Container ===== */
.progress-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0.5rem;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s ease;
}

.progress-dot.current {
    background: #5B9BD5;
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(91, 155, 213, 0.5);
}

.progress-dot.correct {
    background: #7CB97C;
}

.progress-dot.incorrect {
    background: #E87B73;
}

/* ===== Completion Modal Customizations ===== */
.completion-modal-content {
    border-radius: var(--radius-large, 20px);
    border: none;
}

.completion-icon {
    font-size: 4rem;
    color: #FFD700;
    margin-bottom: 1rem;
    animation: trophyBounce 0.6s ease;
}

@keyframes trophyBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.completion-title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.5rem;
    color: var(--text-dark, #333);
    margin-bottom: 0.5rem;
}

.completion-message {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    color: var(--text-dark, #333);
    margin-bottom: 0.5rem;
}

.completion-stats {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted, #666);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .activity-content-row {
        flex-direction: column;
    }

    .activity-content-row .item-section {
        flex: none;
        width: 100%;
    }

    .activity-content-row .country-buttons-section {
        flex: none;
        width: 100%;
    }

    .item-image-container {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .activity-main {
        padding: 0.75rem;
        gap: 1rem;
    }

    .section-card {
        padding: 1rem;
    }

    .item-image-container {
        width: 150px;
        height: 150px;
    }

    .item-name {
        font-size: 1.25rem;
    }

    .country-buttons {
        gap: 0.625rem;
    }

    .country-btn {
        padding: 0.75rem 0.5rem;
    }

    .country-btn .flag-img {
        width: 40px;
    }

    .country-btn .country-name {
        font-size: 0.9rem;
    }

    .section-label {
        font-size: 1.1rem;
    }

    .feedback-correct {
        padding: 0.875rem 1rem;
    }

    .feedback-correct .fun-fact {
        padding: 0.75rem;
    }

    .feedback-correct .fun-fact span {
        font-size: 0.85rem;
    }
}

/* ===== Laptop Height Adjustments ===== */
@media (max-height: 950px) {
    .activity-container {
        padding: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .activity-header {
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
    }

    .activity-main {
        gap: 0.75rem;
        padding: 0.25rem 1rem;
    }

    .progress-container {
        padding: 0.25rem;
    }

    .section-card {
        padding: 0.75rem;
    }

    .item-section {
        padding: 0.75rem;
    }

    .item-image-container {
        width: 140px;
        height: 140px;
        margin-bottom: 0.5rem;
    }

    .item-name {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }

    .theme-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    .section-label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .country-buttons-section {
        padding: 0.75rem;
    }

    .country-buttons {
        gap: 0.5rem;
    }

    .country-btn {
        padding: 0.5rem 0.4rem;
        gap: 0.25rem;
    }

    .country-btn .flag-img {
        width: 36px;
    }

    .country-btn .country-name {
        font-size: 0.9rem;
    }

    .feedback-section {
        min-height: 0;
    }

    .feedback-correct {
        padding: 0.75rem 1rem;
    }

    .feedback-correct .correct-label {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .feedback-correct .origin-reveal {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .feedback-correct .fun-fact {
        padding: 0.5rem 0.75rem;
        margin: 0.4rem 0;
    }

    .feedback-correct .fun-fact span {
        font-size: 0.8rem;
    }

    .feedback-correct .next-btn-inline {
        margin-top: 0.5rem;
    }
}

/* ===== Fullscreen Mode Adjustments ===== */
.activity-container:fullscreen {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.activity-container:fullscreen .activity-main {
    max-width: 1000px;
    padding: 2rem 3rem;
    gap: 1.5rem;
}

.activity-container:fullscreen .activity-content-row {
    gap: 2rem;
}

.activity-container:fullscreen .activity-content-row .item-section {
    flex: 0 0 360px;
}

.activity-container:fullscreen .item-image-container {
    width: 240px;
    height: 240px;
}

.activity-container:fullscreen .item-name {
    font-size: 1.75rem;
}

.activity-container:fullscreen .country-buttons {
    max-width: 100%;
    gap: 1rem;
}

.activity-container:fullscreen .country-btn {
    padding: 1.25rem 1rem;
}

.activity-container:fullscreen .country-btn .flag-img {
    width: 56px;
}

.activity-container:fullscreen .country-btn .country-name {
    font-size: 1.1rem;
}

/* Fullscreen on shorter screens */
@media (max-height: 800px) {
    .activity-container:fullscreen .activity-main {
        padding: 0.5rem 2rem;
        gap: 0.75rem;
    }

    .activity-container:fullscreen .activity-content-row {
        gap: 1rem;
    }

    .activity-container:fullscreen .activity-content-row .item-section {
        flex: 0 0 280px;
    }

    .activity-container:fullscreen .item-image-container {
        width: 160px;
        height: 160px;
        margin-bottom: 0.5rem;
    }

    .activity-container:fullscreen .item-name {
        font-size: 1.25rem;
        margin-bottom: 0.3rem;
    }

    .activity-container:fullscreen .theme-badge {
        padding: 0.2rem 0.5rem;
        font-size: 0.75rem;
    }

    .activity-container:fullscreen .section-card {
        padding: 0.75rem;
    }

    .activity-container:fullscreen .section-label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .activity-container:fullscreen .country-buttons {
        gap: 0.5rem;
    }

    .activity-container:fullscreen .country-btn {
        padding: 0.6rem 0.5rem;
        gap: 0.3rem;
    }

    .activity-container:fullscreen .country-btn .flag-img {
        width: 40px;
    }

    .activity-container:fullscreen .country-btn .country-name {
        font-size: 0.9rem;
    }

    .activity-container:fullscreen .progress-container {
        padding: 0.25rem;
    }

    .activity-container:fullscreen .feedback-correct {
        padding: 0.75rem 1rem;
    }

    .activity-container:fullscreen .feedback-correct .correct-label {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .activity-container:fullscreen .feedback-correct .fun-fact {
        padding: 0.5rem 0.75rem;
        margin: 0.4rem 0;
    }

    .activity-container:fullscreen .feedback-correct .fun-fact span {
        font-size: 0.8rem;
    }

    .activity-container:fullscreen .feedback-correct .next-btn-inline {
        margin-top: 0.5rem;
    }
}
