:root {
    --primary-color: #0a0a0a;
    --accent-color: #f7931a;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #555;
    --white: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--white);
    color: var(--primary-color);
    line-height: 1.6;
}

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

/* Header */
header {
    padding: 20px 0;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo span {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.auth-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #000;
}

.btn-connect {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
}

.btn-connect:hover {
    background-color: #e07f00;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background-color: var(--light-gray);
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Features */
.features {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    margin: 20px 0 15px;
    font-size: 22px;
}

.feature-card p {
    color: var(--dark-gray);
}

/* Wallet Section */
.wallet-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.wallet-container {
    max-width: 800px;
    margin: 0 auto;
}

.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.wallet-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.wallet-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
    border-bottom: 1px solid var(--medium-gray);
    padding-bottom: 10px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--medium-gray);
}

.balance-item:last-child {
    border-bottom: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: 5px;
    font-size: 16px;
}

.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: 5px;
    font-size: 16px;
    background-color: var(--white);
}

.wallet-status {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--light-gray);
    border-radius: 5px;
}

.status-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.status-connected {
    background-color: #4caf50;
}

.status-disconnected {
    background-color: #f44336;
}

/* Footer */
footer {
    padding: 40px 0;
    background-color: var(--primary-color);
    color: var(--white);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
}

.footer-logo span {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    background-color: #4caf50;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(-100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.error {
    background-color: #f44336;
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Hiding */
.hidden {
    display: none !important;
}

/* Disconnect */
.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}


/* Your Stakes */
.stake-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 10px;
}

.stake-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--medium-gray);
}

.stake-item:last-child {
    border-bottom: none;
}

.info-message {
    padding: 20px 0;
    text-align: center;
    color: var(--dark-gray);
    font-style: italic;
}

.progress-container {
    margin: 15px 0;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--medium-gray);
    border-radius: 5px;
    margin: 8px 0;
    overflow: hidden;
}

.progress-value {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 5px;
    width: 0%;
    transition: width 0.5s ease;
}

.stake-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.stake-actions button {
    flex: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .stake-actions {
        flex-direction: column;
    }
}

/* faucet */

.faucet-section {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.faucet-description {
    text-align: center;
    margin-bottom: 40px;
    font-size: 18px;
}

.faucet-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
    max-width: 600px;
}

.btc-address-display {
    margin-bottom: 20px;
}

.address-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
    background-color: var(--light-gray);
    padding: 12px;
    border-radius: 5px;
}

.address-container span {
    flex: 1;
    font-family: monospace;
    word-break: break-all;
}

.btn-small {
    padding: 5px 10px;
    font-size: 14px;
    min-width: 60px;
}

.limits-info {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--light-gray);
    border-radius: 5px;
}

.limit-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--medium-gray);
}

.limit-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-container input[type="range"] {
    flex: 1;
}

.slider-container input[type="number"] {
    width: 120px;
    padding: 8px;
    border: 1px solid var(--medium-gray);
    border-radius: 5px;
}

@media (max-width: 768px) {
    .slider-container {
        flex-direction: column;
    }

    .slider-container input[type="number"] {
        width: 100%;
    }
}

/* BTC address */
.balance-item button {
    margin-left: 5px;
    font-size: 12px;
    padding: 3px 6px;
}

#btc-address-container {
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: space-between;
gap: 5px;
}

#mock-btc-address {
font-family: monospace;
word-break: break-all;
max-width: 190px;
text-overflow: ellipsis;
overflow: hidden;
}

/* add Rootstock */
#add-rootstock {
margin-right: 10px;
}

@media (max-width: 768px) {
    .auth-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    #add-rootstock {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
    }
}

.btn-mobile {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
}

.btn-mobile:before {
    content: '';
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10 17l5-5-5-5M13.8 12H3"/></svg>') no-repeat;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    display: inline-block;
}

/* CSS для гамбургер-меню - добавьте в styles.css */

