/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: #ffffff;
}

.loading-logo {
    position: relative;
    margin-bottom: 30px;
}

.hft-icon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #00d4ff;
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

.pulse-ring.delay-1 {
    animation-delay: 0.3s;
}

.pulse-ring.delay-2 {
    animation-delay: 0.6s;
}

.core-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    z-index: 1;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.loading-text {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto 20px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    border-radius: 2px;
    animation: loading 3s ease-in-out infinite;
}

@keyframes loading {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

.loading-subtitle {
    font-size: 1.1rem;
    color: #cccccc;
    font-weight: 300;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #cccccc;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
    color: #00d4ff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-text {
    color: #00d4ff;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-balance {
    text-align: right;
}

.balance-label {
    display: block;
    font-size: 0.8rem;
    color: #888888;
}

.balance-amount {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #00ff88;
    font-family: 'JetBrains Mono', monospace;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #333333, #555555);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.emergency-stop {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.emergency-stop:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: #ffffff;
    transition: 0.3s;
    border-radius: 2px;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Dashboard Section */
.dashboard-section {
    padding: 40px 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 212, 255, 0.3);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #cccccc;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
}

.stat-change.positive {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
}

.stat-change.negative {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
}

/* Trading Interface */
.trading-interface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    margin-bottom: 40px;
}

.market-panel,
.orderflow-panel {
    grid-column: span 1;
}

.strategy-monitor {
    grid-column: span 2;
}

.market-panel,
.orderflow-panel,
.strategy-monitor {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
}

.panel-controls {
    display: flex;
    gap: 8px;
}

.control-btn,
.flow-btn,
.monitor-btn,
.chart-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cccccc;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover,
.flow-btn:hover,
.monitor-btn:hover,
.chart-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
    color: #00d4ff;
}

.control-btn.active,
.flow-btn.active,
.chart-btn.active {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-color: #00d4ff;
    color: #ffffff;
}

.monitor-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Price Ticker */
.price-ticker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.ticker-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticker-item .symbol {
    font-size: 0.9rem;
    color: #cccccc;
    font-weight: 500;
}

.ticker-item .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
}

.ticker-item .change {
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.ticker-item .change.positive {
    color: #00ff88;
}

.ticker-item .change.negative {
    color: #ff4757;
}

/* Chart Container */
.chart-container,
.chart-wrapper {
    height: 300px;
    position: relative;
}

.chart-container canvas,
.chart-wrapper canvas {
    border-radius: 8px;
}

/* Order Flow */
.flow-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.metric-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: #cccccc;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.metric-value.positive {
    color: #00ff88;
}

.metric-value.negative {
    color: #ff4757;
}

.flow-visualization {
    height: 200px;
}

/* Strategy Monitor */
.strategy-list {
    display: grid;
    gap: 15px;
}

.strategy-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.strategy-item:hover {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.05);
}

.strategy-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00ff88;
}

.strategy-status.paused {
    background: #ffa502;
}

.strategy-status.stopped {
    background: #ff4757;
}

.strategy-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 5px;
}

.strategy-info p {
    font-size: 0.85rem;
    color: #cccccc;
}

.strategy-metrics {
    display: flex;
    gap: 20px;
}

.strategy-metric {
    text-align: center;
}

.strategy-metric .metric-label {
    font-size: 0.75rem;
    color: #888888;
    margin-bottom: 4px;
}

.strategy-metric .metric-value {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.strategy-actions {
    display: flex;
    gap: 8px;
}

.strategy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cccccc;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.strategy-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
    color: #00d4ff;
}

/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.2rem;
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Strategies Section */
.strategies-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
}

.strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.strategy-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 212, 255, 0.3);
}

.strategy-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
}

.strategy-card p {
    color: #cccccc;
    margin-bottom: 20px;
    line-height: 1.6;
}

.strategy-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.strategy-stat {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.strategy-stat .stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00d4ff;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 5px;
}

.strategy-stat .stat-label {
    font-size: 0.8rem;
    color: #888888;
}

/* Strategy Builder */
.strategy-builder {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-top: 40px;
}

.builder-header {
    text-align: center;
    margin-bottom: 30px;
}

