/* --- COLORS & FONTS --- */
:root {
    --bg-core: #0b0d14;
    --glass-bg: rgba(23, 25, 35, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.12);
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-core);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- BACKGROUNDS --- */
/* Надежная картинка сервера с затемнением */
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 80vh;
    background-image: url('https://images.unsplash.com/photo-1558494949-efc535b5c47c?auto=format&fit=crop&q=80');
    background-size: cover; background-position: center;
    z-index: -2;
    /* Градиент в черноту */
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    opacity: 0.3; /* Чтобы текст читался лучше */
}

.ambient-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.1), transparent 60%);
    z-index: -1; pointer-events: none;
}

/* --- NAV --- */
.glass-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%; background: rgba(11, 13, 20, 0.9);
    backdrop-filter: blur(15px); position: sticky; top: 0; z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.back-link {
    text-decoration: none; color: var(--text-main); font-weight: 700;
    display: flex; align-items: center; gap: 10px; font-size: 0.9rem;
    transition: 0.3s; user-select: none;
}
.back-link:hover { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 20px; }

.login-btn-nav {
    background: transparent; border: 1px solid var(--glass-border);
    color: var(--text-muted); padding: 6px 14px; border-radius: 8px;
    cursor: pointer; font-size: 0.85rem; font-weight: 600;
    display: flex; align-items: center; gap: 8px; transition: 0.3s;
    user-select: none;
}
.login-btn-nav:hover { border-color: var(--accent); color: white; background: rgba(59, 130, 246, 0.1); }

.lang-switch-modern {
    background: rgba(0,0,0,0.4); padding: 4px; border-radius: 8px; display: flex;
}
.lang-opt {
    background: none; border: none; color: #64748b;
    padding: 5px 10px; border-radius: 6px; cursor: pointer;
    font-weight: 600; font-size: 0.75rem; transition: 0.3s; user-select: none;
}
.lang-opt:hover { color: white; }
.lang-opt.active { background: var(--accent); color: white; box-shadow: 0 0 10px var(--accent-glow); }

/* --- HERO SECTION (ИСПРАВЛЕНО) --- */
.main-container { max-width: 1200px; margin: 0 auto; padding: 20px 20px 40px; }

.hero-section {
    text-align: center; margin-bottom: 40px; padding: 30px 0;
    /* Анимация появления */
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(16, 185, 129, 0.1); color: var(--success);
    padding: 6px 14px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.2); margin-bottom: 15px;
    backdrop-filter: blur(5px); user-select: none;
}
.pulse { width: 6px; height: 6px; background: var(--success); border-radius: 50%; box-shadow: 0 0 8px var(--success); }

/* Заголовок плотнее */
.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; letter-spacing: -1px; 
    margin-bottom: 8px; color: white; text-transform: uppercase;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.3); /* Легкое свечение */
}

.hero-subtitle { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin: 0 auto; line-height: 1.4; }

