/* 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;
    line-height: 1.6;
    color: #ffffff;
    background: #0a0b0f;
    overflow-x: hidden;
}

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

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

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    margin-bottom: 2rem;
}

.grid-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grid-lines {
    height: 12px;
    background: linear-gradient(90deg, #00d4ff 0%, #0099cc 100%);
    border-radius: 2px;
    animation: gridPulse 2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.2s);
}

.grid-lines:nth-child(1) { --i: 0; }
.grid-lines:nth-child(2) { --i: 1; }
.grid-lines:nth-child(3) { --i: 2; }
.grid-lines:nth-child(4) { --i: 3; }

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
}

.loading-text {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

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

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

.loading-subtitle {
    color: #8b949e;
    font-size: 1rem;
    font-weight: 400;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 11, 15, 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, 11, 15, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 2rem;
}

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

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #8b949e;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.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,
.nav-link.active {
    color: #ffffff;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(26, 27, 35, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-label {
    color: #8b949e;
    font-size: 0.875rem;
}

.balance-amount {
    color: #00d4ff;
    font-weight: 600;
    font-size: 0.875rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

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

.btn-secondary {
    background: rgba(139, 148, 158, 0.2);
    color: #8b949e;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(139, 148, 158, 0.3);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

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

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

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

/* Dashboard Section */
.dashboard-section {
    padding: 2rem 0;
    background: #0a0b0f;
}

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

