/* FinyX OTO BUY SELL BOT Styles */
body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Header Section */
.header-section {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-bottom: 3px solid #FFD700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.header-section h2 {
    color: #1a1a1a !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-controls .badge {
    font-size: 0.8rem;
    padding: 8px 12px;
}

/* Control Panel */
.control-panel {
    padding: 20px;
    background: rgba(255, 215, 0, 0.05);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.control.data-card {
    background: linear-gradient(145deg, var(--secondary-dark) 0%, var(--primary-dark) 100%);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px var(--shadow-dark),
        0 0 0 1px var(--border-color);
    overflow: hidden;
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
}

.control-card {
    background: linear-gradient(145deg, var(--secondary-dark) 0%, var(--primary-dark) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 12px;
    box-shadow: 
        0 20px 40px var(--shadow-dark),
        0 0 0 1px var(--border-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.control-card:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

.control-card .card-title {
    color: var(--primary-gold);
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 8px;
}

.control-card .form-control,
.control-card .form-select {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #FFD700;
    color: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.control-card .form-control:focus,
.control-card .form-select:focus {
    background: rgba(0, 0, 0, 0.8);
    border-color: #FFA500;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    color: #ffffff;
}

.control-card .form-label {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 5px;
}

/* Bot Status */
.status-badge {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.status-stopped {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.status-running {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(40, 167, 69, 0.6); }
    100% { box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3); }
}

/* Main Content */
.main-content {
    padding: 20px;
}

.data-card {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.data-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.signals-card {
    border: 2px solid #00FF00;
}

.signals-card .card-header {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.2), rgba(0, 255, 0, 0.1));
    border-bottom: 1px solid #00FF00;
}

.positions-card {
    border: 2px solid #FFA500;
}

.positions-card .card-header {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2), rgba(255, 165, 0, 0.1));
    border-bottom: 1px solid #FFA500;
}

.card-header {
    padding: 15px 20px;
    color: #ffffff;
}

.card-header h5 {
    margin: 0;
    font-weight: bold;
}

/* Table Styles */
.table-container {
    flex: 1;
    overflow: auto;
    max-height: 520px;
    border-radius: 0 0 15px 15px;
}

.table-container::-webkit-scrollbar {
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.table-container::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #FFA500;
}

.table th {
    background: rgba(0, 0, 0, 0.8) !important;
    color: #FFD700 !important;
    font-weight: bold;
    border: none;
    padding: 12px 8px;
    font-size: 0.9rem;
}

.table td {
    border: none;
    padding: 10px 8px;
    vertical-align: middle;
    font-size: 0.85rem;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background: rgba(255, 255, 255, 0.05);
}

.table-hover > tbody > tr:hover > td {
    background: rgba(255, 215, 0, 0.1);
}

/* Progress Bar */
.progress {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.progress-bar {
    transition: width 0.6s ease;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 15px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
}

.btn-warning {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    font-weight: bold;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    color: #1a1a1a;
}

.btn-outline-success {
    border: 1px solid #28a745;
    color: #28a745;
}

.btn-outline-success:hover {
    background: #28a745;
    color: white;
}

.btn-outline-danger {
    border: 1px solid #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
}

/* Stats Section */
.stats-section {
    padding: 20px;
}

.stats-card {
    background: rgba(138, 43, 226, 0.1);
    border: 2px solid #8A2BE2;
    border-radius: 15px;
    overflow: hidden;
}

.stats-card .card-header {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(138, 43, 226, 0.1));
    border-bottom: 1px solid #8A2BE2;
    color: #ffffff;
}

.stat-item {
    padding: 15px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #FFD700;
}

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

/* Signal Table Enhancements */
.signal-row {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.signal-row:hover {
    background: rgba(255, 215, 0, 0.08) !important;
    transform: translateX(4px);
    border-left-color: #FFD700;
}

.signal-row[data-signal-strength="6"],
.signal-row[data-signal-strength="7"],
.signal-row[data-signal-strength="8"],
.signal-row[data-signal-strength="9"],
.signal-row[data-signal-strength="10"] {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.signal-rank {
    font-size: 0.75rem;
    min-width: 32px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.price-info, .signal-info, .strength-info, .time-info {
    padding: 4px 0;
}

.price-info strong {
    font-size: 1rem;
    display: block;
}

.signal-info .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    font-weight: 600;
}

.strength-info .progress {
    margin-bottom: 4px;
}

.strength-info .progress-bar {
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-info strong {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 16px 24px;
        max-width: 1400px;
        margin: 0 auto;
    }
    .control-card {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .data-card {
        margin-bottom: 16px;
    }
    
    .signals-card, .positions-card {
        height: calc(100vh - 250px);
        min-height: 500px;
    }
    
    .table-container {
        max-height: calc(100vh - 350px);
        min-height: 400px;
    }
    
    .table-dark th,
    .table-dark td {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: #FFD700;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Connection Status */
.connection-status {
    position: relative;
    overflow: hidden;
}

.connection-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.connection-status.connected::before {
    left: 100%;
}

.signals-card, .positions-card {
    height: 600px;
    display: flex;
    flex-direction: column;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

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

.notification.success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.signal-strength-fill.strength-low {
    background: linear-gradient(90deg, #dc3545, #e83e8c);
}

/* Console Styles */
.console-card {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.console-output {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    height: 120px;
    overflow-y: auto;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.3;
}

.console-line {
    color: #00ff00;
    margin-bottom: 2px;
    word-wrap: break-word;
}

.console-line:last-child {
    margin-bottom: 0;
}

.console-output::-webkit-scrollbar {
    width: 6px;
}

.console-output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.console-output::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.5);
    border-radius: 3px;
}

.console-output::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.7);
}

.notification.warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #1a1a1a;
}

.notification.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
}
