﻿* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.container { width: 100%; max-width: 560px; }
header { text-align: center; margin-bottom: 24px; color: #fff; }
header h1 { font-size: 32px; font-weight: 700; }
.subtitle { margin-top: 6px; opacity: 0.85; font-size: 15px; }
.card {
    background: #fff; border-radius: 16px; padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
textarea {
    width: 100%; padding: 12px 14px; border: 1.5px solid #e0e0e0; border-radius: 10px;
    font-size: 15px; font-family: inherit; resize: vertical; transition: border-color 0.2s; outline: none;
}
textarea:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.15); }
.char-count { text-align: right; font-size: 12px; color: #999; margin-top: 4px; }
.lang-row { display: flex; align-items: end; gap: 10px; margin-bottom: 16px; }
.lang-group { flex: 1; }
.lang-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
select {
    width: 100%; padding: 10px 12px; border: 1.5px solid #e0e0e0; border-radius: 8px;
    font-size: 14px; font-family: inherit; background: #fff; outline: none; cursor: pointer;
}
select:focus { border-color: #667eea; }
.swap-btn {
    flex-shrink: 0; padding: 10px 14px; border: 1.5px solid #e0e0e0; border-radius: 8px;
    background: #f8f8f8; font-size: 18px; cursor: pointer; transition: all 0.2s; line-height: 1;
}
.swap-btn:hover { background: #eee; border-color: #ccc; }
.translate-btn {
    width: 100%; padding: 14px; background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: opacity 0.2s, transform 0.1s;
}
.translate-btn:hover { opacity: 0.9; }
.translate-btn:active { transform: scale(0.98); }
.translate-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.result-area {
    margin-top: 20px; padding: 16px; background: #f8f9ff; border-radius: 10px; border: 1.5px solid #e8eaff;
}
.result-area label { display: block; font-size: 13px; font-weight: 600; color: #667eea; margin-bottom: 8px; }
.result-text { font-size: 16px; line-height: 1.6; color: #333; word-break: break-word; }
.error-area {
    margin-top: 12px; padding: 12px 14px; background: #fff0f0;
    border: 1.5px solid #ffd4d4; border-radius: 8px; color: #d32f2f; font-size: 14px;
}
.hidden { display: none; }
footer { text-align: center; margin-top: 20px; color: rgba(255,255,255,0.6); font-size: 13px; }
