:root {
    --bg-card: #1e1e1e;
    --bg-secondary: #2d2d2d;
    --bg-input: #0c0c0c;
    --text-color: #ffffff;
    --text-secondary: #b7b7b7;
    --border-color: #2d2d2d;
    --accent-primary: #f0b90b;
    --accent-secondary: #c99a0e;
    --error-color: #f6465d;
    --accent-color: #f0b90b;
    --success-color: #00c087;
}

body {
    background-color: #0c0c0c;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

/* УДАЛИЛ ВСЕ СТИЛИ ДЛЯ HEADER - они уже в style.css */

.logo a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: -0.5px;
    font-size: 1.8rem;
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.analysis-container {
    max-width: 1400px;
    margin: 100px auto 50px;
    padding: 0 20px;
}

.analysis-header {
    text-align: center;
    margin-bottom: 40px;
}

.analysis-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.analysis-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.controls {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid var(--border-color);
}

.control-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.control-group label {
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

select {
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-input);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b7b7b7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

select:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.2);
}

select option {
    background: var(--bg-input);
    color: var(--text-color);
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.chart-card h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.chart-container {
    height: 600px;
    position: relative;
}

.indicators-section {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.indicators-section h2 {
    color: var(--text-color);
    margin-bottom: 25px;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.indicator-item {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-primary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.indicator-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 185, 11, 0.1);
}

.indicator-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.indicator-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

.indicator-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 10px 0;
    line-height: 1.3;
}

.indicator-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 8px 0;
}

.indicator-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.signal-container {
    margin-top: auto;
    padding-top: 15px;
    min-height: 50px;
    display: flex;
    align-items: flex-end;
}

.indicator-signal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    width: fit-content;
}

.signal-bullish {
    background: rgba(240, 185, 11, 0.2);
    color: var(--accent-primary);
    border: 1px solid rgba(240, 185, 11, 0.3);
}

.signal-bearish {
    background: rgba(246, 70, 93, 0.2);
    color: var(--error-color);
    border: 1px solid rgba(246, 70, 93, 0.3);
}

.signal-neutral {
    background: rgba(183, 183, 183, 0.2);
    color: var(--text-secondary);
    border: 1px solid rgba(183, 183, 183, 0.3);
}

.price-positive {
    color: var(--accent-primary);
    font-weight: 600;
}

.price-negative {
    color: var(--error-color);
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.error {
    background: rgba(246, 70, 93, 0.1);
    color: var(--error-color);
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid var(--error-color);
}

.last-update {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 30px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.chart-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.chart-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.chart-btn:hover {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: #000;
    transform: translateY(-1px);
}

.chart-btn.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
    box-shadow: 0 2px 10px rgba(240, 185, 11, 0.3);
}

.sma-values {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 5px 0;
}

.indicator-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.stat-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    color: var(--text-color);
}

canvas {
    user-select: none;
}

/* Стили для кастомного перекрестья */
.chartjs-crosshair {
    pointer-events: none;
}

/* Убедитесь, что канвас имеет правильный курсор */
#priceChart {
    cursor: crosshair;
}

/* Адаптация для телефона */
@media (max-width: 768px) {
    .analysis-container {
        margin: 50px auto 30px;
        padding: 0 15px;
    }

    .logo a {
        font-size: 1.5rem;
    }

    .analysis-header h1 {
        font-size: 2rem;
    }

    .analysis-header p {
        font-size: 1rem;
    }

    /* УДАЛИЛ СТИЛИ ДЛЯ HEADER - они уже в style.css */

    .controls {
        padding: 20px;
        gap: 15px;
        justify-content: center;
    }

    .control-group {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .control-group label {
        text-align: center;
    }

    select {
        width: 100%;
        min-width: auto;
    }

    .chart-container {
        height: 400px;
    }

    .chart-card,
    .indicators-section {
        padding: 20px;
    }

    .chart-controls {
        justify-content: center;
    }

    .chart-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .indicators-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .indicator-item {
        padding: 15px;
    }

    .indicator-value {
        font-size: 1.5rem;
    }

    .indicator-name {
        font-size: 1rem;
    }

    .signal-container {
        min-height: 45px;
    }

    .indicator-signal {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .analysis-container {
        margin: 70px auto 20px;
        /* Еще меньше отступ для маленьких экранов */
    }

    .logo a {
        font-size: 1.3rem;
    }

    .analysis-header h1 {
        font-size: 1.8rem;
    }

    .chart-container {
        height: 350px;
    }

    .chart-card h2,
    .indicators-section h2 {
        font-size: 1.2rem;
    }

    .indicator-value {
        font-size: 1.3rem;
    }

    .controls {
        padding: 15px;
    }

    .last-update {
        font-size: 0.9rem;
        padding: 12px;
    }
}