:root {
    --bg: #070809;
    --panel: #111315;
    --panel-soft: #17191c;
    --panel-raised: #1b1d20;
    --primary: #3f82f6;
    --accent: #8fb5ff;
    --danger: #ff4747;
    --icon-muted: #617087;
    --glass: rgba(255, 255, 255, 0.032);
    --border: rgba(118, 132, 154, 0.24);
    --border-soft: rgba(255, 255, 255, 0.07);
    --text-muted: #98a3b3;
}

body {
    background-color: var(--bg);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
    overflow: hidden; /* Block scroll */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none;     /* IE 10+ */
    user-select: none;         /* Standard */
}

/* --- PRELOADER STYLES --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-logo {
    width: 130px;
    height: auto;
    z-index: 5;
    mix-blend-mode: screen; 
    filter: drop-shadow(0 0 25px rgba(63, 130, 246, 0.4));
    animation: logo-pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.loader-ring {
    position: absolute;
    width: 230px;
    height: 230px;
}

.loader-ring circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 100 400;
    filter: drop-shadow(0 0 8px var(--primary));
    transform-origin: center;
    animation: rotate-ring 1.5s linear infinite;
}

.glow {
    position: absolute;
    width: 180px;
    height: 180px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    animation: glow-breath 2s ease-in-out infinite;
}

h1,
h2,
h3,
h4,
h5,
h6,
.btn-modern,
.logo-box {
    letter-spacing: 0;
}

#bg-glow {
    position: fixed;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(63, 130, 246, 0.1) 0%, rgba(7, 8, 9, 0) 68%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
}

.main-content {
    position: relative;
    z-index: 1;
}

/* --- LOGO STYLE --- */
.logo-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.4rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 12px 32px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.logo-icon img {
    width: 75%;
    height: 75%;
    object-fit: contain;
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary), #f3f7ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero-title {
    letter-spacing: 0;
}

/* --- APP SCREENSHOT --- */
.app-interface-frame {
    background: #050607;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.62);
}

.app-interface-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- SECURITY BLOCK --- */
.security-badge {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
    border-radius: 8px;
    padding: 50px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.node-circle {
    width: 60px;
    height: 60px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto;
    z-index: 2;
    position: relative;
}

/* Animated arrow */
.direct-arrow-anim {
    font-size: 3rem;
    color: var(--primary);
    animation: slideRight 2s infinite ease-in-out;
    display: inline-block;
}

@keyframes slideRight {
    0% {
        transform: translateX(-20px);
        opacity: 0.2;
    }

    50% {
        transform: translateX(20px);
        opacity: 1;
    }

    100% {
        transform: translateX(-20px);
        opacity: 0.2;
    }
}

/* Buttons and cards */
.btn-modern {
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 650;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.btn-win {
    background: var(--primary);
    color: #fff;
}

.btn-mac {
    background: var(--panel);
    color: #fff;
    border: 1px solid var(--border-soft);
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(63, 131, 248, 0.28);
}

.tool-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 2rem;
    transition: 0.4s;
    height: 100%;
}

.tool-card:hover {
    border-color: rgba(63, 130, 246, 0.45);
    background: linear-gradient(180deg, rgba(63, 130, 246, 0.075), rgba(255, 255, 255, 0.025));
    transform: translateY(-4px);
}

.icon-box {
    width: 48px;
    height: 48px;
    background: var(--panel);
    color: var(--primary);
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
}

#how-to-run .border-start {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
    border: 1px solid var(--border-soft) !important;
    border-left: 1px solid rgba(63, 130, 246, 0.45) !important;
    border-radius: 8px;
    padding: 1.5rem !important;
}

#how-to-run code {
    color: var(--accent) !important;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace !important;
}

#how-to-run .rounded {
    border-radius: 8px !important;
}

footer {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.025), transparent);
    padding-top: 80px;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.2s;
}

.footer-link:hover {
    color: #fff;
}

@media (max-width: 576px) {
    .logo-box span {
        font-size: 1.1rem;
        font-weight: 700;
    }
    
    .logo-icon {
        font-size: 0.8rem;
    }

    h1.display-1 {
        font-size: 2.5rem !important;
        letter-spacing: 0 !important;
    }

    .security-badge {
        padding: 20px; 
        margin: 10px 0;
    }

    .direct-arrow-anim {
        font-size: 2rem; 
    }

    .node-circle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    footer .logo-box {
        justify-content: center;
        margin-bottom: 10px;
    }

    .btn-modern {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .app-interface-frame {
        margin-top: 8px;
    }
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: fit-content;
}

.select-trigger {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    cursor: pointer;
    color: #fff;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

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

.select-trigger .arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

/* Выпадающий список */
.select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95); /* Глубокий темный */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    overflow: hidden;
    display: none; /* Скрыт по умолчанию */
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.custom-select-wrapper.active .select-options {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.custom-select-wrapper.active .arrow {
    transform: rotate(180deg);
}

/* Стилизация пунктов (опшенов) */
.option {
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.option:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
    padding-left: 18px; /* Небольшой эффект сдвига при наведении */
}

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

.btn-link.text-secondary:hover {
    color: #0d6efd !important; /* Цвет станет синим при наведении */
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.btn-tg {
    background: rgba(36, 161, 222, 0.05); /* Очень легкий оттенок фона */
    border: 1px solid rgba(36, 161, 222, 0.4) !important; /* Заметная граница */
    color: #24A1DE !important;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 12px; /* Подстрой под радиус своих btn-modern */
    text-decoration: none;
    font-weight: 600;
}

.btn-tg:hover {
    background: rgba(36, 161, 222, 0.15);
    border-color: #24A1DE !important; /* Яркая граница при наведении */
    color: #24A1DE !important;
    box-shadow: 0 0 20px rgba(36, 161, 222, 0.2);
    transform: translateY(-2px);
}

.btn-tg i {
    font-size: 1.3rem;
}

/* Unified app-like controls */
.select-trigger {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.select-trigger:hover {
    background: var(--panel-raised);
    border-color: rgba(63, 130, 246, 0.45);
}

.select-options {
    background: rgba(17, 19, 21, 0.96);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
}

.option:hover {
    background: rgba(63, 130, 246, 0.16);
}

.btn-tg {
    background: var(--panel);
    border: 1px solid var(--border-soft) !important;
    border-radius: 8px;
    color: var(--primary) !important;
    transition: all 0.2s ease;
}

.btn-tg:hover {
    background: var(--panel-raised);
    border-color: rgba(63, 130, 246, 0.45) !important;
    color: var(--primary) !important;
    box-shadow: 0 0 20px rgba(63, 130, 246, 0.18);
}

@keyframes logo-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.3); opacity: 1; }
}

@keyframes rotate-ring {
    0% { transform: rotate(0deg); stroke-dashoffset: 500; }
    100% { transform: rotate(360deg); stroke-dashoffset: 0; }
}

@keyframes glow-breath {
    0%, 100% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(1.2); opacity: 0.25; }
}