.stat-card {
    background: linear-gradient(135deg, rgba(26, 27, 35, 0.8) 0%, rgba(15, 16, 21, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #8b949e;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.stat-change.positive {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Trading Interface */
.trading-interface {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.trading-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.trading-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Chart Container */
.chart-container {
    background: linear-gradient(135deg, rgba(26, 27, 35, 0.8) 0%, rgba(15, 16, 21, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

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

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

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-btn {
    padding: 0.5rem 1rem;
    background: rgba(139, 148, 158, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #8b949e;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-btn:hover,
.chart-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border-color: transparent;
}

.chart-wrapper {
    height: 300px;
    position: relative;
}

/* Grid Visualization */
.grid-visualization {
    background: linear-gradient(135deg, rgba(26, 27, 35, 0.8) 0%, rgba(15, 16, 21, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.grid-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b949e;
    font-size: 0.875rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.active {
    background: #22c55e;
}

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

.grid-canvas-container {
    height: 200px;
    background: rgba(10, 11, 15, 0.5);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

/* Trading Panel */
.trading-panel {
    background: linear-gradient(135deg, rgba(26, 27, 35, 0.8) 0%, rgba(15, 16, 21, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.panel-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b949e;
    font-size: 0.75rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}

/* Trading Form */
.trading-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    color: #8b949e;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-control {
    padding: 0.75rem;
    background: rgba(43, 45, 58, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

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

.form-control::placeholder {
    color: #8b949e;
}

/* Strategy Options */
.strategy-options {
    display: flex;
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #8b949e;
    font-size: 0.875rem;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #00d4ff;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #00d4ff;
    border-radius: 50%;
}

/* Risk Slider */
.risk-slider {
    margin-top: 0.5rem;
}

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

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.risk-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #8b949e;
}

/* Strategy Preview */
.strategy-preview {
    background: rgba(10, 11, 15, 0.5);
    border-radius: 8px;
    padding: 1rem;
}

.strategy-preview h4 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.preview-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-label {
    color: #8b949e;
    font-size: 0.875rem;
}

.preview-value {
    color: #00d4ff;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-actions .btn {
    flex: 1;
}

/* Order Book */
.order-book {
    background: linear-gradient(135deg, rgba(26, 27, 35, 0.8) 0%, rgba(15, 16, 21, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.book-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.book-controls {
    display: flex;
    gap: 0.25rem;
}

.book-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(139, 148, 158, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #8b949e;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.book-btn:hover,
.book-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border-color: transparent;
}

.book-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-section {
    display: flex;
    flex-direction: column;
}

.book-header-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #8b949e;
    font-size: 0.75rem;
    font-weight: 500;
}

.book-orders {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 150px;
    overflow-y: auto;
}

.order-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.order-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sell-orders .order-row {
    color: #ef4444;
}

.buy-orders .order-row {
    color: #22c55e;
}

.current-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(10, 11, 15, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.price-value {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 700;
}

.price-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.price-change.positive {
    color: #22c55e;
}

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

/* Strategies Section */
.strategies-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #0f1015 0%, #1a1b23 50%, #0f1015 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: #8b949e;
    max-width: 600px;
    margin: 0 auto;
}

.strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.strategy-card {
    background: linear-gradient(135deg, rgba(26, 27, 35, 0.8) 0%, rgba(15, 16, 21, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.strategy-card.active {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.strategy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.strategy-info h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.strategy-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.strategy-status.running {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.strategy-status.paused {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.strategy-status.stopped {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.strategy-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    background: rgba(139, 148, 158, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #8b949e;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

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

.strategy-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-item .stat-label {
    color: #8b949e;
    font-size: 0.75rem;
}

.stat-item .stat-value {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
}

.stat-item .stat-value.positive {
    color: #22c55e;
}

.stat-item .stat-value.negative {
    color: #ef4444;
}

.strategy-chart {
    height: 120px;
    background: rgba(10, 11, 15, 0.5);
    border-radius: 8px;
    position: relative;
}

.new-strategy {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background: transparent;
}

.new-strategy-content {
    text-align: center;
}

.new-strategy-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 1rem;
}

.new-strategy-content h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.new-strategy-content p {
    color: #8b949e;
    margin-bottom: 1.5rem;
}

/* Analytics Section */
.analytics-section {
    padding: 3rem 0;
    background: #0a0b0f;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.analytics-card {
    background: linear-gradient(135deg, rgba(26, 27, 35, 0.8) 0%, rgba(15, 16, 21, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.time-selector {
    display: flex;
    gap: 0.25rem;
}

.time-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(139, 148, 158, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #8b949e;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-btn:hover,
.time-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border-color: transparent;
}

.risk-metrics {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-label {
    color: #8b949e;
    font-size: 0.875rem;
    font-weight: 500;
}

.metric-value {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
}

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

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

/* History Section */
.history-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #0f1015 0%, #1a1b23 50%, #0f1015 100%);
}

.history-filters {
    display: flex;
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    color: #8b949e;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-select,
.filter-input {
    padding: 0.75rem;
    background: rgba(43, 45, 58, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.875rem;
    min-width: 150px;
}

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

.history-table {
    background: linear-gradient(135deg, rgba(26, 27, 35, 0.8) 0%, rgba(15, 16, 21, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.history-table table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table th {
    background: rgba(10, 11, 15, 0.5);
    color: #8b949e;
    font-size: 0.875rem;
    font-weight: 600;
}

.history-table td {
    color: #ffffff;
    font-size: 0.875rem;
}

.history-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.page-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(139, 148, 158, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #8b949e;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border-color: rgba(0, 212, 255, 0.3);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: #8b949e;
    font-size: 0.875rem;
}

/* Settings Section */
.settings-section {
    padding: 3rem 0;
    background: #0a0b0f;
}

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

.settings-card {
    background: linear-gradient(135deg, rgba(26, 27, 35, 0.8) 0%, rgba(15, 16, 21, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
}

.settings-card h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    color: #8b949e;
    font-size: 0.875rem;
    font-weight: 500;
}

.setting-control {
    padding: 0.5rem 0.75rem;
    background: rgba(43, 45, 58, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.875rem;
    min-width: 120px;
}

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

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 148, 158, 0.3);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

input:checked + .toggle-label {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
}

input:checked + .toggle-label:before {
    transform: translateX(26px);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.connected {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-badge.disconnected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0f1015 0%, #1a1b23 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #8b949e;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-description {
    color: #8b949e;
    line-height: 1.6;
    font-size: 0.875rem;
}

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

.footer-copyright {
    color: #8b949e;
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

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

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

/* Notification Container */
.notification-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

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

.notification.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.notification.info {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .trading-interface {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 11, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .nav-actions {
        gap: 1rem;
    }
    
    .user-balance {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .strategy-stats {
        grid-template-columns: 1fr;
    }
    
    .history-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select,
    .filter-input {
        min-width: auto;
        width: 100%;
    }
    
    .history-table {
        overflow-x: auto;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .chart-wrapper {
        height: 200px;
    }
    
    .grid-canvas-container {
        height: 150px;
    }
    
    .strategy-chart {
        height: 100px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border-radius: 4px;
}

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

/* Selection */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(0, 212, 255, 0.3);
    color: #ffffff;
}