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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-text {
    flex: 1;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.language-selector {
    display: flex;
    align-items: center;
}

#langSelect {
    padding: 10px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 120px;
}

#langSelect:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

#langSelect:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

#langSelect option {
    background: #764ba2;
    color: white;
}

.input-section {
    padding: 40px;
    border-bottom: 2px solid #f0f0f0;
}

.input-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.input-help {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.input-help p {
    color: #666;
    font-size: 0.95em;
    margin: 5px 0;
}

#dataInput {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: border-color 0.3s;
}

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

.chart-type-selector {
    margin: 20px 0;
}

.chart-type-selector label {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

#chartType {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: border-color 0.3s;
}

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

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-import, .btn-export {
    padding: 12px 30px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-import {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-import:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
}

.btn-export {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-export:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.btn-export:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chart-section {
    padding: 40px;
}

.chart-section h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8em;
}

.chart-container {
    position: relative;
    height: 400px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-text {
        width: 100%;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .language-selector {
        width: 100%;
        justify-content: center;
    }
    
    #langSelect {
        width: 100%;
        max-width: 200px;
    }
    
    .input-section, .chart-section {
        padding: 20px;
    }
    
    .chart-container {
        height: 300px;
    }
}
