/* --- Глобальные стили и переменные --- */
:root {
    --wallet-primary: #724ebd;
    --wallet-secondary: #5e35b1;
    --wallet-dark: #515050;
    --body-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #212529;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --success-color: #5e35b1;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --border-radius: 12px;
    /* Убрали Manrope, наследуем Montserrat */
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Секция Hero --- */
.hero {
    padding: 50px 0;
    background: linear-gradient(135deg, #01284b 0%, #734dbd 50% 50%, #355bb1 90%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.breadcrumbs { margin-bottom: 30px; }
.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}
.hero h1 {
    /* Стандарт H1 */
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}
.hero p {
    /* Стандарт описания Hero */
    font-size: 1.1rem;
    color: #e2e8f0;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
}
.hero-stat .value {
    /* Стандарт цифр Hero */
    font-size: 2.3rem;
    font-weight: 800;
}
.hero-stat .label {
    font-size: 0.9rem;
    color: #cbd5e0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Фильтры (Обновленные стили) --- */
.filters-section {
    padding: 20px 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 80px;
    z-index: 100;
}
.filters {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-group label {
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    font-size: 0.9rem;
}
.filter-select {
    padding: 8px 30px 8px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}
.filter-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}
.filter-tag {
    text-decoration: none;
    display: inline-block;
    padding: 6px 14px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
    cursor: pointer;
}
.filter-tag:hover {
    border-color: var(--wallet-primary);
    color: var(--wallet-primary);
}
.filter-tag.active {
    background: var(--wallet-primary);
    color: white;
    border-color: var(--wallet-primary);
}

/* --- Секция сравнения --- */
.comparison-section {
    margin-bottom: 60px;
}
.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.comparison-header h2 {
    /* Стандарт H2 */
    font-size: 2rem;
    font-weight: 800;
    color: var(--wallet-dark);
}
.comparison-toggle .fas {
    margin-right: 8px;
}

.comparison-table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}
.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.comparison-table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}
.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
}
.comparison-table tr:last-child td {
    border-bottom: none;
}
.comparison-table tr:hover td {
    background: rgba(16, 185, 129, 0.02);
}
.wallet-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1rem;
}
.wallet-logo1 {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.stars {
    color: #fbbf24;
    font-size: 1rem;
    letter-spacing: 1px;
}
.rating-value {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.wallet-type {
    font-weight: 600;
    color: var(--wallet-primary);
    font-size: 0.85rem;
}
.coins-count {
    font-weight: 700;
    color: var(--wallet-secondary);
}
.price {
    font-weight: 700;
    color: var(--text-color);
}

/* Уровни безопасности */
.security-level {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}
.security-level.security-высокий,
.security-level.security-high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}
.security-level.security-средний,
.security-level.security-medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}
.security-level.security-низкий,
.security-level.security-low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* --- Карточки кошельков --- */
.wallets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(328px, 1fr));
    gap: 30px;
    margin-top: 5px;
}
.wallet-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}
.wallet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--wallet-primary), var(--wallet-secondary));
}
.wallet-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.wallet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px 0 24px;
    margin-bottom: 24px;
    width: 100%;
}
.wallet-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.wallet-logo-large {
    width: 50px;
    height: 50px;
    border-radius: 12px;
}
.wallet-details h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--wallet-dark);
}
.wallet-type {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.wallet-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wallet-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 24px;
    margin-bottom: 20px;
    width: 100%;
}
.stat-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    height: 100%;
    box-sizing: border-box;
}

.stat-box .value {
    font-weight: 700;
    font-size: 1.1rem; /* Унифицировано с биржами */
    color: var(--wallet-primary);
    margin: 0 0 6px 0; 
    line-height: 1.2;
    text-align: center; 
    width: 100%;
}
.stat-box .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;         
    line-height: 1;
    text-align: center; 
}

.stars-wrapper {
    margin: 0 auto;
    display: inline-block;
}

