/* -- Difficulty + Text-length selectors ----------- */
.selector-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.selector-row label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #8b7e74;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.selector-row select {
    background: #fff;
    border: 2px solid #e8ddd3;
    color: #2d3436;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.selector-row select:hover { border-color: #f0b89a; transform: scale(1.03); }
.selector-row select:focus {
    outline: none;
    border-color: #e17055;
    box-shadow: 0 0 0 3px rgba(225,112,85,0.15);
}

/* -- Record section ------------------------------- */
.record-section {
    text-align: center;
    margin-top: auto;
    margin-bottom: 0.5rem;
    padding-top: 0.25rem;
    min-height: 126px;
}
.record-btn {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 4px solid #00b894;
    background: linear-gradient(135deg, #e6fff5 0%, #ccfbf1 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 18px rgba(0,184,148,0.18);
    position: relative;
    padding: 0;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.record-btn::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed transparent;
    transition: all 0.3s;
}
.record-btn:hover::before {
    border-color: #00b894;
    animation: spin 8s linear infinite;
}
.record-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(0,184,148,0.3);
}
.record-btn:disabled,
.record-btn.is-disabled {
    cursor: not-allowed;
    opacity: 0.48;
    filter: grayscale(0.35);
    transform: none;
    box-shadow: 0 2px 10px rgba(45,52,54,0.08);
}
.record-btn:disabled::before,
.record-btn.is-disabled::before {
    border-color: transparent;
    animation: none;
}
.record-btn:disabled:hover,
.record-btn.is-disabled:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(45,52,54,0.08);
}
.record-btn.recording {
    background: linear-gradient(135deg, #ffeaea 0%, #ffe0e0 100%);
    border-color: #e17055;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(225,112,85,0.3);
}
.record-btn.recording::before {
    border-color: #e17055;
    animation: spin 4s linear infinite;
}
.record-btn.recording:hover {
    background: linear-gradient(135deg, #ffd6d6 0%, #ffc4c4 100%);
    transform: scale(1.08);
}
.record-icon {
    width: 0;
    height: 0;
    border-left: 26px solid #00b894;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    margin-left: 5px;
    transition: all 0.2s;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}
.record-btn:hover .record-icon {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}
.recording .record-icon {
    border: none;
    width: 24px;
    height: 24px;
    background: #e17055;
    border-radius: 4px;
    margin-left: 0;
    filter: none;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(225,112,85,0.4); }
    50%      { box-shadow: 0 0 0 16px rgba(225,112,85,0); }
}
.record-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #b2a198;
    transition: color 0.3s;
}
.record-label .timer {
    color: #e17055;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}
.level-bar {
    width: 100%;
    height: 5px;
    background: #f5eee8;
    border-radius: 3px;
    margin-top: 0.75rem;
    overflow: hidden;
    visibility: hidden;
}
.level-bar.active { visibility: visible; }
.level-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00b894, #fdcb6e, #e17055);
    border-radius: 3px;
    transition: width 0.08s linear;
}

/* -- Writing section ----------------------------- */
.writing-section {
    margin-top: auto;
    margin-bottom: 0.5rem;
    padding-top: 0.25rem;
    min-height: 126px;
    display: grid;
    gap: 0.55rem;
}
.writing-section[hidden] {
    display: none;
}
.writing-label {
    color: #5f5a75;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
}
.writing-input {
    width: 100%;
    min-height: 78px;
    resize: vertical;
    border: 2px solid #d9e8e3;
    border-radius: 12px;
    background: #fff;
    color: #26312f;
    padding: 0.7rem 0.78rem;
    font: inherit;
    font-size: 1rem;
    line-height: 1.45;
    font-weight: 650;
    box-shadow: 0 4px 14px rgba(47,143,125,0.08);
}
.writing-input:focus {
    outline: none;
    border-color: #2f8f7d;
    box-shadow: 0 0 0 4px rgba(47,143,125,0.14);
}
.writing-input:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    background: #f8faf9;
}
.writing-submit-btn {
    justify-self: center;
    min-width: 132px;
    min-height: 42px;
    border: none;
    border-radius: 12px;
    background: #2f8f7d;
    color: #fff;
    padding: 0 1rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(47,143,125,0.18);
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.writing-submit-btn:hover {
    background: #247464;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(47,143,125,0.24);
}
.writing-submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: 0 2px 10px rgba(45,52,54,0.08);
}
