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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #4a6ee0 0%, #6a49a2 100%);
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4caf50;
    animation: pulse 2s infinite;
}

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

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    padding: 30px;
    min-height: 600px;
}

.translation-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.language-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flag {
    font-size: 2rem;
}

.language-info h2 {
    font-size: 1.4rem;
    font-weight: 600;
}

.lang-code {
    background: #4a6ee0;
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

textarea {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    resize: none;
    transition: all 0.3s ease;
    background: white;
}

textarea:focus {
    outline: none;
    border-color: #4a6ee0;
    box-shadow: 0 0 0 3px rgba(74, 110, 224, 0.1);
}

.text-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.icon-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}

.icon-btn:hover {
    background: #4a6ee0;
    color: white;
    border-color: #4a6ee0;
    transform: translateY(-2px);
}

.icon-btn.small {
    padding: 8px 12px;
}

/* Control Panel */
.control-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    min-width: 200px;
}

.translate-button {
    background: linear-gradient(135deg, #4a6ee0 0%, #6a49a2 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(74, 110, 224, 0.3);
}

.translate-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(74, 110, 224, 0.4);
}

.translate-button:active {
    transform: translateY(-2px);
}

.translation-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 10px;
    color: #4a6ee0;
    font-size: 0.9rem;
}

.settings {
    width: 100%;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.settings h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #555;
}

.setting-option {
    margin-bottom: 10px;
}

.setting-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

/* Result Panel */
.result-container {
    flex: 1;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    overflow-y: auto;
    min-height: 200px;
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #adb5bd;
    text-align: center;
}

.placeholder i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.translation-details {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
    font-size: 0.9rem;
}

/* Sample Texts */
.sample-texts {
    margin-top: 20px;
}

.samples-title {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.samples-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.sample-btn {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #555;
}

.sample-btn:hover {
    background: #f0f7ff;
    border-color: #4a6ee0;
    color: #4a6ee0;
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.stat i {
    font-size: 1.5rem;
    color: #4a6ee0;
}

.stat div {
    display: flex;
    flex-direction: column;
}

.stat span {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.stat small {
    color: #666;
    font-size: 0.85rem;
}

.footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.footer-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.info-btn {
    background: transparent;
    border: 2px solid #4a6ee0;
    color: #4a6ee0;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.info-btn:hover {
    background: #4a6ee0;
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #4a6ee0 0%, #6a49a2 100%);
    color: white;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 30px;
}

.modal-body h3 {
    margin-bottom: 15px;
    color: #333;
}

.modal-body ul {
    margin: 15px 0 20px 20px;
}

.modal-body li {
    margin-bottom: 8px;
    color: #555;
}

.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a6ee0, #6a49a2);
    width: 0%;
    transition: width 0.5s ease;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .control-panel {
        flex-direction: row;
        justify-content: space-between;
        min-width: auto;
    }
    
    .translate-button {
        order: 1;
    }
    
    .translation-info {
        order: 2;
        flex-direction: row;
        width: auto;
    }
    
    .settings {
        order: 3;
        width: auto;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .footer-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .control-panel {
        flex-direction: column;
    }
    
    .translation-info {
        flex-direction: column;
        width: 100%;
    }
    
    .settings {
        width: 100%;
    }
}