body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

h1 {
    color: #007bff;
    margin-bottom: 20px;
    font-size: 1.8em;
}

p {
    line-height: 1.6;
    margin-bottom: 15px;
}

#recordButton {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    width: 100%;
    max-width: 300px;
    margin-top: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

#recordButton::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#recordButton.recording::before {
    width: 300px;
    height: 300px;
}

#recordButton:hover {
    background-color: #0056b3;
}

#recordButton:active {
    transform: translateY(1px);
}

#recordButton.recording {
    background-color: #dc3545;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

#recordButton.recording:hover {
    background-color: #c82333;
}

.recording-timer {
    font-size: 1.2em;
    font-weight: bold;
    color: #28a745;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 8px 16px;
    background-color: #e8f5e8;
    border-radius: 20px;
    display: inline-block;
    transition: all 0.3s ease;
}

.recording-timer.warning {
    color: #dc3545;
    background-color: #ffe6e6;
    animation: pulse-warning 1s infinite;
}

@keyframes pulse-warning {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.copy-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.copy-button.clear {
    background-color: #e9ecef;
    color: #343a40;
}

.copy-button.clear:hover {
    background-color: #dde1e4;
}

.copy-button:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.copy-button.copied {
    background-color: #28a745;
}

.copy-button svg {
    vertical-align: middle;
}

.append-toggle {
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
    text-align: left;
}

.append-toggle input[type="checkbox"] {
    margin-right: 8px;
    transform: translateY(1px);
}

.transcript-container {
    margin-top: 25px;
    text-align: left;
}

#transcriptOutput {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1em;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    color: #333;
    background-color: #f8f9fa;
    direction: rtl;
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#transcriptOutput:dir(ltr) {
    direction: ltr;
    text-align: left;
}

#transcriptOutput::placeholder {
    color: #6c757d;
}

.status-message {
    margin-top: 15px;
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.4;
}

.status-message div {
    margin: 2px 0;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    #recordButton {
        padding: 12px 25px;
        font-size: 1em;
    }

    #transcriptOutput {
        min-height: 120px;
        padding: 12px;
    }

    .status-message {
        font-size: 0.8em;
    }
}