/* ===== ЦВЕТОВАЯ ПАЛИТРА ОБМЕНЯЙКА ===== */
:root {
    /* Основные цвета */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --primary-light: #e3f2fd;
    
    /* Акцентные цвета */
    --accent-color: #28a745;
    --accent-light: #d4edda;
    --accent-dark: #218838;
    
    /* Текст */
    --text-color: #2c3e50;
    --text-secondary: #666;
    --text-light: #999;
    
    /* Фоны */
    --bg-color: #f5f7fa;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    
    /* Статусы */
    --success-bg: #d4edda;
    --success-text: #155724;
    --warning-bg: #fff3cd;
    --warning-text: #856404;
    --danger-bg: #f8d7da;
    --danger-text: #721c24;
    --info-bg: #d1ecf1;
    --info-text: #0c5460;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Шапка */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.credits-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    display: none;
}

/* Кнопки в шапке */
.btn {
    padding: 8px 12px;
    font-size: 14px;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 13px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .header {
        padding: 10px 0;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .nav {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    
    .user-info {
        gap: 5px;
    }
    
    .credits-badge {
        padding: 3px 10px;
        font-size: 11px;
    }
    
    .user-name {
        display: none;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .btn-sm {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    /* Скрываем текст кнопок на очень маленьких экранах */
    @media (max-width: 480px) {
        .btn {
            padding: 5px 8px;
            font-size: 11px;
        }
        
        .btn-sm {
            padding: 4px 6px;
            font-size: 10px;
        }
        
        /* Можно скрыть некоторые кнопки на очень маленьких экранах */
        /* .btn-chat, .btn-location { display: none; } */
    }
}
/* Результаты поиска */
.results-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    display: none;
}

.chain-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.chain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chain-type {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.chain-steps {
    margin: 15px 0;
}

.chain-step {
    display: flex;
    align-items: center;
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.chain-arrow {
    margin: 0 15px;
    color: #667eea;
    font-weight: bold;
    font-size: 20px;
}

.step-info {
    flex: 1;
}

.step-user {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.step-skill {
    font-size: 14px;
    color: #666;
}

.step-credits {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.chain-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
}

.total-credits {
    font-size: 16px;
    font-weight: bold;
    color: #dc3545;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #888;
}

.empty-state h3 {
    color: #999;
    margin-bottom: 10px;
}
/* Главный контент */
.main {
    padding: 40px 0;
}

/* Герой */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #333;
}

.hero-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

/* Поиск */
/* Блок поиска */
.search-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    overflow: hidden;
}

.search-container {
    max-width: 100%;
}

.search-container h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 20px;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
    min-width: 0; /* Важно для мобильных */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .search-section {
        padding: 15px;
    }
    
    .search-container h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .search-form {
        gap: 12px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn-block {
        padding: 10px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .search-section {
        padding: 12px;
    }
    
    .search-container h3 {
        font-size: 16px;
    }
    
    .form-group input,
    .form-group select {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .btn-block {
        padding: 9px;
        font-size: 14px;
    }
}
.search-container h3 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.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: #e0e0e0;
    color: #333;
}

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

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

/* Результаты */
.results-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.chain-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.chain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chain-type {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.chain-steps {
    margin: 15px 0;
}

.chain-step {
    display: flex;
    align-items: center;
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.chain-arrow {
    margin: 0 15px;
    color: #667eea;
    font-weight: bold;
}

.step-info {
    flex: 1;
}

.step-user {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.step-skill {
    font-size: 14px;
    color: #666;
}

.step-credits {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}

.chain-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
}

.total-credits {
    font-size: 18px;
    font-weight: bold;
    color: #dc3545;
}

/* Сетка навыков */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skill-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.skill-card.my-skill {
    border-left: 4px solid #667eea;
}

.skill-category {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.skill-card h4 {
    margin-bottom: 8px;
    color: #333;
}

.skill-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.skill-level,
.skill-price {
    font-size: 13px;
    margin-bottom: 5px;
}

.skill-level {
    color: #555;
}

.skill-price {
    color: #dc3545;
    font-weight: 600;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 700px;
    max-height: 90vh;
}

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

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
    z-index: 1001;
}

.close:hover {
    color: #333;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #888;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Футер */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .chain-step {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chain-arrow {
        margin: 10px 0;
    }
}
/* Сетка навыков для рекомендаций */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skill-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.skill-category {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.skill-card h4 {
    margin-bottom: 8px;
    color: #333;
}

.skill-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.skill-level,
.skill-price {
    font-size: 13px;
    margin-bottom: 5px;
}

.skill-level {
    color: #555;
}

.skill-price {
    color: #dc3545;
    font-weight: 600;
}
