:root {
    --bg-color: #000000;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --primary: #0088cc;
    --text-main: #ffffff;
    --text-sec: #8b92a2;
    --green: #2ecc71;
    --accent-gradient: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 0%, #1a1d26 0%, #000000 100%);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 90px; /* space for bottom nav */
    min-height: 100vh;
}

/* --- Header --- */
.header {
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}
.logo {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
    margin-bottom: 8px; /* Отступ до баланса */
}
.logo span { color: var(--primary); }

.container { max-width: 800px; margin: 0 auto; padding: 20px; }

/* --- Glass Components --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s;
}

.glass-btn {
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    color: white;
    border-radius: 12px;
    padding: 15px;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.glass-btn::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.settings-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 20px;
    position: relative;
    backdrop-filter: blur(10px);
}

/* Сами кнопки вкладок */
.settings-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 12px;
    color: var(--text-sec);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Активная вкладка */
.settings-tab.active {
    background: rgba(255, 255, 255, 0.15); /* Светлее фона */
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Кнопки выбора времени (сетка) */
.timer-btn {
    text-align: center;
    padding: 15px;
    font-weight: 600;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timer-btn.active {
    background: rgba(0, 136, 204, 0.3);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 136, 204, 0.3);
    color: white;
}

.btn-batch {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    padding: 14px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 20px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-batch:active { transform: scale(0.97); }
/* Список истории */
.history-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 4px;
}
.history-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-family: 'Courier New', monospace; /* Моноширинный шрифт как в боте */
    font-size: 13px;
    color: #ccc;
}
.history-source { margin-right: 6px; }
.history-price { color: white; font-weight: 600; }
.history-date { color: #666; font-size: 12px; }

/* Скроллбар для истории */
.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
/* --- Grids --- */
.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
/* --- Modal (Liquid Glass) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px); /* Эффект размытия фона */
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: none; /* Скрыто по умолчанию */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex; justify-content: space-between; align-items: start;
    margin-bottom: 20px;
}

.modal-close {
    background: rgba(255,255,255,0.1); border: none; color: white;
    width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
}

/* Статистика внутри модалки */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.stat-box {
    background: rgba(255,255,255,0.03);
    padding: 10px; border-radius: 12px;
    text-align: center;
}
.stat-val { font-size: 16px; font-weight: 700; color: white; }
.stat-label { font-size: 11px; color: var(--text-sec); margin-top: 4px; }
.text-green { color: var(--green); }
.text-blue { color: var(--primary); }

/* Список листингов в модалке */
.listing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03); /* Легкое стекло */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin-bottom: 8px;
    backdrop-filter: blur(5px);
    transition: background 0.2s;
}
.listing-row:active {
    background: rgba(255, 255, 255, 0.07);
}
.btn-action {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-action.primary {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.4), rgba(0, 136, 204, 0.1));
    border-color: rgba(0, 136, 204, 0.3);
}
.btn-action:active {
    transform: scale(0.96);
}
.btn-secondary {
    background: rgba(255,255,255,0.1);
}
.tg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-left: 8px;
    transition: 0.2s;
    cursor: pointer;
    flex-shrink: 0;
}
.tg-link:hover {
    background: #0088cc; /* Цвет Telegram при наведении */
}
.tg-link svg {
    width: 14px;
    height: 14px;
    fill: white;
    transform: translateX(-1px); /* Визуальная коррекция иконки */
}
/* --- Text Styles inside Cards --- */
.item-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.item-sub { font-size: 12px; color: var(--text-sec); }
.item-price { color: var(--text-main); font-weight: 600; margin-top: 8px; font-size: 14px; }
.price-val { color: var(--primary); }

/* --- Navigation Tabs --- */
.nav-bar {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 6px;
    display: flex;
    gap: 6px;
    z-index: 200;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.nav-item {
    padding: 10px 24px;
    border-radius: 24px;
    color: var(--text-sec);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}
.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
}

/* --- Search Header (Back button) --- */
.search-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.back-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
}
.back-btn:active {
    transform: scale(0.9);
    background: rgba(255,255,255,0.2);
}
.back-btn svg {
    width: 20px; height: 20px; fill: white;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}
.page-title { font-size: 20px; font-weight: 700; }

