* {
    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(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
}

.translator-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

.input-section {
    margin-bottom: 30px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.direction-toggle {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.direction-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.direction-toggle input[type="radio"] {
    cursor: pointer;
}

.translate-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.translate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.translate-btn:active {
    transform: translateY(0);
}

.translate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.output-section {
    border-top: 2px solid #f0f0f0;
    padding-top: 30px;
}

.output-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    margin-top: 10px;
}

#output-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    padding-right: 50px;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.copy-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.copy-btn.copied {
    border-color: #4caf50;
    color: #4caf50;
}

.direction-label {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.examples {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.examples h3 {
    color: white;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.example-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.example-label {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.example-text {
    color: #666;
    font-style: italic;
    margin-bottom: 5px;
}

.example-arrow {
    text-align: center;
    color: #667eea;
    font-size: 1.5rem;
    margin: 10px 0;
}

.example-result {
    color: #333;
    font-weight: 500;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255,255,255,0.7);
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    
    .translator-box {
        padding: 25px;
    }
    
    .direction-toggle {
        flex-direction: column;
        gap: 10px;
    }
}
