/* Signals Page Specific Styles */

/* Signals Header */
.signals-header {
    text-align: center;
    margin: 100px 0 50px 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Thêm hiệu ứng nhẹ cho header */
.signals-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--wave-trough), var(--wave-peak), var(--wave-trough), transparent);
    opacity: 0.5;
}

.signals-title {
    font-size: 3em;
    background: linear-gradient(to right, var(--wave-trough), var(--wave-peak));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.signals-subtitle {
    font-size: 1.5em;
    color: var(--text-glow);
    margin-bottom: 25px;
    font-weight: 300;
    position: relative;
    z-index: 2;
}

.signals-badge {
    display: inline-block;
    background: linear-gradient(to right, var(--wave-trough), var(--wave-mid));
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
    animation: badgePulse 3s infinite alternate;
}

@keyframes badgePulse {
    0% {
        box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
    }
    100% {
        box-shadow: 0 5px 25px rgba(0, 212, 255, 0.6);
    }
}

/* Chart Section */
.chart-section {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    color: var(--wave-mid);
    font-size: 1.6em;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.chart-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.timeframe-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-glow);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.control-btn.active {
    background: var(--wave-trough);
    color: white;
    border-color: var(--wave-trough);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.chart-legend {
    display: flex;
    gap: 15px;
    margin-left: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: var(--text-glow);
}

.legend-item.peak i {
    color: var(--wave-peak);
}

.legend-item.dip i {
    color: var(--wave-trough);
}

.legend-item.transit i {
    color: #9c27b0;
}

/* ========== CHART STATS ROW ========== */
.chart-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 30, 40, 0.9));
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.chart-stats-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.1) 25%, 
        rgba(247, 147, 26, 0.1) 50%, 
        rgba(255, 46, 99, 0.1) 75%, 
        transparent 100%);
    animation: shimmer 8s infinite linear;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-width: 160px;
    position: relative;
    z-index: 2;
}

.stat-item:hover {
    transform: translateY(-3px);
    border-color: var(--wave-trough);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.stat-item:nth-child(1) {
    border-left: 3px solid var(--wave-peak);
}
.stat-item:nth-child(1):hover { box-shadow: 0 5px 15px rgba(255, 46, 99, 0.3); }
.stat-item:nth-child(2) {
    border-left: 3px solid var(--wave-trough);
}
.stat-item:nth-child(2):hover { box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3); }
.stat-item:nth-child(3) {
    border-left: 3px solid #f7931a;
}
.stat-item:nth-child(3):hover { box-shadow: 0 5px 15px rgba(247, 147, 26, 0.3); }
.stat-item.noise-accuracy {
    border-left: 3px solid #9c27b0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(156, 39, 176, 0.2));
}
.stat-item.noise-accuracy:hover { box-shadow: 0 5px 15px rgba(156, 39, 176, 0.4); }

.stat-icon-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    background: rgba(255, 255, 255, 0.1);
}