.builder-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.builder-header p {
    color: #cccccc;
}

.builder-interface {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    height: 600px;
}

.builder-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
}

.component-library h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.component-category {
    margin-bottom: 25px;
}

.component-category h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.component-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all 0.3s ease;
}

.component-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
}

.component-item:active {
    cursor: grabbing;
}

.component-item i {
    color: #00d4ff;
    font-size: 14px;
}

.component-item span {
    font-size: 0.85rem;
    color: #cccccc;
}

.builder-canvas {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.canvas-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

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

.canvas-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cccccc;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.canvas-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
    color: #00d4ff;
}

.strategy-canvas {
    flex: 1;
    padding: 20px;
    position: relative;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Performance Section */
.performance-section {
    padding: 80px 0;
}

.performance-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.performance-chart {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

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

.chart-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
}

.performance-metrics {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.performance-metrics h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.metrics-grid {
    display: grid;
    gap: 15px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.05);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.metric-name {
    font-size: 0.9rem;
    color: #cccccc;
    font-weight: 500;
}

.metric-header i {
    color: #00d4ff;
    font-size: 16px;
}

.metric-card .metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 5px;
}

.metric-period {
    font-size: 0.8rem;
    color: #888888;
}

/* Performance Details */
.performance-details {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.details-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #cccccc;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #ffffff;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Trades Table */
.trades-table {
    overflow-x: auto;
}

#tradesTable {
    width: 100%;
    border-collapse: collapse;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

#tradesTable th,
#tradesTable td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#tradesTable th {
    background: rgba(255, 255, 255, 0.05);
    color: #cccccc;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

#tradesTable td {
    color: #ffffff;
}

#tradesTable tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Risk Section */
.risk-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
}

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

.risk-overview,
.risk-controls {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.risk-overview h3,
.risk-controls h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 25px;
}

/* Risk Gauge */
.risk-gauge {
    text-align: center;
    margin-bottom: 30px;
}

.gauge-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ff88;
    font-family: 'JetBrains Mono', monospace;
}

.gauge-label {
    display: block;
    font-size: 0.9rem;
    color: #cccccc;
    margin-top: 5px;
}

/* Risk Limits */
.limits-grid {
    display: grid;
    gap: 20px;
}

.limit-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

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

.limit-name {
    font-size: 0.9rem;
    color: #cccccc;
    font-weight: 500;
}

