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

body {
    font-family: 'Segoe UI', 'Yu Gothic UI', 'Hiragino Kaku Gothic ProN', sans-serif;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 30h60v60H30V30zm15 15v30h30V45H45z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

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

.title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    justify-content: center;
}

.icon {
    font-size: 2rem;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.translator-section {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 50px;
}

.input-section h2,
.output-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.input-container,
.output-container {
    position: relative;
}

#errorInput {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: inherit;
}

#errorInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quick-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 6px 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.quick-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.translate-button-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.translate-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

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

.btn-icon {
    font-size: 1.2rem;
}

.output-container {
    position: relative;
}

.output-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    min-height: 120px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.output-text.has-content {
    background: linear-gradient(135deg, #e8f5e8, #f0f8ff);
    border-color: #4CAF50;
    justify-content: flex-start;
    text-align: left;
    font-weight: 500;
}

.copy-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 15px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.copy-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

.examples-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 40px;
}

.examples-section h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

.examples-grid {
    display: grid;
    gap: 20px;
}

.example-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.example-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.example-tech {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.example-arrow {
    font-size: 1.5rem;
    color: #667eea;
}

.example-human {
    background: #ffebee;
    color: #c62828;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 768px) {
    .translator-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .example-card {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }
    
    .example-arrow {
        transform: rotate(90deg);
    }
    
    .title {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 20px;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

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

.usage-guide {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.usage-guide h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: white;
    text-align: center;
}

.usage-guide p {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.usage-guide p:last-child {
    margin-bottom: 0;
}