* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    padding: 20px;
    color: #111827;
}

.container {
    background: white;
    border-radius: 12px;
    padding: 48px;
    max-width: 1000px;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

h1 {
    text-align: center;
    color: #111827;
    margin-bottom: 40px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.audio-source {
    margin-bottom: 32px;
}

.audio-source label {
    display: block;
    text-align: center;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.source-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.source-btn {
    padding: 10px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.source-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.source-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 1px 3px 0 rgba(59, 130, 246, 0.3);
}

.source-hint {
    text-align: center;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 12px;
    line-height: 1.5;
}

.status {
    text-align: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 32px;
    border: 1px solid #e5e7eb;
}

#status-text {
    font-size: 0.9375rem;
    color: #4b5563;
    font-weight: 500;
}

.status.listening {
    background: #10b981;
    border-color: #10b981;
    animation: pulse 2s ease-in-out infinite;
}

.status.listening #status-text {
    color: white;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.btn {
    padding: 11px 28px;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 600;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background: #3b82f6;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:hover:not(:disabled) {
    background: #2563eb;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.btn-start {
}

.btn-stop {
}

.btn-clear {
}

.btn-download {
}

.btn-toggle {
}

.btn-toggle.active {
    background: #10b981;
}

.btn-toggle.active:hover {
    background: #059669;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.transcript-container {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    min-height: 360px;
    max-height: 480px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.transcript-columns {
    display: flex;
    gap: 24px;
    height: 100%;
}

.transcript-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.transcript-column h3 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.translation-column {
    border-right: 2px solid #e5e7eb;
    padding-right: 24px;
}

.transcript {
    font-size: 1rem;
    line-height: 1.75;
    color: #111827;
    text-align: right;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-weight: 400;
}

.partial {
    color: #9ca3af;
    font-style: italic;
}

.final {
    color: #111827;
}

.info {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.info p {
    margin: 6px 0;
}

/* Login Screen Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 48px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.login-box h1 {
    margin-bottom: 16px;
}

.login-box p {
    text-align: center;
    color: #6b7280;
    margin-bottom: 32px;
    font-size: 0.9375rem;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 16px;
    text-align: center;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header h1 {
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info span {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

#logout-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
}
