/* Общие стили */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

/* Заголовок */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Основной макет */
.editor-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Панель настроек */
.settings-panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    height: fit-content;
}

.settings-panel h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.settings-panel h4 {
    color: #555;
    margin: 20px 0 15px 0;
    font-size: 1.1rem;
}

/* Группы ввода */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

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

/* Кнопки */
.controls {
    margin-top: 25px;
    display: grid;
    gap: 10px;
}

.btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

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

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

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(250, 112, 154, 0.4);
}

/* Панель кода */
.code-panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.code-panel h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.code-info {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.code-info span {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: 600;
}

/* Область кода */
#codeOutput {
    background: #2d3748 !important;
    border-radius: 8px;
    padding: 20px;
    margin: 0;
    overflow-x: auto;
    max-height: 70vh;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    border: 1px solid #e1e5e9;
}

#swiftCode {
    color: #e2e8f0 !important;
    background: transparent !important;
}

/* Скролл */
#codeOutput::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#codeOutput::-webkit-scrollbar-track {
    background: #4a5568;
    border-radius: 4px;
}

#codeOutput::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

#codeOutput::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* Подвал */
footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-panel, .code-panel {
    animation: fadeIn 0.6s ease-out;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .editor-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .settings-panel {
        order: 2;
    }
    
    .code-panel {
        order: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .settings-panel, .code-panel {
        padding: 20px;
    }
    
    #codeOutput {
        max-height: 50vh;
        font-size: 0.8rem;
    }
}

/* Состояния загрузки */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Навигационное меню */
.main-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.nav-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.nav-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.nav-tab {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px 24px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
    justify-content: center;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.nav-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

/* Контент вкладок */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* YAML Layout (аналогично editor-layout) */
.yaml-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* YAML Output стили */
#yamlOutput {
    background: #2d3748 !important;
    border-radius: 8px;
    padding: 20px;
    margin: 0;
    overflow-x: auto;
    max-height: 70vh;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    border: 1px solid #e1e5e9;
}

#yamlCode {
    color: #e2e8f0 !important;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive для новых элементов */
@media (max-width: 1024px) {
    .yaml-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-tab {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .nav-header h1 {
        font-size: 2rem;
    }
    
    .nav-header p {
        font-size: 1rem;
    }
    
    .main-nav {
        padding: 15px;
    }
    
    .nav-tab {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 120px;
    }
} 