/* Стиль кнопки гамбургер-меню */
.menu-toggle {
    display: none; /* Скрыто на десктопах */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 150;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Состояние меню при открытии */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Адаптация под мобильные устройства */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 100;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        padding: 15px 0;
        border-bottom: 1px solid var(--medium-gray);
        width: 100%;
        text-align: left;
    }

    /* Фон-затемнение при открытом меню */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 90;
    }

    .mobile-overlay.active {
        display: block;
    }

    /* Переносим кнопки авторизации в меню */
    .auth-buttons {
        margin-top: 20px;
        width: 100%;
    }

    .header-container {
        justify-content: space-between;
    }
}

/* Добавьте эти стили в styles.css */

/* Скрытие кнопок Add Rootstock и Disconnect на мобильных устройствах */
@media (max-width: 768px) {
    #add-rootstock {
    display: none; /* Полностью скрываем кнопку Add Rootstock */
    }

    #disconnect-wallet {
    display: none; /* Скрываем кнопку Disconnect */
    }

    /* Увеличиваем размер и улучшаем видимость главной кнопки Connect Wallet */
    #connect-wallet {
    padding: 10px 15px;
    font-size: 14px;
    width: auto;
    max-width: none;
    flex: 0 1 auto;
    }

    .auth-buttons {
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    /* Если используется нижняя навигация, добавляем дополнительную кнопку в панель */
    .bottom-nav-wallet {
        position: relative;
    }

    .wallet-status-indicator {
        position: absolute;
        top: 0;
        right: 0;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: #f44336; /* Красный цвет для отключенного состояния */
    }

    .wallet-status-indicator.connected {
        background-color: #4caf50; /* Зеленый цвет для подключенного состояния */
    }
}

/* Стили для мобильных действий с кошельком - добавьте в styles.css */

/* Контейнер для мобильных действий с кошельком */
.mobile-wallet-actions {
    display: none; /* Скрыт по умолчанию */
    position: fixed;
    bottom: 70px; /* Над нижней навигацией */
    left: 0;
    width: 100%;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 99;
    transition: transform 0.3s ease;
    transform: translateY(100%);
}

.mobile-wallet-actions.active {
    transform: translateY(0);
}

/* Кнопки в мобильных действиях */
.mobile-wallet-actions button {
    width: 100%;
    margin-bottom: 10px;
}

.mobile-wallet-actions button:last-child {
    margin-bottom: 0;
}

/* Отображение только на мобильных устройствах */
@media (max-width: 768px) {
    .mobile-wallet-actions.show {
        display: block;
    }

    /* Дополнительный отступ для контента, чтобы не перекрывался меню действий */
    body.wallet-actions-open {
        padding-bottom: 170px; /* 70px для нижней навигации + ~100px для действий */
    }
}

/* Обновленные стили для навигации - добавьте в styles.css */

/* Нижняя навигационная панель для мобильных устройств */
.bottom-nav {
    display: none; /* По умолчанию скрыта для всех устройств */
}

/* Показываем нижнюю навигацию только на мобильных устройствах */
@media (max-width: 768px) {
    /* Скрываем стандартную навигацию на мобильных, если кошелек подключен */
    body.wallet-connected .nav-menu {
        display: none;
    }

    /* Показываем нижнюю навигацию только на мобильных */
    .bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
        padding: 10px 0;
    }

    .bottom-nav-container {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--dark-gray);
        font-size: 12px;
        padding: 5px;
    }

    .bottom-nav-item.active {
        color: var(--accent-color);
    }

    .bottom-nav-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }

    /* Добавляем отступ для контента, чтобы не перекрывался нижней панелью */
    body {
        padding-bottom: 70px;
    }

    /* Скрываем Disconnect и Add Rootstock в хедере на мобильных */
    #add-rootstock, #disconnect-wallet {
    display: none;
    }

    /* Connect Wallet кнопка на весь размер */
    #connect-wallet {
    width: 100%;
    max-width: none;
    }

    /* Освобождаем место для кнопки "Connect Wallet" */
    .header-container {
        flex-wrap: wrap;
    }

    .logo {
        flex: 1;
    }

    .auth-buttons {
        flex: none;
        width: auto;
    }

    body.wallet-connected .auth-buttons {
        display: none; /* Полностью скрываем кнопки, если кошелек подключен */
    }
}

