* { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; background-color: #f5f7fa; color: #333; line-height: 1.6; } .container { max-width: 800px; margin: 0 auto; padding: 20px; } h1 { text-align: center; margin-bottom: 5px; color: #2c3e50; } .subtitle { text-align: center; color: #7f8c8d; margin-bottom: 30px; font-size: 0.9rem; } .translation-panel { background-color: white; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); padding: 20px; margin-bottom: 20px; } .language-selector { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; } .select-container { flex: 1; min-width: 120px; margin: 5px; } .select-container label { display: block; margin-bottom: 5px; font-size: 0.9rem; color: #7f8c8d; } select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; background-color: #f9f9f9; font-size: 1rem; } #swapLanguages { background-color: #e8f4fc; border: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; transition: background-color 0.3s; margin: 0 10px; } #swapLanguages:hover { background-color: #d1e9f9; } .text-panels { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; } .text-panel { flex: 1; } textarea { width: 100%; height: 120px; padding: 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; resize: none; margin-bottom: 10px; } .controls { display: flex; gap: 10px; } button { padding: 10px 15px; border-radius: 6px; border: none; cursor: pointer; font-size: 0.9rem; transition: background-color 0.3s, transform 0.1s; } button:active { transform: translateY(1px); } .record-button, .speak-button { background-color: #e8f4fc; color: #3498db; display: flex; align-items: center; gap: 5px; } .record-button:hover, .speak-button:hover { background-color: #d1e9f9; } .record-button.recording { background-color: #ffe9e9; color: #e74c3c; animation: pulse 1.5s infinite; } .clear-button, .copy-button { background-color: #f5f5f5; color: #7f8c8d; } .clear-button:hover, .copy-button:hover { background-color: #e9e9e9; } .primary-button { width: 100%; padding: 15px; background-color: #3498db; color: white; font-size: 1rem; font-weight: 500; border-radius: 8px; } .primary-button:hover { background-color: #2980b9; } .status-message { text-align: center; min-height: 24px; color: #7f8c8d; font-size: 0.9rem; } .status-message.error { color: #e74c3c; } .status-message.success { color: #2ecc71; } /* Animation for recording */ @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } } /* Media queries for responsiveness */ @media (min-width: 768px) { .text-panels { flex-direction: row; } textarea { height: 150px; } } @media (max-width: 480px) { .container { padding: 10px; } h1 { font-size: 1.5rem; } .translation-panel { padding: 15px; } textarea { height: 100px; } .button-text { display: none; } .record-button, .speak-button, .clear-button, .copy-button { padding: 10px; flex: 1; justify-content: center; } }