.limit-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.limit-status.safe {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.limit-status.warning {
    background: rgba(255, 165, 2, 0.2);
    color: #ffa502;
}

.limit-status.danger {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

.limit-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.limit-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00d4ff);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.limit-fill.warning {
    background: linear-gradient(90deg, #ffa502, #ff6348);
}

.limit-fill.danger {
    background: linear-gradient(90deg, #ff4757, #ff3742);
}

.limit-values {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.limit-values .current {
    color: #ffffff;
    font-weight: 600;
}

.limit-values .max {
    color: #888888;
}

/* Risk Controls */
.controls-grid {
    display: grid;
    gap: 20px;
}

.control-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

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

.control-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.control-toggle {
    position: relative;
}

.control-toggle input[type="checkbox"] {
    display: none;
}

.toggle-label {
    display: block;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.control-toggle input[type="checkbox"]:checked + .toggle-label {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
}

.control-toggle input[type="checkbox"]:checked + .toggle-label::after {
    left: 27px;
}

.control-settings {
    display: grid;
    gap: 15px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.setting-item label {
    font-size: 0.85rem;
    color: #cccccc;
    font-weight: 500;
}

.setting-item input,
.setting-item select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    width: 120px;
}

.setting-item input:focus,
.setting-item select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

/* Analytics Section */
.analytics-section {
    padding: 80px 0;
}

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

.ml-insights,
.market-regime {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.ml-insights h3,
.market-regime h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 25px;
}

/* ML Model Cards */
.model-cards {
    display: grid;
    gap: 20px;
}

.model-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

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

.model-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.model-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.model-status.active {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.model-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.model-metrics .metric {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.model-metrics .metric-label {
    display: block;
    font-size: 0.75rem;
    color: #888888;
    margin-bottom: 4px;
}

.model-metrics .metric-value {
    font-size: 1rem;
    font-weight: 600;
    color: #00d4ff;
    font-family: 'JetBrains Mono', monospace;
}

.model-chart {
    height: 150px;
}

/* Sentiment Analysis */
.sentiment-gauge {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.sentiment-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.sentiment-score {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #00ff88;
    font-family: 'JetBrains Mono', monospace;
}

.sentiment-label {
    display: block;
    font-size: 0.8rem;
    color: #cccccc;
    margin-top: 5px;
}

.sentiment-sources {
    display: grid;
    gap: 10px;
}

.source-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.source-name {
    font-size: 0.85rem;
    color: #cccccc;
}

.source-score {
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.source-score.positive {
    color: #00ff88;
}

.source-score.negative {
    color: #ff4757;
}

/* Market Regime */
.regime-chart {
    height: 200px;
    margin-bottom: 20px;
}

.regime-info {
    display: grid;
    gap: 20px;
}

.current-regime h4,
.regime-probabilities h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.regime-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.regime-badge.trending {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
}

.regime-badge.reverting {
    background: rgba(255, 165, 2, 0.2);
    color: #ffa502;
}

.regime-badge.volatile {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

.current-regime p {
    font-size: 0.9rem;
    color: #cccccc;
    line-height: 1.5;
}

.probability-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.regime-name {
    font-size: 0.85rem;
    color: #cccccc;
}

.probability-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.probability-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.probability-value {
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* Settings Section */
.settings-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.settings-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.settings-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 25px;
}

.settings-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: #cccccc;
    font-weight: 500;
}

.form-group input,
.form-group select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-help {
    font-size: 0.8rem;
    color: #888888;
    font-style: italic;
}

.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-switch {
    position: relative;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-switch .toggle-label {
    display: block;
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-switch .toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-label {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-label::after {
    left: 33px;
}

.settings-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #cccccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
}

.footer-logo .logo-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 16px;
}

.footer-description {
    color: #cccccc;
    line-height: 1.6;
    max-width: 300px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #00d4ff;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright p {
    color: #888888;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00d4ff;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .trading-interface {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .market-panel,
    .orderflow-panel,
    .strategy-monitor {
        grid-column: span 1;
    }
    
    .performance-grid,
    .risk-dashboard,
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .builder-interface {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
    }
    
    .builder-sidebar {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        backdrop-filter: blur(20px);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .nav-actions {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .price-ticker {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 15px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .loading-text {
        font-size: 2rem;
    }
    
    .loading-bar {
        width: 250px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Utility Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-slide-in-down {
    animation: slideInDown 0.6s ease-out;
}

.animate-zoom-in {
    animation: zoomIn 0.6s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.text-gradient {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.neon-border {
    border: 1px solid #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.scrollbar-custom {
    scrollbar-width: thin;
    scrollbar-color: #00d4ff rgba(255, 255, 255, 0.1);
}

.scrollbar-custom::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-custom::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.scrollbar-custom::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 3px;
}

.scrollbar-custom::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0099cc, #007399);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #00d4ff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #00ff88;
}

.notification.warning {
    border-left-color: #ffa502;
}

.notification.error {
    border-left-color: #ff4757;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Print Styles */
@media print {
    .navbar,
    .nav-toggle,
    .emergency-stop,
    .footer {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .stat-card,
    .market-panel,
    .orderflow-panel,
    .strategy-monitor {
        background: white;
        border: 1px solid #ccc;
        color: black;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    body {
        background: #000000;
        color: #ffffff;
    }
    
    .stat-card,
    .market-panel,
    .orderflow-panel,
    .strategy-monitor {
        background: #111111;
        border: 2px solid #ffffff;
    }
    
    .nav-link:hover,
    .nav-link.active {
        color: #ffffff;
        background: #00d4ff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-progress,
    .pulse-ring,
    .status-indicator {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
.nav-link:focus,
.control-btn:focus,
.flow-btn:focus,
.monitor-btn:focus,
.chart-btn:focus,
.strategy-btn:focus,
.canvas-btn:focus,
.tab-btn:focus,
.btn:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;