/* Финальные стили для навигации - добавьте в styles.css */

/* Нижняя навигационная панель для мобильных устройств */
.bottom-nav {
    display: none; /* По умолчанию скрыта для всех устройств */
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
    /* Полностью скрываем верхнее меню навигации на мобильных */
    .nav-menu {
        display: none;
    }

    /* Показываем нижнюю навигацию на мобильных */
    .bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
        padding: 10px 0;
    }

    .bottom-nav-container {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--dark-gray);
        font-size: 12px;
        padding: 5px;
    }

    .bottom-nav-item.active {
        color: var(--accent-color);
    }

    .bottom-nav-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }

    /* Иконка кошелька с индикатором */
    .bottom-nav-wallet {
        position: relative;
    }

    .wallet-status-indicator {
        position: absolute;
        top: 0;
        right: 0;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: #f44336; /* Красный для отключенного */
    }

    .wallet-status-indicator.connected {
        background-color: #4caf50; /* Зеленый для подключенного */
    }

    /* Добавляем отступ для контента, чтобы не перекрывался нижней панелью */
    body {
        padding-bottom: 70px;
    }

    /* Модификации хедера для мобильных */
    .header-container {
        justify-content: space-between;
    }

    /* Лого занимает всё доступное пространство */
    .logo {
        flex: 1;
    }

    /* Кнопка Connect только на неподключенном устройстве */
    .auth-buttons {
        display: flex;
        justify-content: flex-end;
    }

    /* Скрываем кнопки Add Rootstock и Disconnect */
    #add-rootstock, #disconnect-wallet {
    display: none;
    }

    /* Если кошелек подключен, скрываем и Connect тоже */
    body.wallet-connected .auth-buttons {
        display: none;
    }
}

// Обновите эту функцию в ui.js