/* --- Search Bar Styles (New) --- */
.search-wrapper {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}
.search-icon-svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: var(--text-sec);
    pointer-events: none;
    transition: fill 0.3s;
}
.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px 12px 12px 44px; /* Space for icon */
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    outline: none;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}
.search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.2);
}
.search-wrapper:focus-within .search-icon-svg {
    fill: var(--primary);
}
.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* --- Loaders --- */
.page-loader {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 50vh; color: var(--text-sec);
}
.spinner {
    width: 30px; height: 30px; border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 1s linear infinite; margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Inputs form (Settings) --- */
.settings-card { padding: 16px; }
.row-sb { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.input-glass {
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
    color: white; padding: 8px 12px; border-radius: 8px; width: 100%;
    font-family: inherit; outline: none;
}
.input-glass:focus { border-color: var(--primary); }

/* Switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; transition: .3s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 2px; bottom: 2px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(18px); }

.btn-save {
    width: 100%; background: white; color: black; border: none; padding: 12px;
    border-radius: 10px; font-weight: 700; margin-top: 10px; cursor: pointer;
}

/* --- Views visibility --- */
.view-section { display: none; animation: fadeIn 0.3s ease; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Header Updates (Balance) --- */
.header-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
/* --- Balance Pill (Капсула) --- */
.balance-pill {
    display: inline-flex;
    align-items: center;
    background-color: #17212b;
    border-radius: 8px;
    padding: 4px 8px;
    gap: 8px;
    transition: all 0.3s ease;
    width: fit-content;
}

.balance-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.circle-yellow {
    background-color: #FFD700;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
}
.mrkt-style {
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.15);
}

/* PORTALS - Синий */
.circle-blue {
    background-color: #0098EA;
    box-shadow: 0 0 6px rgba(0, 152, 234, 0.8);
}
.portals-style {
    border: 1px solid rgba(0, 152, 234, 0.2);
    box-shadow: 0 0 8px rgba(0, 152, 234, 0.15);
}
.balance-text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
    line-height: 1;
}

.balance-display {
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px; /* Чуть аккуратнее */
    color: white;
    text-shadow: 0 0 15px rgba(0, 152, 234, 0.4); /* Свечение цветом TON */
}

.balance-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-left: 8px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}

.balance-add-btn:hover {
    background: white;
    color: black;
}

/* --- Withdraw UI --- */

/* Делаем плашку баланса MRKT кликабельной */
.balance-pill.mrkt-style {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Эффект подсветки при наведении (Liquid Glow) */
.balance-pill.mrkt-style:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* Активное состояние (нажатие) */
.balance-pill.mrkt-style:active {
    transform: scale(0.96);
    background: rgba(255, 215, 0, 0.2);
}

/* Стили для формы вывода внутри модалки */
.withdraw-info-box {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.withdraw-info-icon {
    color: #ffd700;
    font-size: 20px;
}

.withdraw-info-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* Кнопка вывода (Золотая) */
.btn-withdraw {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.btn-withdraw:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.2));
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
    color: white;
}

/* --- Portals Blue Theme for Withdraw Modal --- */

/* Кнопка вывода (Синяя) */
.btn-withdraw.portals-theme {
    background: linear-gradient(135deg, rgba(0, 152, 234, 0.2), rgba(0, 136, 204, 0.1));
    border: 1px solid rgba(0, 152, 234, 0.3);
    color: #0098EA;
    text-shadow: 0 0 10px rgba(0, 152, 234, 0.3);
}

.btn-withdraw.portals-theme:hover {
    background: linear-gradient(135deg, rgba(0, 152, 234, 0.3), rgba(0, 136, 204, 0.2));
    box-shadow: 0 0 20px rgba(0, 152, 234, 0.2);
    color: white;
}

/* Инфо-бокс (Синий) */
.withdraw-info-box.portals-theme {
    background: rgba(0, 152, 234, 0.05);
    border: 1px solid rgba(0, 152, 234, 0.1);
}

.withdraw-info-icon.portals-theme {
    color: #0098EA;
}

/* Эффект нажатия для плашки Portals */
.balance-pill.portals-style:hover {
    background: rgba(0, 152, 234, 0.15);
    border-color: rgba(0, 152, 234, 0.4);
    box-shadow: 0 0 15px rgba(0, 152, 234, 0.2);
}
.balance-pill.portals-style:active {
    transform: scale(0.96);
    background: rgba(0, 152, 234, 0.2);
}

/* --- Custom Liquid Select --- */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-trigger:active, .select-trigger.open {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.select-trigger.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.select-trigger::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-sec);
    margin-left: 10px;
    transition: transform 0.2s;
}

.select-trigger.open::after {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.95); /* Темный фон для читаемости */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.select-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    padding: 12px 15px;
    font-size: 14px;
    color: var(--text-sec);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s, color 0.2s;
}

