.node-card {
    background: linear-gradient(135deg, rgba(16, 23, 41, 0.95) 0%, rgba(8, 17, 33, 0.95) 100%);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 234, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 234, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 650px; /* ФИКСИРОВАННАЯ МИНИМАЛЬНАЯ ВЫСОТА */
}

.node-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00eaff, #008cff, #00eaff);
}

.node-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 234, 255, 0.2);
    border-color: rgba(0, 234, 255, 0.3);
}

/* Контейнер для основного контента карточки */
.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Футер карточки с кнопкой и предупреждением */
.card-footer {
    margin-top: auto;
    padding-top: 15px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.node-name { 
    font-family: 'Orbitron', sans-serif;
    color: #00eaff; 
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.node-name::before {
    content: '🛰️';
    margin-right: 10px;
    font-size: 1.1rem;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-active {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-inactive {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.identity-key {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.7rem;
    word-break: break-all;
    background: rgba(0, 234, 255, 0.08);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 16px;
    color: #94a3b8;
    border: 1px solid rgba(0, 234, 255, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-value {
    font-weight: 600;
    font-size: 0.85rem;
    color: #00eaff;
}

.performance-high { color: #00ff88; }
.performance-medium { color: #ffd166; }
.performance-low { color: #ff6b6b; }

.progress-section {
    margin: 16px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.progress-label {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #00eaff;
}

.progress-container {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #00eaff, #008cff);
    border-radius: 10px;
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.3);
}

.flag {
    width: 16px;
    height: 12px;
    border-radius: 2px;
}

.reliability-section {
    margin: 16px 0;
    background: rgba(0, 234, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(0, 234, 255, 0.1);
}

.reliability-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.reliability-label {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reliability-average {
    font-size: 0.75rem;
    font-weight: 600;
    color: #00eaff;
}

.reliability-chart-container {
    height: 60px;
    position: relative;
}

.reliability-chart {
    width: 100%;
    height: 100%;
}

.delegate-btn { 
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(90deg, #00eaff, #008cff);
    color: #000;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin-top: 0; /* Убираем верхний отступ */
}

.delegate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.6s;
    z-index: -1;
}

.delegate-btn:hover { 
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.6);
}

.delegate-btn:hover::before {
    left: 100%;
}

.error-state {
    border-color: rgba(255, 107, 107, 0.3) !important;
    background: linear-gradient(135deg, rgba(41, 16, 16, 0.95) 0%, rgba(33, 8, 8, 0.95) 100%) !important;
}

.error-state::before {
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e, #ff6b6b) !important;
}

.performance-error {
    color: #ff6b6b !important;
}

.node-card.error-state .delegate-btn {
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e) !important;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.4) !important;
}

.chart-toggle {
    display: flex;
    background: rgba(0, 234, 255, 0.1);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
}

.toggle-btn.active {
    background: rgba(0, 234, 255, 0.3);
    color: #00eaff;
    box-shadow: 0 0 5px rgba(0, 234, 255, 0.3);
}

.toggle-btn:hover:not(.active) {
    background: rgba(0, 234, 255, 0.15);
    color: #00eaff;
}

.reliability-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.reliability-label {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Стили для секции Profit */
.profit-section {
    margin: 16px 0;
    background: rgba(57, 255, 20, 0.05);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(57, 255, 20, 0.1);
}

.profit-header {
    margin-bottom: 8px;
}

.profit-label {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profit-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.profit-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px;
    background: rgba(57, 255, 20, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(57, 255, 20, 0.1);
}

.profit-period {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 600;
}

.profit-values {
    width: 100%;
}

.profit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding: 2px 0;
}

.profit-row:last-child {
    margin-bottom: 0;
}

.profit-type {
    font-size: 0.65rem;
    color: #94a3b8;
    text-align: left;
}

.profit-value {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: right;
}

/* Разные цвета для Node и Owner profit */
.node-profit {
    color: #39ff14; /* Зеленый для Node profit */
}

.owner-profit {
    color: #00eaff; /* Голубой для Owner profit */
}

/* Стили для сетки бирж с выравниванием */
.exchanges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}

.exchange-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(0, 234, 255, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(0, 234, 255, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.exchange-item:hover {
    background: rgba(0, 234, 255, 0.15);
    border-color: rgba(0, 234, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 234, 255, 0.1);
}

.exchange-name {
    font-weight: 600;
    color: #00eaff;
    font-size: 0.85rem;
    word-break: break-word;
}

.exchange-type {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
    width: 80px;
    text-align: center;
}

.exchange-type.native {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.exchange-type.eth {
    background: rgba(255, 209, 102, 0.15);
    color: #ffd166;
    border: 1px solid rgba(255, 209, 102, 0.3);
}

.exchange-icon {
    color: #64748b;
    font-size: 0.7rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.exchange-item:hover .exchange-icon {
    color: #00eaff;
    opacity: 1;
    transform: translateX(2px);
}

/* Индикатор внешней ссылки */
.exchange-item::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background: #00eaff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exchange-item:hover::after {
    opacity: 1;
}

/* Стили для предупреждения о высокой сатурации */
.saturation-warning {
    display: none;
    background: rgba(255, 209, 102, 0.15);
    border: 1px solid rgba(255, 209, 102, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px; /* Отступ только снизу */
}

.warning-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.warning-content i {
    color: #ffd166;
    font-size: 1.1rem;
    margin-top: 2px;
}

.warning-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.warning-text strong {
    color: #ffd166;
    font-size: 0.85rem;
    font-weight: 600;
}

.warning-text span {
    color: #94a3b8;
    font-size: 0.75rem;
}

/* Стили для заблокированной кнопки делегирования */
.delegate-btn.disabled {
    background: linear-gradient(90deg, #64748b, #94a3b8) !important;
    box-shadow: 0 0 10px rgba(100, 116, 139, 0.4) !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.delegate-btn.disabled:hover {
    transform: none !important;
    box-shadow: 0 0 10px rgba(100, 116, 139, 0.4) !important;
}

.delegate-btn.disabled::before {
    display: none !important;
}

/* Анимации загрузки */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Улучшения для step-tip в секции делегирования */
.step-content p {
    margin-bottom: 12px;
    line-height: 1.5;
}

.step-tip {
    background: rgba(0, 234, 255, 0.08);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #00eaff;
    margin-top: 12px;
}

.step-tip strong {
    color: #00eaff;
    font-size: 0.85rem;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
    }
    
    .node-card {
        min-height: 600px; /* Уменьшаем высоту на мобильных */
    }
    
    .profit-stats {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .profit-stat {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 12px;
    }
    
    .profit-period {
        margin-bottom: 0;
        font-size: 0.7rem;
        min-width: 60px;
        text-align: left;
    }
    
    .profit-values {
        width: auto;
        min-width: 120px;
    }
    
    .profit-type {
        font-size: 0.6rem;
    }
    
    .profit-value {
        font-size: 0.7rem;
    }
    
    .exchanges-grid {
        grid-template-columns: 1fr;
    }
    
    .exchange-item {
        padding: 12px;
        gap: 10px;
    }
    
    .exchange-type {
        width: 70px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .node-card {
        padding: 20px;
        min-height: 550px; /* Еще меньше на очень маленьких экранах */
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .profit-stat {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    
    .profit-period {
        min-width: auto;
    }
    
    .profit-values {
        width: 100%;
    }
    
    .exchange-item {
        grid-template-columns: 1fr auto; /* Убираем иконку на маленьких экранах */
        gap: 8px;
    }
    
    .exchange-icon {
        display: none; /* Скрываем иконку на очень маленьких экранах */
    }
    
    .profit-row {
        justify-content: space-around;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .node-card {
        padding: 15px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .status-badge {
        align-self: flex-start;
    }
    
    .profit-stats {
        grid-template-columns: 1fr;
    }
    
    .exchange-type {
        width: 65px;
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}

@media (max-width: 900px) {
    .node-card {
        min-height: auto; /* На мобильных убираем фиксированную высоту */
    }
}
/* Стили для поиска и фильтрации */


/* Быстрые фильтры */
.quick-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(0, 234, 255, 0.1);
    border: 1px solid rgba(0, 234, 255, 0.2);
    border-radius: 20px;
    color: #94a3b8;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active {
    background: rgba(0, 234, 255, 0.3);
    color: #00eaff;
    border-color: #00eaff;
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.3);
}

.filter-btn:hover {
    background: rgba(0, 234, 255, 0.2);
    color: #00eaff;
    transform: translateY(-1px);
}

/* Счетчик результатов */
.results-counter {
    margin: 10px 0 20px 0;
    color: #94a3b8;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-counter i {
    color: #00eaff;
}

/* Глобальный индикатор загрузки */
.global-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 23, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.global-loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 234, 255, 0.3);
    border-top: 4px solid #00eaff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.5);
}

.loading-text {
    color: #00eaff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .quick-filters {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .search-input {
        padding: 10px 35px 10px 35px;
        font-size: 0.85rem;
    }
}
/* Фиксированная высота карточек для выравнивания кнопок */
.node-card {
    min-height: 650px; /* ФИКСИРОВАННАЯ ВЫСОТА */
    height: auto;
    display: flex !important; /* Всегда flex */
}

/* Обеспечиваем правильное выравнивание в сетке */
.cards-grid {
    align-items: stretch;
}

/* Гарантируем что карточки сохраняют структуру */
.node-card[style*="display: none"] {
    display: none !important;
}

/* Принудительно устанавливаем flex для отображаемых карточек */
.node-card:not([style*="display: none"]) {
    display: flex !important;
}

/* Для мобильных уменьшаем высоту */
@media (max-width: 768px) {
    .node-card {
        min-height: 600px;
    }
}

@media (max-width: 480px) {
    .node-card {
        min-height: 550px;
    }
}

@media (max-width: 900px) {
    .node-card {
        min-height: auto;
    }
}

/* Добавим в конец файла cards.css: */

/* Стили для контейнера identity key с кнопкой копирования */
.identity-key-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(0, 234, 255, 0.08);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(0, 234, 255, 0.1);
}

.identity-key {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.7rem;
    word-break: break-all;
    color: #94a3b8;
    flex: 1;
    line-height: 1.4;
    margin: 0;
}

/* Кнопка копирования */
.copy-identity-btn {
    background: rgba(0, 234, 255, 0.2);
    border: none;
    color: #00eaff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 0;
}

.copy-identity-btn:hover {
    background: rgba(0, 234, 255, 0.4);
    transform: scale(1.05);
}

.copy-identity-btn:active {
    transform: scale(0.95);
}

.copy-identity-btn i {
    font-size: 0.9rem;
}

/* Тултип при копировании */
.copy-tooltip {
    position: absolute;
    bottom: -30px;
    right: 0;
    background: rgba(0, 234, 255, 0.9);
    color: #000;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.copy-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .identity-key-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .copy-identity-btn {
        align-self: flex-end;
        width: 28px;
        height: 28px;
    }
    
    .copy-tooltip {
        bottom: -25px;
        right: 0;
        font-size: 0.65rem;
        padding: 4px 8px;
    }
}