.holdtorecord {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 500;
    opacity: 0.8;
    font-family: var(--font-sans);
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}


.mic-button svg {
    width: 36px;
    height: 36px;
    fill: var(--brand-dark);
    transition: fill 0.2s ease;
}

.mic-button:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    fill: var(--brand-primary);
}

.mic-button {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    box-shadow:
        0 6px 16px rgba(44, 24, 16, 0.1),
        inset 0 0 0 1px white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 50;
}

.mic-button.recording-active {
    background: #fff;
    box-shadow: 0 0 0 4px var(--brand-primary), 0 0 0 8px rgba(141, 110, 99, 0.3);
    animation: pulseBrand 1.5s infinite;
}

.mic-button.recording-active svg {
    fill: var(--brand-primary);
    transform: scale(1.1);
}

@keyframes pulseBrand {
    0% {
        box-shadow: 0 0 0 0 rgba(141, 110, 99, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(141, 110, 99, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(141, 110, 99, 0);
    }
}

.pronunciation_skip_button {
    width: 70px;
    position: absolute;
    left: 90%;
    bottom: 6%;
    transform: translateX(-50%);
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 20px;
}


.try_again_button {
    width: 200px;
    position: absolute;
    left: 50%;
    bottom: 6%;
    transform: translateX(-50%);
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
}

.user_recording {
    width: 80px;
    position: absolute;
    height: 15px;
    left: 50%;
    bottom: 15%;
    cursor: pointer;
    justify-content: center;
    text-align: center;
    font-size: 10px;
    transform: translateX(-50%);
}

#attempts-label {
    position: absolute;
    left: 50%;
    bottom: 20%;
    color: #666;
    text-align: center;
    font-size: 0.75rem;
    transform: translateX(-50%);
}

.next_button {
    width: 250px;
    position: absolute;
    left: 50%;
    bottom: 6%;
    transform: translateX(-50%);
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
}

.user_recording,
.next_button,
.try_again_button,
.pronunciation_skip_button {
    background: var(--brand-dark);
    color: white;
    border-radius: 99px;
    border: none;
    font-family: var(--font-sans);
    font-weight: 600;
    transition: background 0.3s;
}

.choice-btn:hover,
.next_button:hover,
.try_again_button:hover,
.pronunciation_skip_button:hover {
    background: var(--brand-primary);
}


.speaker-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0px auto 10px auto;
}

.speaker-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--brand-dark);
    border: 4px solid var(--paper);
    box-shadow:
        0 0 0 1px var(--border-color),
        0 8px 20px rgba(93, 64, 55, 0.3);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.speaker-btn svg {
    width: 32px;
    height: 32px;
    stroke-width: 2;
}

.speaker-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 0 0 1px var(--border-color),
        0 12px 24px rgba(93, 64, 55, 0.4);
    background: var(--brand-primary);
}

.speaker-btn:active {
    transform: scale(0.95);
}

.answer-always,
.vocabulary_word,
.vocab-quest {
    background: transparent;
    width: 100%;
    padding: 0;
    text-align: center;
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--text-primary);
}


.vocabulary_meaning {
    font-family: var(--font-sans);
    text-align: center;
    color: var(--brand-dark);
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 500;
}


#pronunciation.view-analysis .speaker-container,
#pronunciation.view-analysis .vocabulary_word,
#pronunciation.view-analysis .vocabulary_pronunciationipa,
#pronunciation.view-analysis .vocabulary_meaning,
#pronunciation.view-analysis .holdtorecord,
#pronunciation.view-analysis #micButton {
    display: none !important;
}



#analysis-status {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

#analysis-status:not(.hidden) {
    opacity: 1;
    pointer-events: all;
}

#analysis-status.hidden {
    display: none;
}

.status-row {
    background: white;
    padding: 20px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border-color);
}


.pronunciation_analysis {
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

#pronunciation.view-analysis .pronunciation_analysis {
    display: block;
}

.controls {
    position: absolute;
    top: 0px;
    left: 0px;
}

.analysis-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    margin-top: 5px;
}

.analysis-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-secondary);
}

.sentence-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: center;
}

.word-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.word-text {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.word-ipa {
    font-family: "Noto Sans IPA", sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 4px;
    opacity: 0.7;
}

.whole-ok,
.char-ok {
    color: var(--success);
    transition: color 0.3s;
}

.whole-miss,
.char-miss {
    color: var(--danger);
    text-decoration: underline;
    text-decoration-color: rgba(211, 47, 47, 0.3);
    text-decoration-thickness: 2px;
}

.word-group.whole-correct .word-text {
    color: var(--success);
}

.word-group.whole-miss .word-text {
    color: var(--danger);
}

@media (max-width: 480px) {
    .word-text {
        font-size: 1.5rem;
    }
}