/* Add this new layout container style */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
}

/* Ensure content cards fill the space */
.two-column-layout .content-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.two-column-layout textarea {
    flex: 1;
    min-height: 150px;
}

.content-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.pulsing {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Styles for API response */
#output .correct,
#output .correct-stress,
#output .correct-sound {
    color: #16a34a;
    /* green */
    font-weight: 600;
}

#output .incorrect,
#output .incorrect-stress,
#output .incorrect-sound,
#output .missing-word {
    color: #dc2626;
    /* red */
    font-weight: 600;
    text-decoration: line-through;
}

#output .unexpected-word {
    color: #f59e0b;
    /* amber */
    font-weight: 600;
    background-color: #fffbeb;
    padding: 2px 4px;
    border-radius: 4px;
}

.loader {
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Word analysis styles */
.word-analysis-card {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #3b82f6;
}

.word-analysis-card.correct {
    border-left-color: #16a34a;
}

.word-analysis-card.incorrect {
    border-left-color: #dc2626;
}

.phonetic-text {
    font-family: monospace;
    color: #3b82f6;
    font-weight: 500;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-correct {
    background-color: #dcfce7;
    color: #166534;
}

.status-incorrect {
    background-color: #fee2e2;
    color: #b91c1c;
}

.audio-btn {
    background-color: #dbeafe;
    color: #1d4ed8;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.2s;
}

.audio-btn:hover {
    background-color: #bfdbfe;
}

.audio-btn svg {
    margin-right: 0.5rem;
}

.score-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    background-color: #dbeafe;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
}

.hidden {
    display: none;
}

/* Style Get Random Phrase button (inside first column) */
.two-column-layout .content-card:first-child button {
    background-color: #3b82f6; /* blue */
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.two-column-layout .content-card:first-child button:hover {
    background-color: #2563eb;
}

/* Style START RECORDING button */
#recordBtnAI {
    background-color: #10b981; /* green */
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-block;
    vertical-align: middle;
    margin-top: 1rem;          /* space above the button row */
    margin-right: 10px;
}

#recordBtnAI:hover {
    background-color: #059669;
}

/* Style Your Audio button */
#playUserAudioBtn {
    background-color: #6b7280; /* gray */
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#playUserAudioBtn:hover:not(:disabled) {
    background-color: #4b5563;
}

#playUserAudioBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Make the container of Your Audio button inline, so both buttons sit side by side */
#recordBtnAI + div {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
    padding: 0;
}