.stat-item:nth-child(1) .stat-icon-mini { color: var(--wave-peak); background: rgba(255, 46, 99, 0.2); }
.stat-item:nth-child(2) .stat-icon-mini { color: var(--wave-trough); background: rgba(0, 212, 255, 0.2); }
.stat-item:nth-child(3) .stat-icon-mini { color: #f7931a; background: rgba(247, 147, 26, 0.2); }
.stat-item.noise-accuracy .stat-icon-mini { color: #9c27b0; background: rgba(156, 39, 176, 0.2); animation: pulsePurple 2s infinite; }

@keyframes pulsePurple {
    0%, 100% { box-shadow: 0 0 5px rgba(156, 39, 176, 0.5); }
    50% { box-shadow: 0 0 15px rgba(156, 39, 176, 0.8); }
}

.stat-content-mini { display: flex; flex-direction: column; }
.stat-label-mini { font-size: 0.8em; color: var(--text-glow); opacity: 0.9; letter-spacing: 0.3px; }
.stat-value-mini { font-size: 1.4em; font-weight: bold; line-height: 1.2; }
.stat-item:nth-child(1) .stat-value-mini { color: var(--wave-peak); }
.stat-item:nth-child(2) .stat-value-mini { color: var(--wave-trough); }
.stat-item:nth-child(3) .stat-value-mini { color: #f7931a; }
.stat-item.noise-accuracy .stat-value-mini { color: #9c27b0; font-size: 1.5em; text-shadow: 0 0 10px rgba(156, 39, 176, 0.5); }

/* Responsive cho stats row */
@media (max-width: 992px) {
    .chart-stats-row { flex-wrap: wrap; gap: 10px; padding: 12px; }
    .stat-item { flex: 1 1 calc(50% - 10px); min-width: 140px; }
}
@media (max-width: 576px) {
    .chart-stats-row { flex-direction: column; align-items: stretch; }
    .stat-item { width: 100%; }
    .stat-value-mini { font-size: 1.3em; }
    .stat-item.noise-accuracy .stat-value-mini { font-size: 1.4em; }
}
.stat-item { animation: fadeInUp 0.5s ease forwards; opacity: 0; }
.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chart Container */
.chart-container {
    width: 100%;
    height: 400px;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== ZOOM CONTROLS BOTTOM CONTAINER ===== */
.zoom-bottom-container {
    background: linear-gradient(to bottom, rgba(0, 30, 40, 0.9), rgba(0, 0, 0, 0.8));
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 15px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.zoom-bottom-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.1) 25%, 
        rgba(247, 147, 26, 0.1) 50%, 
        rgba(255, 46, 99, 0.1) 75%, 
        transparent 100%);
    animation: shimmer 8s infinite linear;
    pointer-events: none;
}

.zoom-controls-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.zoom-controls-group .zoom-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-glow);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1em;
}

.zoom-controls-group .zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: var(--wave-trough);
}

.zoom-controls-group .zoom-btn.active {
    background: linear-gradient(135deg, var(--wave-trough), var(--wave-mid));
    color: white;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.timeline-controls {
    flex: 2;
    min-width: 280px;
}

.timeline-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    outline: none;
    margin: 8px 0;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--wave-trough);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.7);
    border: 2px solid white;
    transition: transform 0.1s ease;
}

.timeline-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--wave-trough);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.7);
    border: 2px solid white;
    transition: transform 0.1s ease;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: var(--text-glow);
    font-size: 0.85em;
}

.reset-btn-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

#resetViewBtn {
    background: linear-gradient(135deg, #ff2e63, #f7931a);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    box-shadow: 0 5px 15px rgba(255, 46, 99, 0.3);
}

#resetViewBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 46, 99, 0.5);
}

.zoom-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 212, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--wave-trough);
    font-weight: 600;
    font-size: 0.9em;
    border: 1px solid rgba(0, 212, 255, 0.3);
    white-space: nowrap;
}

.zoom-info i { font-size: 1em; }

/* Range slider */
.range-slider-container {
    flex: 2;
    min-width: 280px;
}
.range-slider {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    cursor: pointer;
    touch-action: none;
    margin: 10px 0;
}
.range-fill {
    position: absolute;
    height: 100%;
    background: linear-gradient(to right, var(--wave-trough), var(--wave-mid));
    border-radius: 4px;
    pointer-events: none;
}
.range-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--wave-trough);
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    transition: all 0.2s ease;
    z-index: 10;
}
.range-handle:hover { transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 25px rgba(0, 212, 255, 0.9); }
.range-handle:active { cursor: grabbing; }
.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: var(--text-glow);
    font-size: 0.85em;
}

/* Pan Mode */
#panModeBtn.active {
    background: linear-gradient(135deg, var(--wave-trough), var(--wave-mid));
    color: white;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    animation: panPulse 2s infinite;
}
@keyframes panPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 212, 255, 0.5); }
    50% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.8); }
}
#panModeBtn.active i { animation: handWave 2s infinite; }
@keyframes handWave {
    0%,100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}
#bitcoinChart.pan-active { cursor: grab; }
#bitcoinChart.pan-active:active { cursor: grabbing; }
body.panning { user-select: none; -webkit-user-select: none; }

/* Chart info */
.chart-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    border-left: 3px solid var(--wave-mid);
}
.info-item i { color: var(--wave-mid); font-size: 1.2em; margin-top: 2px; }
.info-item p { color: var(--text-glow); font-size: 0.95em; line-height: 1.5; margin: 0; flex: 1; }