.select-option:last-child {
    border-bottom: none;
}

.select-option:hover, .select-option.selected {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Scrollbar styling for list */
.select-options::-webkit-scrollbar {
    width: 4px;
}
.select-options::-webkit-scrollbar-track {
    background: transparent;
}
.select-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
/* --- Slide-in Selection View (iOS Style) --- */
.slide-view {
    position: fixed;
    /* Отступ сверху 15%, чтобы видно было фон сайта (шторка) */
    top: 15%;
    left: 0;
    right: 0;
    bottom: 0;

    /* Эффект Liquid Glass */
    background: rgba(18, 18, 24, 0.85); /* Темный полупрозрачный фон */
    backdrop-filter: blur(25px);         /* Сильное размытие фона под шторкой */
    -webkit-backdrop-filter: blur(25px);

    /* Границы и форма */
    border-radius: 28px 28px 0 0;        /* Крупное закругление сверху */
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: none;                 /* Снизу граница не нужна */

    /* Тень для объема */
    box-shadow: 0 -10px 60px rgba(0, 0, 0, 0.7);

    z-index: 5000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); /* Плавная "дорогая" анимация */
    display: flex;
    flex-direction: column;
}

.slide-view.active {
    transform: translateY(0); /* Выезжает */
}

.slide-header {
    display: grid;
    /* Сетка: [Кнопка] [Заголовок] [Пусто] для идеального центра */
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    height: 64px;
    padding: 0 20px;

    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 28px 28px 0 0;
    flex-shrink: 0;
    position: relative;
}

.slide-header::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.slide-title {
    grid-column: 2; /* Центральная колонка */
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: white;
    margin: 0;

    /* Сбрасываем абсолютное позиционирование */
    position: static;
    transform: none;
    width: auto;
}

.slide-btn-close {
    grid-column: 1; /* Первая колонка */
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5); /* Полупрозрачный */
    font-size: 32px; /* Крупный, тонкий крестик */
    font-weight: 300;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Прижат влево */
    transition: color 0.2s, transform 0.2s;

    /* Сбрасываем старые стили кружка */
    width: auto;
    height: auto;
    border-radius: 0;
    margin: 0;
}

.slide-btn-close:hover {
    color: #ffffff;
    transform: scale(1.1);
    background: transparent;
}

/* Контейнер списка внутри слайда */
.slide-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
    padding: 0;
}

#slide-search {
    display: block;
    margin: 16px 20px 8px 20px; /* Отступы */
    width: calc(100% - 40px);

    /* Glass Input Style */
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 12px 16px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

#slide-search:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.1);
}

#slide-search::placeholder {
    color: rgba(255, 255, 255, 0.3);
}


.slide-item {
    padding: 14px 24px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slide-item:last-child {
    border-bottom: none;
}

.slide-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.slide-item-check {
    color: var(--green);
    font-weight: bold;
    font-size: 18px;
    display: none;
}

.slide-item.selected .slide-item-check {
    display: block;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
}

.slide-content .spinner {
    margin: 60px auto;
    width: 30px;
    height: 30px;
    border-width: 3px;
}

/* Стили для кнопки-триггера (которая открывает слайд) */
.selector-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05); /* Стекло */
    cursor: pointer;
    transition: background 0.2s;
}
.selector-row:active {
    background: rgba(255, 255, 255, 0.1);
}
.selector-label {
    font-size: 13px;
    color: var(--text-sec);
    margin-bottom: 4px;
}
.selector-value {
    font-size: 16px;
    font-weight: 500;
    color: white;
}
.selector-arrow {
    color: var(--text-sec);
    font-size: 20px;
    opacity: 0.5;
}
.selector-row.disabled {
    opacity: 0.5;
    pointer-events: none;
}
.refresh-btn {
    /* Основные стили, скопированные с .back-btn */
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px; /* Радиус скругления как у back-btn */

    /* Настройки текста и размеров */
    padding: 8px 16px; /* Отступы для текста */
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;

    /* Позиционирование элементов внутри */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Расстояние между иконкой и текстом */

    /* Эффекты (стекло, тень, анимация) */
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Эффект нажатия */
.refresh-btn:active {
    transform: scale(0.95);
    background: rgba(255,255,255,0.2);
}

/* Стиль для иконки внутри кнопки */
.refresh-btn svg {
    width: 16px;
    height: 16px;
    fill: white;
    transition: transform 0.5s ease;
}

/* Дополнительно: вращение иконки при нажатии (опционально) */
.refresh-btn:active svg {
    transform: rotate(360deg);
}

/* --- Settings Action Button --- */
.btn-glass-action {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff !important; /* Force white text */
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.btn-glass-action:hover, .btn-glass-action:active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
}

/* --- Auto-Flip Strategy Styles (Liquid Glass) --- */

/* Контейнер кнопок переключения */
.strat-toggle-container {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 16px;
}

/* Кнопка стратегии (неактивная) */
.glass-btn {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

/* Активная кнопка стратегии */
.glass-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Контейнер для Top N */
.strat-view-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s;
}

/* Описание под инпутом */
.strat-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
    line-height: 1.4;
}

