/* 
 * OPTIX - Premium CSS Design System
 * Sleek Dark Theme, Glassmorphism, Neon Accents, and Smooth Micro-Animations
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Colors */
    --bg-dark: #060814;
    --bg-card: rgba(13, 17, 39, 0.5);
    --bg-card-hover: rgba(22, 29, 63, 0.7);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-hover: rgba(0, 240, 255, 0.25);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --neon-blue: #00f0ff;
    --neon-blue-hsl: 184, 100%, 50%;
    --neon-purple: #bd00ff;
    --neon-purple-hsl: 285, 100%, 50%;
    --neon-green: #00ff66;
    --neon-green-hsl: 144, 100%, 50%;
    --neon-red: #ff0055;
    --neon-red-hsl: 340, 100%, 50%;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
    --grad-blue-glow: linear-gradient(180deg, rgba(0, 240, 255, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
    --grad-purple-glow: linear-gradient(180deg, rgba(189, 0, 255, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
    --grad-green-glow: linear-gradient(180deg, rgba(0, 255, 102, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
    --grad-red-glow: linear-gradient(180deg, rgba(255, 0, 85, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
    
    /* Layout */
    --container-max: 1200px;
    --nav-height: 80px;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

ul {
    list-style: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* Glassmorphism Styles */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: var(--border-glass-hover);
    box-shadow: 0 10px 30px -10px rgba(0, 240, 255, 0.15);
    background: var(--bg-card-hover);
}

/* Global Layout Grid */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(6, 8, 20, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.logo span {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--neon-blue);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    background: var(--grad-primary);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(189, 0, 255, 0.5), 0 0 10px rgba(0, 240, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Mobile Nav Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 160px 0 100px;
    background-image: radial-gradient(circle at 70% 30%, rgba(189, 0, 255, 0.08) 0%, rgba(6, 8, 20, 0) 60%),
                      radial-gradient(circle at 20% 70%, rgba(0, 240, 255, 0.06) 0%, rgba(6, 8, 20, 0) 50%);
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--neon-blue);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--neon-blue);
    border-radius: 50%;
    animation: flash 1.5s infinite;
}

.hero h1 {
    font-size: 54px;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero h1 span {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(0, 240, 255, 0.1);
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    width: 100%;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-img {
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 50px -15px rgba(6, 8, 20, 0.9), 0 0 40px rgba(189, 0, 255, 0.15);
    animation: float 6s ease-in-out infinite;
}

.hero-img-backdrop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: var(--grad-primary);
    filter: blur(80px);
    opacity: 0.15;
    z-index: -1;
}

/* Stats Row */
.stats {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(6, 8, 20, 0.4);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

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

.stat-num {
    font-size: 36px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: radial-gradient(circle at 10% 40%, rgba(0, 255, 102, 0.03) 0%, rgba(6, 8, 20, 0) 50%);
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 38px;
    margin-bottom: 16px;
}

.section-header h2 span {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    padding: 36px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.feature-icon-wrapper svg {
    width: 24px;
    height: 24px;
    stroke: var(--neon-blue);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Simulator Section */
.simulator-section {
    padding: 100px 0;
    background-image: radial-gradient(circle at 90% 80%, rgba(189, 0, 255, 0.06) 0%, rgba(6, 8, 20, 0) 65%);
}

.sim-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 60px;
    align-items: center;
}

.sim-content h2 {
    font-size: 38px;
    margin-bottom: 20px;
}

.sim-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Interactive Configurator inside Sim Content */
.config-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
}

.config-item {
    margin-bottom: 16px;
}

.config-item:last-child {
    margin-bottom: 0;
}

.config-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.selector-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sel-btn {
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sel-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.sel-btn.active {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.sim-trigger {
    width: 100%;
    margin-top: 20px;
}

/* Telegram Widget Styling */
.telegram-widget {
    height: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px -20px rgba(6, 8, 20, 0.95);
    background: #090e1f;
    position: relative;
}

.tg-header {
    background: #172131;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grad-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.tg-info {
    display: flex;
    flex-direction: column;
}

.tg-name {
    font-size: 15px;
    font-weight: 600;
}

.tg-status {
    font-size: 12px;
    color: var(--neon-green);
    font-weight: 500;
}

.tg-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: #0b1126;
    background-image: radial-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 20px 20px;
    scrollbar-width: thin;
}

/* Telegram Message Styling */
.tg-msg {
    align-self: flex-start;
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: bubbleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

.tg-bubble {
    background: #182540;
    border-radius: 4px 16px 16px 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tg-bubble-photo {
    border-radius: 16px 16px 4px 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: -1px;
}

.tg-bubble-photo img {
    width: 100%;
    display: block;
    height: auto;
    max-height: 160px;
    object-fit: cover;
}

.tg-photo-msg .tg-bubble {
    border-radius: 0 0 16px 16px;
    border-top: none;
}

.tg-time {
    align-self: flex-end;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Inline Keyboard */
.tg-keyboard {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.tg-kb-row {
    display: flex;
    gap: 6px;
}

.tg-kb-btn {
    flex: 1;
    background: rgba(23, 33, 49, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #00f0ff;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tg-kb-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
}

/* Quick Signal Custom Layout */
.card-signal {
    background: var(--bg-card);
}

.card-signal h4 {
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

/* Performance and Safe Targets Section */
.risk-management {
    padding: 100px 0;
    background: rgba(6, 8, 20, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.risk-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 80px;
    align-items: center;
}

.risk-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.risk-card {
    padding: 24px;
    text-align: left;
}

.risk-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.risk-card-icon svg {
    width: 20px;
    height: 20px;
}

.risk-card.green .risk-card-icon svg { stroke: var(--neon-green); }
.risk-card.red .risk-card-icon svg { stroke: var(--neon-red); }
.risk-card.blue .risk-card-icon svg { stroke: var(--neon-blue); }
.risk-card.purple .risk-card-icon svg { stroke: var(--neon-purple); }

.risk-card h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.risk-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Live Simulator Logs */
.terminal-widget {
    background: #04060e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    font-family: monospace;
    padding: 20px;
    height: 280px;
    overflow-y: auto;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.term-line {
    display: flex;
    gap: 8px;
}

.term-time {
    color: var(--neon-purple);
}

.term-cmd {
    color: #fff;
}

.term-info {
    color: var(--neon-blue);
}

.term-success {
    color: var(--neon-green);
}

.term-error {
    color: var(--neon-red);
}

/* CTA Banner Section */
.cta-banner {
    padding: 100px 0;
    position: relative;
}

.cta-box {
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.1) 0%, rgba(6, 8, 20, 0) 70%);
}

.cta-box h2 {
    font-size: 42px;
    margin-bottom: 16px;
}

.cta-box p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer Section */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #04050c;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-col a:hover {
    color: var(--neon-blue);
    padding-left: 4px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 40px;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-disclaimer {
    max-width: 1000px;
    margin: 40px auto 0;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scroll Trigger Fades */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsiveness */
@media (max-width: 1024px) {
    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-image-wrapper {
        order: -1;
    }
    
    .hero h1 {
        font-size: 42px;
    }
    
    .sim-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .risk-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: #060814;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 30px 24px;
        gap: 20px;
        align-items: flex-start;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }
    
    .nav-links.mobile-active {
        display: flex;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .risk-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
