/* --- Базовые сбросы и шрифты --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #2c3e50;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Кнопки --- */
.btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #00b4d8;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 180, 216, 0.3);
}

.btn-primary:hover {
    background-color: #0077b6;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background-color: #e0f2fe;
    color: #0369a1;
}

.btn-secondary:hover {
    background-color: #bae6fd;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, #03045e 0%, #0077b6 100%);
    color: #ffffff;
    text-align: center;
    padding: 40px 0;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto 24px auto;
}

/* --- Блок интерактивной статистики --- */
.stats-section {
    margin-top: -20px;
    padding-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.stat-card h3 {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.stat-card p {
    font-size: 13px;
    color: #475569;
    margin-top: 10px;
}

/* Круговая диаграмма на чистом CSS */
.chart-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#00b4d8 calc(var(--percent) * 1%), #e2e8f0 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chart-circle::before {
    content: "";
    position: absolute;
    width: 66px;
    height: 66px;
    background-color: #ffffff;
    border-radius: 50%;
}

.chart-value {
    position: relative;
    font-weight: 700;
    font-size: 15px;
    color: #03045e;
}

/* Полоса волатильности */
.volatility-bar {
    width: 100%;
    height: 12px;
    background-color: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin: 20px 0;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00b4d8, #0077b6);
    border-radius: 6px;
}

/* Живой счетчик */
.live-counter {
    font-size: 20px;
    font-weight: 700;
    color: #03045e;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* --- АВТОМАТИЧЕСКИЕ СТИЛИ ДЛЯ КОНТЕНТА --- */
.main-content {
    padding: 30px 0;
}

.content-area {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

/* Каскадные правила для контента без ручных классов */
.content-area h1 {
    font-size: 26px;
    color: #03045e;
    margin-bottom: 16px;
    font-weight: 700;
}

.content-area h2 {
    font-size: 20px;
    color: #03045e;
    margin: 28px 0 14px 0;
    font-weight: 700;
}

.content-area h3 {
    font-size: 17px;
    color: #0077b6;
    margin: 24px 0 12px 0;
    font-weight: 700;
}

.content-area p {
    font-size: 15px;
    color: #334155;
    margin-bottom: 16px;
    line-height: 1.6;
}

.content-area ul, .content-area ol {
    margin: 0 0 20px 20px;
}

.content-area li {
    font-size: 15px;
    color: #334155;
    margin-bottom: 8px;
}

/* Авто-стили таблиц */
.content-area table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.content-area th {
    background-color: #f1f5f9;
    color: #03045e;
    font-weight: 600;
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.content-area td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.content-area tr:last-child td {
    border-bottom: none;
}

.content-cta-wrapper {
    text-align: center;
    margin-top: 30px;
}

/* --- Блок автора --- */
.author-section {
    padding-bottom: 40px;
}

.author-box {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e2e8f0;
}

.author-info h4 {
    font-size: 16px;
    color: #03045e;
    margin-bottom: 6px;
    font-weight: 700;
}

.author-info p {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

/* --- Футер --- */
.main-footer {
    background-color: #03045e;
    color: #94a3b8;
    padding: 24px 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.7;
}

.main-footer .container {
    max-width: 700px;
}

/* --- Мобильная адаптивность (App-like view) --- */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        flex-direction: row;
        text-align: left;
        padding: 16px;
        justify-content: flex-start;
        gap: 16px;
    }

    .stat-card h3 {
        margin-bottom: 4px;
    }

    .stat-card p {
        margin-top: 2px;
    }

    .volatility-bar {
        margin: 6px 0;
        width: 120px;
    }

    .chart-circle {
        width: 50px;
        height: 50px;
    }

    .chart-circle::before {
        width: 40px;
        height: 40px;
    }

    .chart-value {
        font-size: 11px;
    }

    .live-counter {
        margin-bottom: 0;
        font-size: 16px;
    }

    .stat-card .btn {
        margin-left: auto;
        padding: 8px 16px;
        font-size: 13px;
    }

    .content-area {
        padding: 20px;
    }

    .content-area h1 { font-size: 22px; }
    .content-area h2 { font-size: 18px; }
    
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}