/* Сброс и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Разрешаем выделение только в конфигурации ботов */
.bot-config-content {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Стилизация скроллбара для компьютера */
@media (min-width: 769px) {
    ::-webkit-scrollbar {
        width: 12px;
    }

    ::-webkit-scrollbar-track {
        background: rgba(10, 10, 10, 0.9);
        border-radius: 6px;
    }

    ::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #ffffff, #e0e0e0);
        border-radius: 6px;
        border: 2px solid rgba(10, 10, 10, 0.9);
    }

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #f0f0f0, #d0d0d0);
    }

    /* Для Firefox */
    * {
        scrollbar-width: thin;
        scrollbar-color: #ffffff rgba(10, 10, 10, 0.9);
    }
}

/* Основная тема с чёрным фоном */
html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ffffff;
    touch-action: pan-y;
    -webkit-user-drag: none;
    background: #000000;
    position: relative;
}

/* Майнкрафт текстура - пиксельная сетка */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center center;
    z-index: -1;
    pointer-events: none;
}

/* Навигационная панель */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    padding: 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin: 0;
    height: 70px;
    padding: 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
}

.brand-text {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    margin: 0;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.brand-text:hover {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.nav-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    font-family: inherit;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.nav-link.highlight {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: highlightPulse 0.5s ease-in-out;
}

@keyframes highlightPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Правая часть навигации */
.nav-right {
    margin-right: 15px;
}

.nav-menu-wrapper {
    position: relative;
}

/* Кнопка меню */
.menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 32px;
    height: 32px;
    justify-content: center;
    align-items: center;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Выпадающее меню */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 150px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1002;
}

.dropdown-menu.active {
    opacity: 1;
    transform: translateY(5px);
    visibility: visible;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Страницы */
.page {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    transform: translateX(20px);
    z-index: 1;
    overflow-y: auto;
    padding: 20px;
}

.page.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Страница приветствия */
.welcome-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 20px;
}

.welcome-content {
    max-width: min(1000px, 95vw);
    width: 100%;
    text-align: center;
}

.welcome-title {
    font-size: clamp(2rem, 6vw, 3rem);
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    line-height: 1.2;
    font-family: 'Courier New', monospace;
}

.welcome-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: #cccccc;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.feature-card {
    background: rgba(30, 30, 30, 0.8);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.feature-icon {
    font-size: clamp(2rem, 6vw, 2.5rem);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.feature-card h3 {
    color: #ffffff;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.feature-card p {
    color: #cccccc;
    line-height: 1.5;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.welcome-actions {
    background: rgba(30, 30, 30, 0.8);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: min(500px, 95vw);
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.action-text {
    color: #ffffff;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 500;
    padding: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.4;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Контейнеры страниц */
.panel-container,
.bots-container {
    max-width: min(1200px, 95vw);
    margin: 0 auto;
    width: 100%;
}

.panel-header,
.bots-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.panel-header h1,
.bots-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Courier New', monospace;
}

.panel-header p,
.bots-header p {
    font-size: clamp(1rem, 3vw, 1.1rem);
    color: #cccccc;
    line-height: 1.4;
}

/* Стили для контента инструкций */
.instructions-content {
    max-width: min(800px, 95vw);
    margin: 0 auto;
}

.instruction-card {
    background: rgba(30, 30, 30, 0.9);
    border-radius: 12px;
    padding: clamp(20px, 4vw, 30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.instruction-card h3 {
    color: #ffffff;
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.instruction-card p {
    color: #cccccc;
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    text-align: center;
}

.instruction-content {
    margin-top: 25px;
}

.instruction-content h4 {
    color: #ffffff;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin: 20px 0 12px 0;
    font-weight: 600;
    line-height: 1.3;
}

.instruction-content ul {
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    padding-left: 0;
}

.instruction-content li {
    margin-bottom: 8px;
    padding-left: 0;
    word-wrap: break-word;
}

.instruction-content strong {
    color: #ffffff;
    font-weight: 600;
}

.instruction-content a {
    color: #ffffff;
    text-decoration: underline;
    transition: color 0.3s ease;
    word-break: break-all;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.instruction-content a:hover {
    color: #cccccc;
}

.instruction-tip {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
    margin-top: 20px;
    color: #ffffff;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.5;
}

.instruction-tip.warning {
    background: rgba(255, 100, 100, 0.1);
    border-left-color: rgba(255, 100, 100, 0.5);
}

/* Плавающие кнопки */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-button {
    width: clamp(45px, 10vw, 55px);
    height: clamp(45px, 10vw, 55px);
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.floating-button:hover {
    background: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.5);
}

/* Социальная панель */
.social-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.social-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.social-link {
    color: #000000;
    text-decoration: none;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
}

/* Мобильные исправления */
@media (max-width: 768px) {
    .nav-container {
        height: 60px;
    }
    
    .nav-left {
        margin-left: 10px;
        gap: 6px;
    }
    
    .nav-right {
        margin-right: 10px;
    }
    
    .nav-divider {
        height: 25px;
        margin: 0 6px;
    }
    
    .nav-menu {
        gap: 8px;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .dropdown-menu {
        min-width: 140px;
    }
    
    .page {
        top: 60px;
        padding: 15px;
    }
    
    .welcome-container {
        padding: 15px;
    }
    
    .welcome-features {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .welcome-actions {
        padding: 20px;
    }
    
    .panel-container,
    .bots-container {
        padding: 0;
    }
    
    .instructions-content {
        padding: 0;
    }
    
    .floating-buttons {
        bottom: 15px;
        right: 15px;
    }
    
    .social-panel {
        bottom: 70px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .nav-left {
        margin-left: 8px;
    }
    
    .nav-right {
        margin-right: 8px;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .page {
        top: 60px;
        padding: 10px;
    }
    
    .welcome-container {
        padding: 10px;
    }
    
    .feature-card {
        padding: 15px;
    }
    
    .welcome-actions {
        padding: 15px;
    }
    
    .action-text {
        padding: 15px;
    }
    
    .instruction-card {
        padding: 15px;
    }
}

/* Гарантия что все кнопки кликабельны */
.btn, 
.floating-button, 
.menu-toggle, 
.nav-link {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Убираем ненужные элементы */
.control-panel,
.bots-list-container,
.modal-overlay,
.telegram-auth-container {
    display: none !important;
}