:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #ec4899;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f1f5f9;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    font-family: 'Source Sans Pro', sans-serif;
}

.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    gap: 0;
}

.form-container {
    background: white;
    padding: 40px;
    overflow-y: auto;
    max-height: 100vh;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--dark);
    font-weight: 600;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
}

label i {
    
    
    color: var(--primary);
    font-size: 1.1rem;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: 'Source Sans Pro', sans-serif;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.checkbox-group input {
    width: auto;
    transform: scale(1.1);
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 32px;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn i {
    margin-right: 10px;
}

.output-container {
    background: var(--light);
    padding: 40px;
    overflow-y: auto;
    max-height: 100vh;
    border-left: 1px solid var(--light-gray);
}

.output-header {
    margin-bottom: 20px;
}

.output-title {
    font-size: 1.25rem;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.output-title i {
    margin-right: 10px;
    color: var(--primary);
}

.output-instruction {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

#copyBtn {
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

#copyBtn:hover {
    background: #db2777;
    transform: translateY(-1px);
}

#copyBtn i {
    margin-right: 6px;
}

#promptOutput {
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    border-left: 4px solid #ec4899;
    white-space: pre-wrap;
    min-height: 400px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    font-size: 0.9rem;
    color: var(--dark);
}

.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    color: var(--primary);
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 250px;
    background-color: var(--dark);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    line-height: 1.4;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.value-info {
    margin-top: 12px;
    padding: 12px;
    background-color: #f0f9ff;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
    font-size: 0.9rem;
    display: none;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.hidden-fields {
    display: none;
}

.toggle-advanced {
    margin-top: 16px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    color: var(--gray);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.toggle-advanced:hover {
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .output-container {
        border-left: none;
        border-top: 1px solid var(--light-gray);
    }
}

/* Улучшение для тач-устройств */
@media (hover: none) and (pointer: coarse) {
    .btn, .cta-btn, .auth-btn {
        min-height: 44px; /* Минимальный размер для удобного нажатия */
    }
    
    input, select, textarea {
        min-height: 44px;
    }
}

@media (max-width: 768px) {
    .form-container, .output-container {
        padding: 20px 16px;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    input, select, textarea {
        padding: 12px 14px;
        font-size: 16px; /* Предотвращает зум на iOS */
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    label {
        font-size: 0.9rem;
    }

    label i {
        font-size: 1rem;
    }

    .btn {
        padding: 14px 20px;
        font-size: 0.95rem;
        width: 100%;
    }

    .output-container {
        max-height: none;
    }

    #promptOutput {
        font-size: 0.85rem;
        padding: 16px;
        overflow-x: auto;
        word-wrap: break-word;
    }

    .tooltip .tooltiptext {
        width: 200px;
        font-size: 0.8rem;
    }

    .value-info {
        font-size: 0.85rem;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .form-container, .output-container {
        padding: 16px 12px;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }
    
    input, select, textarea {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }

    label {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }

    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    #promptOutput {
        font-size: 0.8rem;
        padding: 12px;
    }
}

/* ============================================
   ЕДИНОЕ СТАНДАРТНОЕ АДАПТИВНОЕ МЕНЮ
   ============================================ */

/* Стандартный header для всех страниц */
.header {
    background: var(--gradient);
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 10002;
    min-height: 60px;
}

.header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    z-index: 20000;
}

.header h1 a {
    color: white;
    text-decoration: none;
    
}

.header h1 a:hover {
    text-decoration: none;
}

.header h1 i {
    font-size: 1.2rem;
}

/* Селектор языка */
.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
    z-index: 20001;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Source Sans Pro', sans-serif;
    min-width: 100px;
}

.language-selector select:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.language-selector select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.language-selector select option {
    background: var(--primary);
    color: white;
}

.language-selector i {
    color: white;
    font-size: 1rem;
}

/* Десктопное меню скрыто на всех устройствах - используется мобильное меню */
.header-actions {
    display: none !important;
}

/* Адаптивность для header */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .language-selector {
        margin-right: 10px;
    }
    
    .language-selector select {
        padding: 5px 10px;
        font-size: 0.85rem;
        min-width: 90px;
    }
    
    .language-selector i {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 12px 16px;
        min-height: 55px;
    }
    
    .header h1 {
        font-size: 1.1rem;
    }
    
    .language-selector {
        margin-right: 8px;
        gap: 6px;
    }
    
    .language-selector select {
        padding: 4px 8px;
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .language-selector i {
        font-size: 0.85rem;
    }
}

