/* --- RESET & GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-color: #0b0c10;
    --card-bg: #11141a;
    --border-color: #1f2833;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #45f3ff; /* Неоновый бирюзовый */
    --primary-glow: rgba(69, 243, 255, 0.5);
    --secondary: #8b5cf6; /* Фиолетовый акцент */
    --font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Холст частиц */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Свечение за курсором (скрыто на мобильных) */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(69, 243, 255, 0.08) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 90;
    transform: translate(-50%, -50%);
    display: none;
}

@media (pointer: fine) {
    .cursor-glow { display: block; }
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Декоративное неоновое свечение на фоне */
.glow-bg-top {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(69, 243, 255, 0.12) 0%, rgba(139, 92, 246, 0.04) 50%, rgba(0,0,0,0) 100%);
    z-index: 0;
    pointer-events: none;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary);
    color: #0b0c10;
}

.btn-primary:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

.btn-glow {
    box-shadow: 0 0 20px rgba(69, 243, 255, 0.2);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(69, 243, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1rem;
}

/* Пульсация для кнопки Echtgeld */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 15px rgba(69, 243, 255, 0.2); }
    50% { box-shadow: 0 0 35px rgba(69, 243, 255, 0.6); }
    100% { box-shadow: 0 0 15px rgba(69, 243, 255, 0.2); }
}

.animate-pulse {
    animation: pulseGlow 2s infinite ease-in-out;
}

/* Кнопка в хедере всегда подсвечена */
.btn-glow-active {
    box-shadow: 0 0 15px rgba(69, 243, 255, 0.3);
}

/* --- HEADER --- */
.main-header {
    background: rgba(11, 12, 16, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 18px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
    position: relative;
}

.logo span {
    color: var(--primary);
}

.logo .glitch-at {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    color: var(--secondary);
    animation: glitchLogo 4s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

@keyframes glitchLogo {
    0%, 90%, 100% { opacity: 0; transform: translate(0); }
    91% { opacity: 1; transform: translate(-2px, 2px); }
    93% { opacity: 1; transform: translate(2px, -1px); }
    95% { opacity: 0; }
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

/* --- HERO & IFRAME (DEMO) --- */
.hero-section {
    position: relative;
    padding: 40px 0;
    z-index: 1;
}

.demo-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-color);
}

.demo-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 35px;
}

/* --- INTERACTIVE STATS --- */
.stats-section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 35px;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    /* Обязательно для 3D эффекта наклона */
    perspective: 1000px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    /* Обязательно для сохранения 3D контекста */
    transform-style: preserve-3d;
}

.stat-card:hover {
    border-color: rgba(69, 243, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.stat-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    font-weight: 700;
    transform: translateZ(20px); /* Выносит текст вперед */
}

/* Круговая диаграмма */
.chart-container {
    position: relative;
    width: 120px;
    height: 120px;
    transform: translateZ(30px); /* Выносит диаграмму еще дальше */
}

.progress-ring__circle {
    transform: rotate(-90deg);
    transform-origin: 60px 60px;
    transition: stroke-dashoffset 0.6s ease;
}

.chart-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
}

/* Полоса волатильности */
.volatility-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin: 25px 0 15px;
    transform: translateZ(30px);
}

.bar-fill {
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(69, 243, 255, 0.5);
    width: 85%;
}

.big-number {
    font-size: 3.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 12px;
    transform: translateZ(40px);
}

.big-number span {
    color: var(--primary);
}

.stat-label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transform: translateZ(20px);
}

/* --- LIVE TICKER --- */
.live-ticker-wrap {
    margin: 20px 0 40px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: #090d16;
    display: flex;
    overflow: hidden;
    height: 40px;
    align-items: center;
}

.ticker-header {
    background: var(--primary);
    color: #0b0c10;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
    z-index: 2;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: tickerLoop 25s linear infinite;
}

.ticker-item {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 40px;
}

.ticker-item span.user { color: #ffffff; font-weight: 600; }
.ticker-item span.win { color: var(--primary); font-weight: 700; }

@keyframes tickerLoop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- AUTOMATIC CONTENT CONTAINER STYLES --- */
.content-section {
    padding: 20px 0 40px;
}

.content-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 50px;
    position: relative;
}

/* Типографика контента */
.content-container h1,
.content-container h2,
.content-container h3 {
    color: #ffffff;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.content-container h1:first-child { margin-top: 0; }
.content-container h1 { font-size: 2.4rem; color: var(--primary); text-shadow: 0 0 15px rgba(69, 243, 255, 0.2); }
.content-container h2 { font-size: 1.8rem; border-left: 3px solid var(--secondary); padding-left: 15px; }
.content-container h3 { font-size: 1.4rem; color: #ffffff; }

.content-container p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 22px;
    line-height: 1.7;
}

.content-container ul, 
.content-container ol {
    margin-bottom: 26px;
    padding-left: 22px;
}

.content-container li {
    color: var(--text-muted);
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.content-container ul li::marker { color: var(--secondary); }
.content-container ol li::marker { color: var(--primary); font-weight: 700; }

/* Таблицы */
.content-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.content-container th, 
.content-container td {
    padding: 16px 20px;
    text-align: left;
}

.content-container th {
    background-color: var(--border-color);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content-container tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.content-container tr:hover { background: rgba(69, 243, 255, 0.03); }
.content-container tr:last-child { border-bottom: none; }
.content-container td { color: var(--text-muted); }

/* --- AUTHOR SECTION --- */
.author-section {
    padding: 40px 0 60px;
}

.author-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 35px;
    display: flex;
    gap: 30px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.author-card::before {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
}

.author-avatar {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.author-avatar img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.author-info {
    position: relative;
    z-index: 2;
}

.author-info h4 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: 700;
}

.author-info p {
    color: #7e8da1;
    font-size: 0.95rem;
    max-width: 850px;
    line-height: 1.6;
}

/* --- FOOTER --- */
.main-footer {
    background: #050508;
    padding: 35px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.main-footer p {
    color: #475569;
    font-size: 0.85rem;
    max-width: 950px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- MOBILE ADAPTABILITY --- */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        perspective: none; /* Убираем 3D на планшетах для производительности */
    }
    .stat-card {
        transform: none !important; /* Убираем наклон */
        transform-style: flat;
    }
    .stat-card h3, .chart-container, .volatility-bar, .big-number, .stat-label {
        transform: none !important;
    }
}

@media (max-width: 768px) {
    .main-header { padding: 15px 0; }
    .header-flex { flex-direction: column; gap: 12px; }
    .nav-links { gap: 20px; }
    .hero-actions { flex-direction: column; width: 100%; gap: 12px; }
    .hero-actions .btn { width: 100%; }
    .content-container { padding: 24px; }
    .content-container h1 { font-size: 1.9rem; }
    .content-container h2 { font-size: 1.4rem; }
    .content-container table { display: block; overflow-x: auto; white-space: nowrap; }
    .author-card { flex-direction: column; text-align: center; padding: 25px; gap: 15px; }
    .live-ticker-wrap { height: auto; flex-direction: column; padding: 10px 0; }
    .ticker-header { height: 30px; margin-bottom: 5px; border-radius: 4px; }
}