/* Signals Log Section */
.signals-log-section {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.log-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.filter-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-glow);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover { background: rgba(255, 255, 255, 0.2); }
.filter-btn.active { background: var(--wave-trough); color: white; border-color: var(--wave-trough); }

.search-box {
    position: relative;
    min-width: 250px;
}
.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-glow);
    opacity: 0.7;
}
.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.95em;
}
.search-box input:focus { outline: none; border-color: var(--wave-trough); box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1); }

/* Log container scroll */
.log-container {
    position: relative;
    overflow-x: auto;
    margin-bottom: 25px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--wave-trough) rgba(0, 0, 0, 0.3);
    cursor: grab;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
}
.log-container:active { cursor: grabbing; }
.log-container::-webkit-scrollbar { height: 8px; }
.log-container::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); border-radius: 4px; }
.log-container::-webkit-scrollbar-thumb { background: var(--wave-trough); border-radius: 4px; }
.log-container::-webkit-scrollbar-thumb:hover { background: var(--wave-mid); }

/* Mobile scroll hint */
.mobile-scroll-hint {
    display: none;
    text-align: center;
    color: var(--wave-trough);
    font-size: 0.9em;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    animation: pulseHint 2s infinite;
}
.mobile-scroll-hint i { margin-right: 8px; animation: swing 2s infinite; }
@keyframes swing {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
@media (max-width: 768px) {
    .log-container { max-width: 100vw; margin-left: -20px; margin-right: -20px; padding: 10px 20px; border-radius: 0; }
    .mobile-scroll-hint { display: block; }
    .signals-table { min-width: 1000px; }
}
@keyframes pulseHint { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }
.hint-sub { font-size: 0.8em; opacity: 0.8; margin-top: 4px; }

/* Signals Table */
.signals-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    min-width: 900px;
    margin: 0;
}
.signals-table tbody tr, .signals-table td, .signals-table th { cursor: pointer; user-select: none; }
.signals-table tbody tr:active { cursor: grabbing; }
.signals-table tbody tr:hover { background: rgba(0, 212, 255, 0.05); }
.signals-table tbody tr.signal-peak:hover { background: rgba(255, 46, 99, 0.05); }
.signals-table tbody tr.signal-dip:hover { background: rgba(0, 212, 255, 0.05); }
.signals-table tbody tr.signal-transit:hover { background: rgba(156, 39, 176, 0.05); }
.signals-table tbody tr.selected { background: rgba(247, 147, 26, 0.1); border-left: 3px solid var(--wave-mid); }
.signals-table td { padding: 16px 15px; color: var(--text-glow); font-size: 0.95em; vertical-align: middle; }