// Функция для настройки мобильных действий с кошельком
function setupMobileWalletActions() {
    console.log("Setting up mobile wallet actions");

    // Получаем нужные элементы
    const walletNavItem = document.querySelector('.bottom-nav-wallet');
    const walletIndicator = document.getElementById('mobile-wallet-indicator');
    const mobileActions = document.getElementById('mobile-wallet-actions');

    const mobileConnect = document.getElementById('mobile-connect');
    const mobileDisconnect = document.getElementById('mobile-disconnect');
    const mobileAddRootstock = document.getElementById('mobile-add-rootstock');

    // Если что-то из этого отсутствует, выходим
    if (!walletNavItem || !mobileActions || !walletIndicator) {
        console.log("Missing elements for mobile wallet actions", {
            walletNavItem: !!walletNavItem,
            mobileActions: !!mobileActions,
            walletIndicator: !!walletIndicator
        });
        return;
    }

    // Функция для обновления индикатора состояния кошелька
    window.updateMobileWalletUI = function(connected) {
        console.log("Updating mobile wallet UI, connected:", connected);

        // Обновляем индикатор
        if (connected) {
            walletIndicator.classList.add('connected');
        } else {
            walletIndicator.classList.remove('connected');
        }

        // Обновляем кнопки
        if (mobileConnect && mobileDisconnect && mobileAddRootstock) {
            if (connected) {
                mobileConnect.classList.add('hidden');
                mobileDisconnect.classList.remove('hidden');
                mobileAddRootstock.classList.remove('hidden');
            } else {
                mobileConnect.classList.remove('hidden');
                mobileDisconnect.classList.add('hidden');
                mobileAddRootstock.classList.add('hidden');
            }
        }
    };

    // Обработчик клика по иконке кошелька в нижней навигации
    walletNavItem.addEventListener('click', function(e) {
        // Предотвращаем переход на #wallet, если мы на другой странице
        const currentPath = window.location.pathname;
        if (!currentPath.includes('index.html') && currentPath !== '/') {
            e.preventDefault();
        }

        // Переключаем отображение панели действий
        mobileActions.classList.toggle('show');
        mobileActions.classList.toggle('active');

        // Добавляем/удаляем класс для правильного отступа body
        document.body.classList.toggle('wallet-actions-open');
    });

    // Обработчики для кнопок
    if (mobileConnect) {
        mobileConnect.addEventListener('click', function() {
            // Скрываем панель действий
            mobileActions.classList.remove('show', 'active');
            document.body.classList.remove('wallet-actions-open');

            // Вызываем функцию подключения кошелька из wallet.js
            if (typeof connectWallet === 'function') {
                connectWallet();
            }
        });
    }

    if (mobileDisconnect) {
        mobileDisconnect.addEventListener('click', function() {
            // Скрываем панель действий
            mobileActions.classList.remove('show', 'active');
            document.body.classList.remove('wallet-actions-open');

            // Вызываем функцию отключения кошелька из wallet.js
            if (typeof disconnectWallet === 'function') {
                disconnectWallet();
            }
        });
    }

    if (mobileAddRootstock) {
        mobileAddRootstock.addEventListener('click', function() {
            // Скрываем панель действий
            mobileActions.classList.remove('show', 'active');
            document.body.classList.remove('wallet-actions-open');

            // Вызываем функцию добавления Rootstock из ui.js
            if (typeof addRootstock === 'function') {
                addRootstock();
            }
        });
    }

    // Закрытие панели при клике вне её
    document.addEventListener('click', function(e) {
        // Проверяем, что клик был не на панели и не на иконке кошелька
        if (mobileActions.classList.contains('show') &&
            !mobileActions.contains(e.target) &&
            !walletNavItem.contains(e.target)) {

            mobileActions.classList.remove('show', 'active');
        document.body.classList.remove('wallet-actions-open');
            }
    });

    // Проверяем состояние кошелька при инициализации
    if (typeof window.getCurrentAccount === 'function') {
        const currentAccount = window.getCurrentAccount();
        window.updateMobileWalletUI(!!currentAccount);
    } else {
        window.updateMobileWalletUI(false);
    }
}

/* Mobile-specific styles to add to styles.css */

/* Improved mobile detection and responsiveness */
@media (max-width: 768px) {
    /* Hide top navigation elements completely */
    header .nav-menu {
        display: none !important;
    }

    .menu-toggle {
        display: none !important;
    }

    /* Simplify header - logo only */
    .header-container {
        justify-content: center !important;
        padding: 10px !important;
    }

    /* Hide authentication buttons in header */
    .auth-buttons {
        display: none !important;
    }

    /* Enhance bottom navigation appearance */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        padding: 10px 0;
        border-top: 1px solid #e0e0e0;
    }

    .bottom-nav-container {
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 100%;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--dark-gray);
        font-size: 12px;
        font-weight: 500;
        padding: 5px;
        position: relative;
    }

    .bottom-nav-icon {
        font-size: 24px;
        margin-bottom: 5px;
    }

    /* Active state styling for bottom nav */
    .bottom-nav-item.active {
        color: var(--accent-color);
    }

    .bottom-nav-item.active::after {
        content: '';
        position: absolute;
        width: 40%;
        height: 3px;
        background-color: var(--accent-color);
        bottom: -10px;
        left: 30%;
        border-radius: 2px;
    }

    /* Wallet connection indicator */
    .wallet-status-indicator {
        position: absolute;
        top: 2px;
        right: 2px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 1px solid white;
        box-shadow: 0 0 0 2px white;
        background-color: #f44336; /* Red by default (disconnected) */
    }

    .wallet-status-indicator.connected {
        background-color: #4caf50; /* Green when connected */
    }

    /* Wallet actions panel */
    .mobile-wallet-actions {
        display: none; /* Hidden by default */
        position: fixed;
        bottom: 70px; /* Above bottom navigation */
        left: 0;
        width: 100%;
        padding: 15px;
        background-color: #fff;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
        z-index: 99;
        transition: transform 0.3s ease;
        transform: translateY(100%);
        border-top-left-radius: 15px;
        border-top-right-radius: 15px;
    }

    .mobile-wallet-actions.active {
        transform: translateY(0);
    }

    .mobile-wallet-actions.show {
        display: block;
    }

    .mobile-wallet-actions button {
        width: 100%;
        margin-bottom: 10px;
        padding: 12px;
        font-weight: 600;
    }

    .mobile-wallet-actions button:last-child {
        margin-bottom: 0;
    }

    /* Add padding to body for bottom nav */
    body {
        padding-bottom: 80px;
    }

    body.wallet-actions-open {
        padding-bottom: 200px;
    }

    /* Optimize section headings for mobile */
    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    /* Use single column layout for all cards on mobile */
    .wallet-grid {
        grid-template-columns: 1fr !important;
    }

    /* Improve form elements for touch on mobile */
    input, select, button {
        min-height: 44px; /* Minimum touch target size */
    }

    /* Improve notification visibility on mobile */
    .notification {
        width: 90%;
        left: 5%;
        right: 5%;
        font-size: 14px;
        padding: 12px 15px;
    }
}