/* --- SERVICES --- */
.services-wrapper { margin-bottom: 60px; }
.section-heading {
    font-size: 1.2rem; margin-bottom: 0; font-weight: 600;
    border-left: 3px solid var(--accent); padding-left: 12px;
    text-transform: uppercase; letter-spacing: 1px; color: white;
}
.grid-8 {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px; margin-top: 25px;
}
.glass-card {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 12px; padding: 20px; cursor: pointer;
    transition: all 0.3s ease; display: flex; flex-direction: column; gap: 15px;
    backdrop-filter: blur(10px); user-select: none;
}
.glass-card:hover {
    background: var(--glass-hover); transform: translateY(-3px);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.card-icon {
    width: 40px; height: 40px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
    background: rgba(255,255,255,0.03);
}
.card-icon.blue { color: #60a5fa; }
.card-icon.purple { color: #c084fc; }
.card-icon.red { color: #f87171; }
.card-icon.cyan { color: #22d3ee; }
.card-icon.green { color: #34d399; }
.card-icon.yellow { color: #facc15; }
.card-icon.orange { color: #fb923c; }
.card-icon.gray { color: #94a3b8; }
.card-info h3 { font-size: 0.95rem; margin-bottom: 5px; font-weight: 700; }
.card-info p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* --- PRICING --- */
.pricing-wrapper { margin-bottom: 60px; }
.pricing-header-row {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px;
}
.currency-toggle {
    background: rgba(0,0,0,0.4); padding: 4px; border-radius: 8px; display: flex;
}
.curr-btn {
    background: none; border: none; color: #64748b;
    padding: 6px 12px; border-radius: 6px; cursor: pointer;
    font-weight: 700; font-size: 0.8rem; transition: 0.3s; user-select: none;
}
.curr-btn:hover { color: white; }
.curr-btn.active { background: var(--accent); color: white; box-shadow: 0 0 10px var(--accent-glow); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.price-panel {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 12px; padding: 30px 20px; text-align: center; position: relative;
    display: flex; flex-direction: column; justify-content: center;
}
.price-panel h3 { font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 15px; }
.price-tag { font-size: 2rem; font-weight: 800; margin-bottom: 20px; color: white; }
.check-list { list-style: none; text-align: left; color: #cbd5e1; font-size: 0.85rem; padding: 0 10px; }
.check-list li { margin-bottom: 10px; display: flex; align-items: flex-start; gap: 10px; }
.check-list li::before { content: '•'; color: var(--accent); font-weight: bold; font-size: 1.2rem; line-height: 0.8; }
.price-panel.highlight { background: rgba(59, 130, 246, 0.08); border-color: var(--accent); }
.pop-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: white; padding: 4px 10px;
    font-size: 0.65rem; font-weight: 800; border-radius: 20px; text-transform: uppercase;
}

/* --- ADMIN DEMO --- */
.admin-demo-section { margin-top: 60px; }
.badge-live {
    background: var(--danger); color: white; padding: 2px 6px; border-radius: 4px;
    font-size: 0.7rem; vertical-align: middle; margin-left: 10px; animation: pulseRed 2s infinite;
}
.demo-subtitle { color: var(--text-muted); margin-bottom: 20px; font-size: 0.9rem; }
.dashboard-mockup {
    background: #0f1115; border: 1px solid var(--glass-border); border-radius: 8px;
    display: flex; overflow: hidden; min-height: 350px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.dash-sidebar { width: 180px; border-right: 1px solid var(--glass-border); padding: 15px 0; background: rgba(255,255,255,0.02); }
.dash-item {
    padding: 10px 20px; color: var(--text-muted); font-size: 0.85rem; display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
}
.dash-item:hover { color: white; background: rgba(255,255,255,0.05); }
.dash-item.active { border-left: 3px solid var(--success); color: var(--success); background: rgba(16, 185, 129, 0.05); }
.dash-content { flex: 1; padding: 25px; }
.stats-row { display: flex; gap: 20px; margin-bottom: 25px; }
.stat-card {
    flex: 1; background: rgba(255,255,255,0.03); padding: 15px; border-radius: 6px;
    border: 1px solid var(--glass-border); text-align: center;
}
.stat-card.alert { border-color: rgba(239, 68, 68, 0.3); }
.stat-num { font-size: 1.5rem; font-weight: 800; margin-bottom: 5px; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.cyber-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; font-family: 'JetBrains Mono', monospace; }
.cyber-table th { text-align: left; color: var(--text-muted); padding-bottom: 10px; font-weight: 400; }
.cyber-table td { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }
.badge { padding: 3px 6px; border-radius: 3px; font-size: 0.65rem; }
.badge.green { color: var(--success); background: rgba(16, 185, 129, 0.1); }
.badge.red { color: var(--danger); background: rgba(239, 68, 68, 0.1); }

/* --- MODALS --- */
.modal-backdrop {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    z-index: 1000; align-items: center; justify-content: center;
}
.modal-glass {
    background: #161821; border: 1px solid var(--glass-border);
    padding: 30px; border-radius: 12px; width: 90%; max-width: 450px;
    position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
}
.login-box { max-width: 350px; text-align: center; }
.login-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }
.input-group {
    background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
    border-radius: 8px; padding: 10px 15px; margin-bottom: 15px;
    display: flex; align-items: center; gap: 10px; color: var(--text-muted);
}
.input-group input { background: none; border: none; color: white; width: 100%; outline: none; }
.btn-fill {
    background: var(--accent); border: none; color: white;
    width: 100%; padding: 12px; border-radius: 8px; font-weight: 600; cursor: pointer;
    transition: 0.3s;
}
.btn-fill:hover { opacity: 0.9; box-shadow: 0 0 15px var(--accent-glow); }
.close-modal {
    position: absolute; top: 15px; right: 20px; background: none; border: none;
    color: var(--text-muted); font-size: 1.5rem; cursor: pointer;
}
.modal-glass h2 { margin-bottom: 10px; color: white; font-size: 1.2rem; }
.modal-glass ul { margin-left: 20px; margin-top: 15px; color: #ccc; font-size: 0.9rem; line-height: 1.6; }

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulseRed { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2rem; }
    .nav-right span { display: none; }
    .dashboard-mockup { flex-direction: column; }
    .dash-sidebar { width: 100%; display: flex; border-right: none; border-bottom: 1px solid var(--glass-border); }
}

/* --- PRODUCTS SECTION --- */
.products-wrapper { margin-bottom: 80px; }
.badge-new {
    background: var(--accent); color: white; padding: 2px 8px; border-radius: 4px;
    font-size: 0.7rem; vertical-align: middle; margin-left: 10px;
}

.products-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; margin-top: 30px;
}

.product-card {
    background: #0f1115; border: 1px solid var(--glass-border);
    border-radius: 16px; overflow: hidden;
    transition: 0.3s ease; user-select: none;
}
.product-card:hover {
    transform: translateY(-5px); border-color: var(--accent);
}

.prod-img {
    height: 180px; background-size: cover; background-position: center;
    filter: grayscale(100%); transition: 0.5s;
}
.product-card:hover .prod-img { filter: grayscale(0%); }

.prod-content { padding: 20px; }
.prod-content h3 { font-size: 1.1rem; margin-bottom: 5px; color: white; }
.prod-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 15px; }

.tech-stack { display: flex; gap: 10px; }
.tech-stack span {
    background: rgba(255,255,255,0.05); padding: 4px 10px; border-radius: 4px;
    font-size: 0.7rem; color: #888; border: 1px solid rgba(255,255,255,0.05);
}

/* --- DASHBOARD PAGE STYLES --- */
.dashboard-body {
    display: flex; height: 100vh; background: #0b0d14; overflow: hidden;
}

.dash-nav {
    width: 250px; background: #0f1115; border-right: 1px solid var(--glass-border);
    display: flex; flex-direction: column; padding: 20px;
}

.dash-logo {
    font-size: 1.5rem; font-weight: 800; color: white; margin-bottom: 40px;
}
.dash-logo .blue { color: var(--accent); }

.nav-links { list-style: none; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.nav-links li {
    padding: 12px 15px; border-radius: 8px; color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; gap: 12px; transition: 0.3s;
}
.nav-links li:hover, .nav-links li.active {
    background: rgba(59, 130, 246, 0.1); color: white;
}
.nav-links .spacer { flex: 1; }
.logout { color: var(--danger); text-decoration: none; display: flex; align-items: center; gap: 12px; }

.dash-main { flex: 1; padding: 30px; overflow-y: auto; }

.top-bar {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px;
}
.top-bar h2 { font-size: 1.8rem; color: white; }

.user-profile { display: flex; align-items: center; gap: 15px; color: white; }
.avatar {
    width: 40px; height: 40px; background: var(--accent); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.dash-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; margin-bottom: 40px;
}

.widget {
    background: #13151b; padding: 25px; border-radius: 12px;
    border: 1px solid var(--glass-border);
}
.widget h3 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; }
.widget-value { font-size: 2rem; font-weight: 800; color: white; }

.trend { font-size: 0.9rem; margin-left: 10px; padding: 2px 6px; border-radius: 4px; vertical-align: middle; }
.trend.up { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.trend.down { background: rgba(59, 130, 246, 0.2); color: var(--accent); }
.text-red { color: var(--danger); }
.sub-text { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; margin-left: 10px; }

.panel-section {
    background: #13151b; padding: 25px; border-radius: 12px; border: 1px solid var(--glass-border);
}
.panel-section h3 { margin-bottom: 20px; color: white; }
.full-width { width: 100%; }