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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Левая панель */
.sidebar {
    width: 300px;
    background-color: #2c3e50;
    padding: 20px;
    color: white;
}

.sidebar h2 {
    margin-bottom: 20px;
    color: #ecf0f1;
    font-size: 1.5em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.topics-list {
    list-style: none;
}

.topics-list li {
    margin-bottom: 8px;
}

.topics-list a {
    text-decoration: none;
    color: #bdc3c7;
    padding: 10px 15px;
    display: block;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 0.95em;
}

.topics-list a:hover {
    background-color: #34495e;
    color: #3498db;
}

/* Основная область контента */
.content {
    flex: 1;
    padding: 40px;
    background-color: white;
    overflow-y: auto;
}

#content-area {
    max-width: 900px;
}

#content-area h1 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 2em;
}

#content-area p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

/* Стили для подменю */
.has-submenu {
    position: relative;
}

.submenu-toggle {
    cursor: pointer;
    padding: 10px 15px;
    display: block;
    color: #3498db;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-weight: bold;
    background-color: #34495e;
    margin: 5px 0;
}

.submenu-toggle:hover {
    background-color: #3d566e;
}

.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 15px;
    border-left: 2px solid #3498db;
    padding-left: 10px;
}

.submenu.active {
    max-height: 1000px;
}

.submenu li {
    margin-bottom: 5px;
}

.submenu a {
    padding: 8px 12px;
    font-size: 0.9em;
    display: block;
    background-color: transparent;
}

/* Стили для контента */
.content-section {
    max-width: 800px;
}

.partner-info {
    background: #e8f4fc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.partner-name {
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.2em;
}

.option-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.option-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.option-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.option-details p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.option-details strong {
    color: #2c3e50;
}

.calculation {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
}

.calculation strong {
    color: #e17055;
}

/* Дополнительные улучшения */
.content h1 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.content h2 {
    color: #34495e;
    margin: 30px 0 20px 0;
    font-size: 1.5em;
}

.content ul, .content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Стили для скриптов */
.instruction {
    background: #e8f4fc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
    font-style: italic;
}

.script-card {
    background: white;
    border: 2px solid #3498db;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.script-header {
    background: #3498db;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.script-header h3 {
    margin: 0;
    color: white;
    font-size: 1.3em;
}

.copy-btn {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #27ae60;
}

.script-content {
    display: none; /* Скрываем оригинальный текст, он нужен только для копирования */
}

.script-preview {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
}

.script-preview h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.preview-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    white-space: pre-line;
    line-height: 1.6;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    color: #333;
}

/* Стили для компактного скрипта */
.script-preview {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 0;
    margin-top: 20px;
    overflow: hidden;
}

.preview-header {
    background: #3498db;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.preview-header h3 {
    margin: 0;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
}

.copy-btn-compact {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
}

.copy-btn-compact:hover {
    background: #27ae60;
    transform: translateY(-1px);
}

.preview-content {
    background: white;
    padding: 25px;
    white-space: pre-line;
    line-height: 1.6;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    color: #333;
    max-height: 500px;
    overflow-y: auto;
}

/* Убираем старые стили */
.script-card {
    display: none;
}

.instruction {
    display: none;
}

/* Стили для дополнительных партнеров */
.additional-partners {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #bdc3c7;
}

.additional-partners p {
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 500;
}

.additional-partners ul {
    margin-left: 20px;
    margin-bottom: 0;
}

.additional-partners li {
    margin-bottom: 5px;
    color: #555;
    line-height: 1.4;
}

.additional-partners strong {
    color: #000000;
}

/* Стили для платежных систем */
.payment-systems {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.payment-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.payment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.payment-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    padding: 20px;
    color: white;
}

.payment-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
}

.payment-content {
    padding: 20px;
}

.payment-content p {
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 500;
}

.payment-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.payment-content li {
    margin-bottom: 6px;
    color: #555;
    line-height: 1.4;
}

/* Стили для ссылок в скриптах */
.preview-content a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #3498db;
    transition: all 0.3s;
}

.preview-content a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
    background-color: #f8f9fa;
}

/* Стиль для дополнительных партнеров */
.additional-partner {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
}

.additional-partner .partner-name {
    color: #e65100;
}

.commission-info {
    margin-top: 10px;
}

.commission-info p {
    margin-bottom: 8px;
    color: #2c3e50;
}

.commission-info ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.commission-info li {
    margin-bottom: 4px;
    color: #555;
}

/* Стили для алгоритма общения */
.algorithm-info {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
}

.algorithm-info h3 {
    color: #2e7d32;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
}

.algorithm-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
}

.step-number {
    background: #4caf50;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    flex-shrink: 0;
}

.step-text {
    color: #333;
    line-height: 1.5;
    flex: 1;
}

/* Стиль для предупреждения о верификации */
.verification-warning {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #f44336;
    margin-top: 15px;
    font-weight: 600;
}

/* Стили для сворачиваемого списка городов */
.cities-collapsible {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.cities-header {
    background: #3498db;
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.cities-header:hover {
    background: #2980b9;
}

.cities-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.cities-toggle {
    font-size: 1.2em;
    transition: transform 0.3s;
}

.cities-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.cities-content.active {
    max-height: 500px;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 25px;
}

.city-column div {
    padding: 8px 0;
    color: #2c3e50;
    border-bottom: 1px solid #f0f0f0;
}

.city-column div:last-child {
    border-bottom: none;
}