/* Hide bottom navigation on desktop */
@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }

    .mobile-wallet-actions {
        display: none;
    }
}

/* Special mobile app style for connect button */
.btn-mobile {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    margin: 0 auto;
}

.btn-mobile:before {
    content: '';
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10 17l5-5-5-5M13.8 12H3"/></svg>') no-repeat;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    display: inline-block;
}

/* Helper classes for wallet connection state */
body.wallet-connected .wallet-dependent {
    display: block;
}

body.wallet-disconnected .wallet-dependent {
    display: none;
}

/* Additional accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .mobile-wallet-actions,
    .notification {
        transition: none;
    }
}

/* Стили для кастомного уведомления */
.custom-notification {
    padding: 15px;
    max-width: 400px;
}

.notification-message {
    margin-bottom: 10px;
}

.notification-actions {
    display: flex;
    justify-content: flex-end;
}

.notification-actions .btn {
    margin-left: 10px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Стили для плейсхолдера адреса */
.address-placeholder {
    color: #ff8c00;
    font-style: italic;
}

/* Увеличиваем высоту уведомления при наличии кнопки */
.custom-notification.show {
    min-height: 80px;
}

.balance-warning {
    color: #ff3b30;
    font-weight: bold;
    position: relative;
}

.balance-warning::after {
    content: "⚠️ Low";
    font-size: 0.7rem;
    position: absolute;
    top: -10px;
    right: -10px;
    background: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0.9;
}

/* Стили для кастомного уведомления */
.custom-notification {
    padding: 15px !important;
    max-width: 400px;
}

.notification-message {
    margin-bottom: 10px;
}

.notification-actions {
    display: flex;
    justify-content: flex-end;
}

.notification-actions .btn {
    margin-left: 10px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Стили для плейсхолдера адреса */
.address-placeholder {
    color: #ff8c00;
    font-style: italic;
    position: relative;
    display: inline-block;
    border-bottom: 1px dashed #ff8c00;
}

.address-placeholder::after {
    content: "⚠️";
    margin-left: 5px;
    font-size: 14px;
}

/* Увеличиваем высоту уведомления при наличии кнопки */
.custom-notification.show {
    min-height: 80px;
}

/* Стиль для предупреждения о низком балансе */
.balance-warning {
    color: #ff3b30;
    font-weight: bold;
    position: relative;
}

.balance-warning::after {
    content: "⚠️ Low";
    font-size: 0.7rem;
    position: absolute;
    top: -10px;
    right: -20px;
    background: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0.9;
}

/* Стили для улучшенного уведомления о фаусете с двумя кнопками */
.faucet-notification-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}

.address-container {
    display: flex;
    align-items: center;
    background: rgba(247, 147, 26, 0.08);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 5px;
    border: 1px solid rgba(247, 147, 26, 0.3);
    position: relative;
}

.user-address {
    font-family: monospace;
    font-size: 14px;
    word-break: break-all;
    flex: 1;
    color: #333;
    font-weight: bold;
}

.faucet-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.faucet-actions .btn {
    flex: 1;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

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

.btn-secondary.copied {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.btn-icon {
    font-size: 16px;
}

.btn-faucet {
    background: linear-gradient(45deg, #f7931a, #ff8c00);
    border: none;
    color: white;
}

.btn-faucet:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.faucet-instructions {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid #eee;
}

.instruction-text {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.instruction-text:last-child {
    margin-bottom: 0;
}

.instruction-text:before {
    content: "•";
    position: absolute;
    left: 6px;
    color: #f7931a;
    font-weight: bold;
}

/* Увеличиваем размер и время показа уведомления */
.custom-notification.show {
    min-height: 100px;
    max-width: 500px;
    padding: 20px;
}

/* Анимация успешного копирования */
@keyframes pulse-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-secondary.copied {
    animation: pulse-success 0.5s ease-in-out;
}

/* Стили для мобильных устройств */
@media (max-width: 480px) {
    .faucet-actions {
        flex-direction: column;
    }

    .custom-notification.show {
        max-width: 90%;
        padding: 15px;
    }
}

/* Стили для улучшенного уведомления о фаусете с двумя кнопками */
.faucet-notification-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}

.address-container {
    display: flex;
    align-items: center;
    background: rgba(247, 147, 26, 0.08);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 5px;
    border: 1px solid rgba(247, 147, 26, 0.3);
    position: relative;
}

.user-address {
    font-family: monospace;
    font-size: 14px;
    word-break: break-all;
    flex: 1;
    color: #333;
    font-weight: bold;
}

.faucet-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.faucet-actions .btn {
    flex: 1;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

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

.btn-secondary.copied {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.btn-icon {
    font-size: 16px;
}

.btn-faucet {
    background: linear-gradient(45deg, #f7931a, #ff8c00);
    border: none;
    color: white;
}

.btn-faucet:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.faucet-instructions {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid #eee;
}

.instruction-text {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.instruction-text:last-child {
    margin-bottom: 0;
}

.instruction-text:before {
    content: "•";
    position: absolute;
    left: 6px;
    color: #f7931a;
    font-weight: bold;
}

/* Увеличиваем размер и время показа уведомления */
.custom-notification.show {
    min-height: 100px;
    max-width: 500px;
    padding: 20px;
}

/* Анимация успешного копирования */
@keyframes pulse-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-secondary.copied {
    animation: pulse-success 0.5s ease-in-out;
}

/* Стили для мобильных устройств */
@media (max-width: 480px) {
    .faucet-actions {
        flex-direction: column;
    }

    .custom-notification.show {
        max-width: 90%;
        padding: 15px;
    }
}

/* Стили для кнопок фаусета */
.faucet-buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 15px;
}

.faucet-btn {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    padding: 8px 12px;
    white-space: nowrap;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .faucet-buttons {
        gap: 5px;
    }

    .faucet-btn {
        font-size: 0.8rem;
        padding: 6px 8px;
        /* Сокращаем ширину кнопок */
        max-width: 45%;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 375px) {
    .faucet-btn {
        font-size: 0.75rem;
        padding: 5px 6px;
    }
}

/* Стили для вертикального расположения кнопок фаусета */
.faucet-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.faucet-btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    margin-top: 5px;
}

/* Убедитесь, что эти стили согласуются с вашими существующими стилями для кнопок */
.btn-primary {
    background-color: #000;
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background-color: #f7931a;
}

/* Дополнительное пространство для выравнивания нижней кнопки с "Send Tokens" */
.wallet-card:first-child {
    display: flex;
    flex-direction: column;
}

.faucet-buttons-container {
    margin-top: auto;
    padding-bottom: 10px; /* Подстройте это значение для точного выравнивания */
}

/* Скрываем кнопку Add Rootstock */
#add-rootstock,
button[data-network="rootstock"],
.btn-add-rootstock,
.add-network-btn {
    display: none !important;
}

/* SatoshiFi - ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ NFT COLLECTION */

/* NFT Collection Tabs */
.nft-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #6b7280;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.tab-button.active {
    background: white;
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

.tab-button.admin-tab {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
}

.tab-button.admin-tab:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
}

.tab-button.admin-tab.active {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-bottom-color: #dc2626;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* NFT Cards Grid */
.nfts-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.nft-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nft-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nft-card.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.nft-card.inactive {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #ffffff);
    opacity: 0.8;
}

.nft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.nft-type {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.nft-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.nft-status.active {
    background: #d1fae5;
    color: #065f46;
}

.nft-status.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.nft-details {
    margin: 15px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 6px 0;
}

.detail-item .label {
    font-weight: 500;
    color: #6b7280;
    font-size: 14px;
}

.detail-item .value {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.nft-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
}

/* Request Cards */
.request-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-request {
    border-left: 4px solid #dc2626;
}

.user-request {
    border-left: 4px solid #3b82f6;
}

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

.request-info h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.request-info p {
    margin: 2px 0;
    color: #6b7280;
    font-size: 14px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.approved {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.request-details {
    margin: 15px 0;
    padding: 15px;
    background: #f9fafb;
    border-radius: 6px;
}

.request-details p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.admin-notes-section {
    margin-top: 15px;
}

.admin-notes-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

/* Admin Panel Specific */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border-radius: 8px;
}

.admin-header h2 {
    margin: 0;
    font-size: 24px;
}

.admin-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 18px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state h3 {
    margin: 15px 0;
    color: #374151;
    font-size: 20px;
}

.empty-state p {
    margin: 10px 0 20px 0;
    font-size: 16px;
}

.error-state {
    text-align: center;
    padding: 40px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
}

.access-denied {
    text-align: center;
    padding: 60px 20px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #c2410c;
}

/* Debug Section */
details {
    margin-top: 20px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px;
}

summary {
    cursor: pointer;
    font-weight: 600;
    padding: 10px;
    background: #f9fafb;
    border-radius: 4px;
}

.debug-requests {
    background: #f3f4f6;
    border-radius: 4px;
    padding: 15px;
    font-family: monospace;
    font-size: 12px;
}

.debug-request {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 3px solid #6b7280;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-error {
    background: #ef4444;
    color: white;
}

.btn-error:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

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

/* Headers */
.nft-collection-header {
    margin-bottom: 30px;
    text-align: center;
}

.nft-collection-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #374151;
}

.nft-collection-header p {
    margin: 0;
    color: #6b7280;
    font-size: 16px;
}

.nfts-header {
    margin-bottom: 20px;
}

.nfts-header h3 {
    margin: 0;
    font-size: 22px;
    color: #374151;
}

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

.requests-header h3 {
    margin: 0;
    font-size: 22px;
    color: #374151;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nfts-grid-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .nft-tabs {
        flex-direction: column;
    }

    .tab-button {
        text-align: center;
    }

    .admin-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .admin-stats {
        justify-content: center;
    }

    .admin-actions {
        flex-direction: column;
    }

    .requests-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Добавлено: ряд "адрес + кнопка убрать" на create-federation.html */
.participant-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.participant-row .participant-address {
  flex: 1;
}

/* Добавлено: ряд "id федерации + статус + кнопка убрать" на create-confederation.html */
.federation-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.federation-row .federation-id {
  flex: 1;
}

/* Добавлено: грид на 4 поля кастодиана на create-confederation.html */
.custodian-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.custodian-institutional {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
  white-space: nowrap;
}