/* Список моделей (Custom List) */
.glass-list {
    max-height: 220px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px;
    margin-top: 10px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s;
}

/* Элемент списка (модель) */
.model-item-label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.model-item-label:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Состояние: выбрано */
.model-item-label.checked {
    background: rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.3);
}

/* Кастомный чекбокс */
.cb-custom {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all 0.2s;
}

.model-item-label.checked .cb-custom {
    background: #2ecc71;
    border-color: #2ecc71;
}

/* Анимация появления */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Кнопка сканирования */
.btn-scan-nft {
    background: #0088cc;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.btn-scan-nft:active {
    transform: scale(0.96);
}

/* Карточка результата */
.nft-result-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nft-title {
    margin: 0 0 10px 0;
    font-size: 17px;
    color: white;
}

.nft-attr-row {
    font-size: 13px;
    color: #a0a0a0;
    margin-bottom: 4px;
}
.nft-attr-row .val {
    color: #ddd;
    font-weight: 500;
}

.mono-badge-container {
    margin-top: 10px;
    background: rgba(0,0,0,0.2);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    display: inline-block;
}

.mono-val {
    font-weight: bold;
    color: white;
    margin-left: 5px;
}

/* --- NFT LIQUID GLASS CONTAINER --- */
.nft-visual-col {
    position: relative;
    /* Размер самой рамки/карточки */
    width: 150px;
    height: 150px;

    display: flex;
    justify-content: center;
    align-items: center;

    /* Жидкое стекло */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    /* Скругление рамки - оно же обрезает NFT по углам */
    border-radius: 28px;
    overflow: hidden; /* ВАЖНО: это обрезает NFT по форме рамки */

    /* Рамка и тени */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
            0 10px 40px -10px rgba(0, 0, 0, 0.5),
            inset 0 0 0 1px rgba(255, 255, 255, 0.1),
            inset 0 20px 40px rgba(255, 255, 255, 0.05);

    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nft-visual-col:hover {
    transform: scale(1.05) rotate(2deg);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow:
            0 20px 50px -10px rgba(0, 136, 204, 0.3),
            inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* --- СТИЛЬ ПЛЕЕРА ВНУТРИ --- */
.nft-visual-col lottie-player {
    /* Растягиваем на всю ширину рамки */
    width: 100% !important;
    height: 100% !important;

    /* Убираем лишние отступы, если они есть */
    margin: 0;
    padding: 0;

    /* Небольшое увеличение (zoom), чтобы убрать пустые края самой анимации */
    transform: scale(1.15);

    z-index: 1;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

/* Блик поверх всего (опционально, для эффекта линзы) */
.nft-visual-col::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 28px;
    background: linear-gradient(
            135deg,
            rgba(255,255,255,0.15) 0%,
            rgba(255,255,255,0) 40%,
            rgba(255,255,255,0) 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* --- ARBITRAGE & NOTIFICATOR ADDITIONS --- */

/* Описание под селектором (как в Arbitrage) */
.input-desc {
    font-size: 12px;
    color: #8b92a2;
    margin-top: 8px;
    padding: 0 10px;
    line-height: 1.4;
}

/* Цвет для бейджа Spatial Arbitrage (Голубой/Portals) */
.text-portals {
    color: #4facfe;
    font-weight: 600;
}

/* Кнопка удаления в списках (красная корзина) */
.btn-delete-icon {
    background: rgba(255, 69, 58, 0.15);
    color: #ff453a;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 15px;
    transition: transform 0.2s;
}
.btn-delete-icon:active {
    transform: scale(0.9);
    background: rgba(255, 69, 58, 0.25);
}

/* Стиль для пустых состояний */
.liquid-empty {
    padding: 30px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 16px;
}

/* Стиль для ошибок */
.liquid-error {
    padding: 20px;
    text-align: center;
    color: #ff453a;
    background: rgba(255, 69, 58, 0.05);
    border-radius: 12px;
}