/* Основные цвета темы XAUM.RU */
:root {
    --gold: #FFD700;
    --gold-dark: #B8860B;
    --coal: #333333;
    --dollar: #85BB65;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
    --shadow: rgba(0, 0, 0, 0.1);
    --light-bg: #f5f5f5;
    --white: #ffffff;
}

/* Сброс и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--coal);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Шапка сайта */
.header {
    background: linear-gradient(135deg, var(--coal) 0%, #444444 100%);
    color: var(--white);
    text-align: center;
    padding: 2rem 1rem;
    border-bottom: 5px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--dollar), var(--silver));
}

.header h1 {
    margin: 0;
    font-size: 3rem;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gold { 
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}
.silver { 
    color: var(--silver);
}
.dollar { 
    color: var(--dollar);
}

.tagline {
    margin-top: 0.5rem;
    font-size: 1.2rem;
    color: #cccccc;
    font-weight: 300;
}

.home-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.home-link:hover {
    opacity: 0.9;
}

/* Навигация и хлебные крошки */
.breadcrumbs {
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 1rem;
    color: #666666;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--dollar);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--coal);
    font-weight: 500;
}

/* Основное содержимое */
.main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
    width: 100%;
}

/* Поиск на главной */
.search-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0 1rem;
}

.search-input {
    width: 70%;
    max-width: 500px;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid var(--gold);
    border-right: none;
    border-radius: 50px 0 0 50px;
    outline: none;
    background: var(--white);
    color: var(--coal);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
    border-color: var(--dollar);
    box-shadow: 0 0 0 3px rgba(133, 187, 101, 0.2);
}

.search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--dollar), #6da84f);
    color: var(--white);
    border: none;
    border-radius: 0 50px 50px 0;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.search-btn:hover {
    background: linear-gradient(135deg, #6da84f, var(--dollar));
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--shadow);
}

.search-btn:active {
    transform: translateY(0);
}

.search-hint {
    text-align: center;
    color: #666666;
    margin-bottom: 3rem;
    font-style: italic;
}

/* Кнопки категорий */
.category-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.category-btn {
    background: linear-gradient(145deg, #444444, var(--coal));
    color: var(--white);
    padding: 25px 15px;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.category-btn:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(145deg, var(--coal), #444444);
}

/* Секция с лидерами */
.top-leaders {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px var(--shadow);
    border: 1px solid #eeeeee;
}

.top-leaders h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--coal);
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 10px;
}

.top-leaders h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--dollar));
    border-radius: 2px;
}

.leaders-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.leader-card {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    padding: 1.5rem;
    border: 3px solid;
    border-radius: 10px;
    text-align: center;
    background-color: #fafafa;
    transition: transform 0.3s, box-shadow 0.3s;
}

.leader-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px var(--shadow);
}

.leader-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.leader-card p {
    margin: 0.5rem 0;
}

/* Секция рейтинга */
.rating-section {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px var(--shadow);
    border: 1px solid #eeeeee;
    margin-bottom: 2rem;
}

.rating-section h2 {
    color: var(--coal);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.section-info {
    color: #666666;
    margin-bottom: 1.5rem;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--dollar);
}

/* Элементы управления */
.controls {
    margin: 1.5rem 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.controls label {
    font-weight: 500;
    color: var(--coal);
}

#sortSelect {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: var(--white);
    color: var(--coal);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 200px;
}

#sortSelect:focus {
    outline: none;
    border-color: var(--dollar);
    box-shadow: 0 0 0 3px rgba(133, 187, 101, 0.2);
}

/* Таблица рейтинга */
.rating-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.rating-table th {
    background: linear-gradient(to bottom, var(--coal), #444444);
    color: var(--white);
    padding: 15px 10px;
    text-align: left;
    border-bottom: 3px solid var(--gold);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.rating-table th small {
    font-weight: normal;
    opacity: 0.8;
    font-size: 0.8rem;
}

.rating-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #eeeeee;
    vertical-align: middle;
}

.rating-table tr:last-child td {
    border-bottom: none;
}

/* Цветовые группы строк */
.gold-row {
    background-color: rgba(255, 215, 0, 0.08);
    border-left: 4px solid var(--gold);
}

.silver-row {
    background-color: rgba(192, 192, 192, 0.08);
    border-left: 4px solid var(--silver);
}

.bronze-row {
    background-color: rgba(205, 127, 50, 0.08);
    border-left: 4px solid var(--bronze);
}

/* Ссылки на сервисы */
.service-link {
    color: var(--coal);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s;
}

.service-link:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}

/* Кнопка "Перейти" */
.go-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--dollar), #6da84f);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    text-align: center;
    min-width: 80px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.go-btn:hover {
    background: linear-gradient(135deg, #6da84f, var(--dollar));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

/* Иконки и бейджи */
.partner-icon {
    color: var(--dollar);
    font-weight: bold;
    margin-right: 5px;
    font-size: 1.1rem;
}

.best-partner-badge {
    display: inline-block;
    background: linear-gradient(45deg, #FFD700, #FFED4E);
    color: var(--coal);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
    border: 1px solid var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Подвал */
.footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    background-color: var(--coal);
    color: #aaaaaa;
    border-top: 3px solid var(--gold);
}

.footer a {
    color: var(--dollar);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }
    
    .category-buttons {
        grid-template-columns: 1fr;
    }
    
    .search-input {
        width: 60%;
        font-size: 1rem;
    }
    
    .leaders-container {
        flex-direction: column;
        align-items: center;
    }
    
    .leader-card {
        width: 100%;
        max-width: 100%;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    #sortSelect {
        width: 100%;
    }
    
    .rating-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
    }
    
    .rating-table th,
    .rating-table td {
        padding: 10px 5px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .search-container {
        flex-direction: column;
        align-items: center;
    }
    
    .search-input {
        width: 90%;
        border-radius: 50px;
        border-right: 2px solid var(--gold);
        margin-bottom: 10px;
    }
    
    .search-btn {
        width: 90%;
        border-radius: 50px;
    }
    
    .category-btn {
        padding: 20px 10px;
        font-size: 1.1rem;
        min-height: 100px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.category-btn, .leader-card, .rating-table tr {
    animation: fadeIn 0.5s ease-out;
}

/* Стили для скроллбара (опционально) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--dollar), var(--gold));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--gold), var(--dollar));
}