.wallet-features1 {
    padding: 0 24px;
    margin-bottom: 24px;
    flex-grow: 1;
}
.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.feature-tag {
    padding: 4px 10px;
    background: rgba(106, 68, 255, 0.08);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}
.wallet-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding: 0 24px 24px 24px;
    width: 100%;
}
.wallet-actions .btn {
    flex: 1;
    padding: 10px;
    font-weight: 700;
}
.wallet-actions .btn-outline {
    border: 2px solid var(--border-color);
}
.wallet-actions .btn-outline:hover {
    border-color: var(--wallet-primary);
    color: #fff;
}
.wallet-actions .btn-primary {
    background: var(--wallet-primary);
    border: none;
}
.wallet-actions .btn-primary:hover {
    background: #5016c5;
}
.wallet-actions .btn-primary .fa-xs {
    margin-left: 5px;
    font-size: 0.7em;
    vertical-align: middle;
}

/* --- Кнопки --- */
.btn {
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}
.btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--wallet-primary);
    color: white;
    border-radius: 8px;
    transition: var(--transition);
}
.btn-table-action:hover {
    background: white;
    transform: scale(1.1);
}

/* --- Анимации --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   МОБИЛЬНАЯ АДАПТАЦИЯ - КОШЕЛЬКИ
   ============================================ */

