:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2c2c2c;
    --background-color: #121212;
    --chart-background: #1e1e1e;
    --text-color: #e0e0e0;
    --text-color-secondary: #9e9e9e;
    --border-color: #333333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.search-section {
    position: relative;
    margin-bottom: 30px;
}

#cryptoSearch {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.suggestion-item:hover {
    background-color: var(--primary-color);
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-box {
    background: var(--chart-background);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    height: 400px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.chart-box canvas {
    width: 100% !important;
    height: 100% !important;
}

.indicators-container {
    background: var(--chart-background);
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
    border: 1px solid var(--border-color);
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.indicator {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
}

.gauge, .sentiment-meter, .volume-bars {
    height: 150px;
    margin: 15px auto;
}

.orderbook-pressure {
    width: 100%;
    height: 40px;
    background: #f0f0f0;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

.pressure-bar {
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, #2ecc71, #e74c3c);
    transition: width 0.3s ease;
}

.pressure-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #2c3e50;
    font-weight: bold;
    text-shadow: 0 0 2px white;
}

#orderbookChart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
}

.real-time-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.price-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.current-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
}

.price-change {
    font-size: 16px;
    margin-top: 5px;
}

.price-change.positive {
    color: #2ecc71;
}

.price-change.negative {
    color: #e74c3c;
}

.pressure-meter {
    height: 40px;
    background: #f0f0f0;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.pressure-meter::before {
    content: '';
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, #e74c3c 0%, #f1c40f 50%, #2ecc71 100%);
    transition: width 0.3s ease;
}

.sentiment-display {
    font-size: 20px;
    font-weight: bold;
    margin: 15px 0;
}

.sentiment-display.positive {
    color: #2ecc71;
}

.sentiment-display.negative {
    color: #e74c3c;
}

.update-time {
    font-size: 12px;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s, color 0.3s;
}

.update-time.high-pressure {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.update-time.medium-pressure {
    background-color: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.update-time.low-pressure {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.volume-display {
    font-size: 20px;
    font-weight: bold;
    margin: 15px 0;
}

.pressure-container {
    width: 100%;
    margin: 20px 0;
    padding: 10px;
    background: var(--chart-background);
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.pressure-title {
    text-align: center;
    margin-bottom: 10px;
}

.pressure-bar-container {
    position: relative;
    width: 100%;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 20px;
    overflow: hidden;
}

.pressure-level-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.level-line {
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.pressure-fill {
    position: absolute;
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, #e74c3c 0%, #f1c40f 50%, #2ecc71 100%);
    transition: width 0.3s ease;
}

.pressure-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    padding: 0 10px;
    font-size: 12px;
    color: var(--text-color-secondary);
}

.pressure-semaforo {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.light {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #333;
    transition: all 0.3s ease;
}

.light.red.active {
    background-color: #e74c3c;
    box-shadow: 0 0 15px #e74c3c;
}

.light.yellow.active {
    background-color: #f1c40f;
    box-shadow: 0 0 15px #f1c40f;
}

.light.green.active {
    background-color: #2ecc71;
    box-shadow: 0 0 15px #2ecc71;
}

.main-title {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

/* Ensure Chart.js renders correctly in dark mode */
canvas {
    filter: brightness(0.8) contrast(1.2);
}