/* Signal Type Badges */
.signal-type {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.signal-type.peak { background: rgba(255, 46, 99, 0.1); color: var(--wave-peak); border: 1px solid rgba(255, 46, 99, 0.3); }
.signal-type.dip { background: rgba(0, 212, 255, 0.1); color: var(--wave-trough); border: 1px solid rgba(0, 212, 255, 0.3); }
.signal-type.transit { background: rgba(156, 39, 176, 0.1); color: #9c27b0; border: 1px solid rgba(156, 39, 176, 0.3); }

/* Confidence Indicator */
.confidence-indicator {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
}
.confidence-high { background: rgba(76, 175, 80, 0.1); color: #4CAF50; border: 1px solid rgba(76, 175, 80, 0.3); }
.confidence-medium { background: rgba(255, 193, 7, 0.1); color: #FFC107; border: 1px solid rgba(255, 193, 7, 0.3); }
.confidence-low { background: rgba(244, 67, 54, 0.1); color: #F44336; border: 1px solid rgba(244, 67, 54, 0.3); }

/* Validation Status */
.validation-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
}
.validation-validated { background: rgba(76, 175, 80, 0.1); color: #4CAF50; border: 1px solid rgba(76, 175, 80, 0.3); }
.validation-pending { background: rgba(255, 193, 7, 0.1); color: #FFC107; border: 1px solid rgba(255, 193, 7, 0.3); }
.validation-invalid { background: rgba(244, 67, 54, 0.1); color: #F44336; border: 1px solid rgba(244, 67, 54, 0.3); }

/* Loading Row */
.loading-row td { text-align: center; padding: 50px 20px; }
.loading-spinner { display: flex; align-items: center; justify-content: center; gap: 15px; color: var(--wave-mid); font-size: 1.1em; }
.loading-spinner i { font-size: 1.3em; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 30px;
}
.page-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-glow);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.page-info { color: var(--text-glow); font-size: 0.95em; min-width: 100px; text-align: center; }
.page-info span { color: var(--wave-mid); font-weight: bold; }

/* Data Source Info */
.data-source-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.data-source-info i { color: var(--wave-mid); font-size: 1.5em; }
.data-source-info p { color: var(--text-glow); font-size: 0.95em; flex: 1; margin: 0; }
.data-source-info code { background: rgba(0, 0, 0, 0.5); padding: 2px 8px; border-radius: 4px; color: var(--wave-trough); font-family: 'Courier New', monospace; }
.refresh-btn {
    background: linear-gradient(to right, var(--wave-trough), var(--wave-mid));
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.refresh-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3); }

/* Signal Details Panel */
.details-section {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.details-section h2 {
    color: var(--wave-mid);
    margin-bottom: 25px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 15px;
}
.details-container {
    min-height: 200px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 30px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}
.no-selection { text-align: center; color: var(--text-glow); opacity: 0.7; }
.no-selection i { font-size: 3em; color: var(--wave-mid); margin-bottom: 20px; opacity: 0.5; }
.no-selection h3 { color: var(--text-light); margin-bottom: 10px; font-size: 1.5em; }
.no-selection p { font-size: 1em; line-height: 1.6; max-width: 500px; margin: 0 auto; }

/* Analysis Section */
.analysis-section {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.analysis-section h2 {
    color: var(--wave-mid);
    margin-bottom: 25px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 15px;
}
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}
.analysis-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.analysis-card h3 {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.chart-small { height: 180px; margin-bottom: 20px; }
.analysis-stats { display: flex; flex-direction: column; gap: 12px; }
.analysis-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.analysis-stat:last-child { border-bottom: none; }
.stat-label { color: var(--text-glow); font-size: 0.95em; }
.stat-value { color: var(--text-light); font-weight: bold; font-size: 1.1em; }

/* CSV Info Section */
.csv-info-section {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.csv-info-section h2 {
    color: var(--wave-mid);
    margin-bottom: 25px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 15px;
}
.csv-format {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.format-example, .format-details {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.format-example h3, .format-details h3 {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.format-example pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0;
}
.format-example code {
    color: var(--wave-trough);
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
}
.format-details ul {
    color: var(--text-glow);
    padding-left: 20px;
}
.format-details li {
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 0.95em;
}
.format-details strong { color: var(--wave-trough); }
.csv-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}
.csv-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(to right, var(--wave-trough), var(--wave-mid));
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.csv-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3); }
.update-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    color: var(--text-glow);
    font-size: 0.9em;
    border-left: 3px solid var(--wave-mid);
}
.update-info i { color: var(--wave-mid); font-size: 1.2em; }

/* Back Home Button */
.back-home { text-align: center; margin: 50px 0; }
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(to right, var(--wave-mid), var(--wave-peak));
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.back-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); gap: 15px; }

/* Click-to-zoom instructions */
.click-zoom-instructions {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--wave-trough);
    border-radius: 12px;
    padding: 20px;
    max-width: 320px;
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.5s ease;
}
.instructions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.instructions-header i { color: var(--wave-trough); font-size: 1.2em; text-shadow: 0 0 10px rgba(0,212,255,0.5); }
.instructions-header span { flex: 1; font-weight: bold; color: white; font-size: 1.1em; letter-spacing: 0.5px; }
.close-instructions {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.close-instructions:hover { color: white; background: rgba(255,255,255,0.1); transform: rotate(90deg); }
.instructions-body { margin-bottom: 15px; }
.instructions-body p {
    color: rgba(255,255,255,0.9);
    margin: 10px 0;
    font-size: 0.95em;
    line-height: 1.5;
}
.instructions-body p i { color: var(--wave-trough); margin-right: 6px; }
.instruction-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9em;
    text-align: center;
    font-weight: 500;
    animation: statusPulse 2s infinite;
}
.status-waiting { background: rgba(255,193,7,0.15); border: 1px solid #ffc107; color: #ffc107; box-shadow: 0 0 10px rgba(255,193,7,0.2); }
.status-success { background: rgba(40,167,69,0.15); border: 1px solid #28a745; color: #28a745; box-shadow: 0 0 10px rgba(40,167,69,0.2); }
.status-error { background: rgba(220,53,69,0.15); border: 1px solid #dc3545; color: #dc3545; box-shadow: 0 0 10px rgba(220,53,69,0.2); }
.status-info { background: rgba(23,162,184,0.15); border: 1px solid #17a2b8; color: #17a2b8; box-shadow: 0 0 10px rgba(23,162,184,0.2); }
@keyframes statusPulse { 0% { opacity: 0.8; } 50% { opacity: 1; } 100% { opacity: 0.8; } }
.instructions-footer {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.reset-zoom-btn, .exit-zoom-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}
.reset-zoom-btn { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); }
.reset-zoom-btn:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.reset-zoom-btn i { color: var(--wave-trough); }
.exit-zoom-btn { background: var(--wave-trough); color: white; border: 1px solid var(--wave-trough); box-shadow: 0 0 10px rgba(0,212,255,0.3); }
.exit-zoom-btn:hover { background: var(--wave-mid); border-color: var(--wave-mid); transform: translateY(-2px); box-shadow: 0 0 15px rgba(0,212,255,0.5); }

/* Click Markers */
.click-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.8) 20%, rgba(255,255,255,0.8) 80%, transparent 100%);
    pointer-events: none;
    z-index: 100;
    animation: markerAppear 0.5s ease;
}
.click-marker span {
    position: absolute;
    top: 20px;
    left: -12px;
    background: var(--wave-trough);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 2px solid white;
    animation: markerBounce 0.5s ease;
}
.marker-2 span { background: #ff2e63; box-shadow: 0 0 15px rgba(255,46,99,0.5); }
@keyframes markerAppear { 0% { opacity: 0; transform: scaleY(0); } 100% { opacity: 1; transform: scaleY(1); } }
@keyframes markerBounce { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* Chart Flash */
.chart-flash { animation: chartFlash 0.5s ease; }
@keyframes chartFlash {
    0% { box-shadow: 0 0 0 0 rgba(0,212,255,0); }
    20% { box-shadow: 0 0 30px 15px rgba(0,212,255,0.7); }
    40% { box-shadow: 0 0 50px 25px rgba(0,212,255,0.5); }
    60% { box-shadow: 0 0 30px 15px rgba(0,212,255,0.3); }
    100% { box-shadow: 0 0 0 0 rgba(0,212,255,0); }
}

/* Mobile slider improvements */
@media (max-width: 768px) {
    .timeline-controls { padding: 15px 0; margin: 10px 0; }
    .timeline-slider { height: 12px !important; margin: 20px 0 !important; }
    .timeline-slider::-webkit-slider-thumb { width: 32px !important; height: 32px !important; background: var(--wave-trough) !important; border: 3px solid white !important; box-shadow: 0 0 20px rgba(0,212,255,0.8) !important; }
    .timeline-slider::-moz-range-thumb { width: 32px !important; height: 32px !important; background: var(--wave-trough) !important; border: 3px solid white !important; box-shadow: 0 0 20px rgba(0,212,255,0.8) !important; }
    .timeline-labels { font-size: 0.95em; margin-top: 12px; font-weight: 500; }
    .range-handle { width: 28px !important; height: 28px !important; border-width: 3px !important; box-shadow: 0 0 20px rgba(0,212,255,0.8) !important; }
    .range-handle.active { transform: translate(-50%, -50%) scale(1.2) !important; background: var(--wave-trough) !important; }
    .slider-feedback { bottom: 20px; padding: 15px 30px; font-size: 1.2em; border-radius: 40px; background: rgba(0,0,0,0.95); border: 2px solid var(--wave-trough); }
}
@media (max-width: 480px) {
    .timeline-slider::-webkit-slider-thumb { width: 36px !important; height: 36px !important; }
    .timeline-slider::-moz-range-thumb { width: 36px !important; height: 36px !important; }
    .range-handle { width: 32px !important; height: 32px !important; }
    .slider-feedback { bottom: 15px; padding: 12px 24px; font-size: 1em; }
}
.mobile-slider-hint { display: none; text-align: center; color: var(--wave-trough); font-size: 0.9em; margin: 10px 0; padding: 8px; background: rgba(0,212,255,0.1); border-radius: 20px; animation: hintPulse 2s infinite; }
@keyframes hintPulse { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }
@media (max-width: 768px) { .mobile-slider-hint { display: block; } }
body.slider-active { overflow: hidden; position: fixed; width: 100%; height: 100%; touch-action: none; }
.timeline-slider { touch-action: none; -webkit-tap-highlight-color: transparent; padding: 10px 0; margin: 15px 0; height: 8px; }
.timeline-slider::-webkit-slider-thumb { width: 28px !important; height: 28px !important; border: 3px solid white !important; }
.timeline-slider::-moz-range-thumb { width: 28px !important; height: 28px !important; border: 3px solid white !important; }
.slider-feedback {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(0,0,0,0.9); color: white; padding: 12px 24px; border-radius: 30px; font-size: 1.1em; font-weight: bold; border: 1px solid var(--wave-trough); box-shadow: 0 5px 20px rgba(0,0,0,0.5); z-index: 10000; opacity: 0; transition: all 0.3s ease; pointer-events: none; backdrop-filter: blur(10px); display: flex; align-items: center; gap: 10px;
}
.slider-feedback.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.slider-feedback i { color: var(--wave-trough); font-size: 1.2em; }

/* Pan feedback */
.pan-feedback {
    background: linear-gradient(135deg, var(--wave-trough), var(--wave-mid));
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(0,212,255,0.5);
    border: 2px solid white;
}

/* Selection rectangle */
.selection-rectangle {
    position: absolute;
    border: 2px dashed var(--wave-trough);
    background: rgba(0,212,255,0.1);
    pointer-events: none;
    z-index: 100;
}

/* Responsive general */
@media (max-width: 768px) {
    .signals-header { padding: 30px 20px; margin: 80px 0 30px 0; }
    .signals-title { font-size: 2.2em; }
    .signals-subtitle { font-size: 1.2em; }
    .signals-badge { font-size: 1em; padding: 10px 20px; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .chart-controls { width: 100%; }
    .chart-container { height: 300px; padding: 15px; }
    .log-controls { flex-direction: column; align-items: stretch; }
    .search-box { width: 100%; }
    .signals-table { font-size: 0.9em; }
    .signals-table th, .signals-table td { padding: 12px 10px; }
    .data-source-info { flex-direction: column; text-align: center; }
    .csv-format { grid-template-columns: 1fr; }
    .csv-actions { flex-direction: column; align-items: stretch; }
    .csv-btn { justify-content: center; }
    .click-zoom-instructions { width: 240px; top: 5px; right: 5px; padding: 12px; }
    .instructions-header span { font-size: 1em; }
    .instructions-body p { font-size: 0.85em; margin: 8px 0; }
    .instruction-status { font-size: 0.85em; padding: 8px; }
    .reset-zoom-btn, .exit-zoom-btn { padding: 8px; font-size: 0.85em; }
    .click-marker span { width: 22px; height: 22px; font-size: 0.8em; left: -10px; }
}
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Validation PASS style */
.validation-pass {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: glowGreen 2s infinite;
}

@keyframes glowGreen {
    0%, 100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 0 12px rgba(76, 175, 80, 0.7); }
}

/* Điều chỉnh colspan cho no-results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.7);
}

.no-results i {
    font-size: 2.5em;
    color: #00d4ff;
    margin-bottom: 15px;
    display: block;
}

.no-results div {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.no-results small {
    color: rgba(255,255,255,0.5);
}

.error-message {
    color: #ff2e63;
}