/* === БРЕЙКПОИНТ 1200px === */
@media (max-width: 1200px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-stats {
        gap: 40px;
    }
    
    .wallets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* === БРЕЙКПОИНТ 992px === */
@media (max-width: 992px) {
    /* Hero */
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
        margin-top: 40px;
    }
    
    .hero-stat .value {
        font-size: 2rem;
    }
    
    /* Фильтры */
    .filters-section {
        position: static;
        top: auto;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-tags {
        margin-left: 0;
        justify-content: flex-start;
    }
    
    /* Таблица сравнения */
    .comparison-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .comparison-header h2 {
        font-size: 1.8rem;
    }
    
    .comparison-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .comparison-table table {
        min-width: 700px;
    }
    
    /* Карточки */
    .wallets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* === БРЕЙКПОИНТ 768px (Планшеты портрет) === */
@media (max-width: 768px) {
   /* Hero */
    .hero {
        padding: 30px 0;
    }
    
    .hero h1 {
        /* Синхронизация с responsive.css */
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 25px;
        margin-top: 35px;
    }
    
    .hero-stat .value {
        font-size: 1.8rem;
    }
    
    .hero-stat .label {
        font-size: 0.85rem;
    }
    
    /* Хлебные крошки */
    .breadcrumbs {
        margin-bottom: 20px;
        font-size: 0.85rem;
    }
    
    /* --- ИСПРАВЛЕНИЕ ТАБЛИЦЫ --- */
    .comparison-section {
        margin-bottom: 40px;
        width: 100%;       
        max-width: 100%;   
        overflow: hidden;  
    }
    
    .comparison-table {
        display: block;      
        width: 100%;         
        max-width: 100%;     
        overflow-x: auto;    
        -webkit-overflow-scrolling: touch; 
        border-radius: 12px;
    }
    
    .comparison-table table {
        width: max-content;  
        min-width: 700px;    
        border-collapse: separate;
    }
    
    .comparison-table th, 
    .comparison-table td {
        white-space: nowrap; 
        padding: 10px;
    }
    
    .comparison-header h2 {
        /* Синхронизация с responsive.css */
        font-size: 1.5rem;
    }
    
    .comparison-toggle {
        width: 100%;
        justify-content: center;
    }
    
    /* Заголовок каталога */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Фильтры */
    .filters1 {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
        padding: 12px 35px 12px 15px;
    }
    
    .filter-tags {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
        flex-wrap: nowrap;
    }
    
    .filter-tag {
        flex-shrink: 0;
        padding: 8px 16px;
    }
    
    /* Карточки - одна колонка */
    .wallets-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Внутренности карточки */
    .wallet-card {
        border-radius: 14px;
    }
    
    .wallet-header {
        padding: 20px 16px 0 16px;
        margin-bottom: 20px;
    }
    
    .wallet-logo-large {
        width: 45px;
        height: 45px;
    }
    
    .wallet-details h3 {
        font-size: 1.1rem;
    }
    
    .wallet-type {
        font-size: 0.8rem;
    }
    
    .wallet-badge {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    /* Статистика внутри карточки */
    .wallet-stats {
        padding: 0 16px;
        margin-bottom: 20px;
        gap: 10px;
    }
    
    .stat-box {
        padding: 12px 8px;
        min-height: 75px;
        border-radius: 10px;
    }
    
    .stat-box .value {
        font-size: 1rem;
    }
    
    .stat-box .label {
        font-size: 0.7rem;
        margin-top: 4px;
    }
    
    /* Теги фишек */
    .wallet-features1 {
        padding: 0 16px;
        margin-bottom: 20px;
    }
    
    .features-list {
        gap: 6px;
    }
    
    .feature-tag {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    /* Кнопки */
    .wallet-actions {
        padding: 0 16px 20px 16px;
        gap: 10px;
    }
    
    .wallet-actions .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* === БРЕЙКПОИНТ 576px (Большие телефоны) === */
@media (max-width: 576px) {
    /* Hero */
    .hero {
        padding: 25px 0;
    }
    
    
    .hero-stats {
        gap: 20px;
        margin-top: 30px;
    }
    
    .hero-stat .value {
        font-size: 1.5rem;
    }
    
    .hero-stat .label {
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
    
    /* Таблица */
    .comparison-table th,
    .comparison-table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
    
    .wallet-name {
        font-size: 0.95rem;
        gap: 8px;
    }
    
    .wallet-logo1 {
        width: 28px;
        height: 28px;
    }
    
    /* Карточки */
    .wallet-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .wallet-badge {
        align-self: flex-start;
    }
    
    .stat-box {
        min-height: 70px;
        padding: 10px 6px;
    }
    
    .stat-box .value {
        font-size: 0.95rem;
    }
    
    
    /* Звезды рейтинга */
    .stars-wrapper {
        font-size: 0.75rem;
    }
}

/* === БРЕЙКПОИНТ 480px (Средние телефоны) === */
@media (max-width: 480px) {
    
    .hero-stat .value {
        font-size: 1.3rem;
    }
    
    .comparison-header h2 {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .filter-tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .wallet-stats {
        gap: 8px;
    }
    
    .stat-box {
        min-height: 65px;
    }
}

/* === БРЕЙКПОИНТ 375px (iPhone SE и маленькие телефоны) === */
@media (max-width: 375px) {
    .hero {
        padding: 20px 0;
    }
        
    .hero-stat .value {
        font-size: 1.2rem;
    }
    
    .hero-stat .label {
        font-size: 0.75rem;
    }
    
    .wallet-header {
        padding: 16px 14px 0 14px;
    }
    
    .wallet-stats {
        padding: 0 14px;
    }
    
    .wallet-features1 {
        padding: 0 14px;
    }
    
    .wallet-actions {
        padding: 0 14px 16px 14px;
        flex-direction: column;
    }
    
    .wallet-actions .btn {
        width: 100%;
    }
    
    .stat-box .value {
        font-size: 0.85rem;
    }
    

}

/* === УЛУЧШЕНИЯ ПРОКРУТКИ ТАБЛИЦЫ === */
@media (max-width: 992px) {
    .comparison-table {
        position: relative;
    }
    
    /* Подсказка о прокрутке */
    .comparison-table::after {
        content: '← Прокрутите →';
        position: absolute;
        bottom: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        color: var(--text-muted);
        opacity: 0.7;
    }
}

/* === ФИКС ДЛЯ TOUCH УСТРОЙСТВ === */
@media (hover: none) and (pointer: coarse) {
    .wallet-card:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    }
    
    .filter-tag:hover {
        transform: none;
    }
}