/* Guess the Language 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 .audio-section {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.activity-content-row .language-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;
}

/* ===== Audio Section ===== */
.audio-section {
    text-align: center;
    padding: 2rem 1.5rem;
}

.audio-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ===== Large Play Button ===== */
.play-btn-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #5B9BD5 0%, #6BC5C5 100%);
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(91, 155, 213, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn-large:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(91, 155, 213, 0.5);
}

.play-btn-large:active {
    transform: scale(0.98);
}

.play-btn-large.playing {
    background: linear-gradient(145deg, #F5A962 0%, #FFCE54 100%);
    box-shadow: 0 8px 25px rgba(245, 169, 98, 0.4);
}

.play-btn-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== Audio Waves Animation ===== */
.audio-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    opacity: 0;
    transition: opacity 0.3s;
}

.audio-waves.active {
    opacity: 1;
}

.audio-waves span {
    width: 6px;
    height: 20px;
    background: linear-gradient(180deg, #5B9BD5, #6BC5C5);
    border-radius: 3px;
}

.audio-waves.active span {
    animation: wave 1s ease-in-out infinite;
}

.audio-waves span:nth-child(1) { animation-delay: 0s; }
.audio-waves span:nth-child(2) { animation-delay: 0.1s; }
.audio-waves span:nth-child(3) { animation-delay: 0.2s; }
.audio-waves span:nth-child(4) { animation-delay: 0.3s; }
.audio-waves span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% {
        height: 20px;
        opacity: 0.5;
    }
    50% {
        height: 40px;
        opacity: 1;
    }
}

.audio-hint {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted, #888);
    margin: 0.75rem 0 0 0;
}

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

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

.language-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;
}

.language-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);
}

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

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

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

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

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

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

.language-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 .language-reveal {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark, #333);
    margin-bottom: 0.5rem;
}

.feedback-correct .translation {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark, #333);
}

.feedback-correct .original-phrase {
    font-style: italic;
    color: var(--text-muted, #666);
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

.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 .audio-section {
        flex: none;
        width: 100%;
    }

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

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

    .section-card {
        padding: 1rem;
    }

    .play-btn-large {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .language-buttons {
        gap: 0.625rem;
    }

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

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

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

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

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

/* ===== 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 .audio-section {
    flex: 0 0 320px;
}

.activity-container:fullscreen .play-btn-large {
    width: 120px;
    height: 120px;
    font-size: 3rem;
}

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

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

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

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