/* Deriv Telegram Signals - Complete Stylesheet */

/* ===== Telegram Setup Styles ===== */
.telegram-setup-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.telegram-setup-box {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.telegram-setup-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #f53676, transparent);
}

.telegram-icon {
    width: 80px;
    height: 80px;
    background: rgba(42, 171, 238, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 36px;
    color: #2aabee;
}

.telegram-icon.telegram-success {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.telegram-setup-box h3 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-align: center;
}

.telegram-description {
    color: #b0b8d4;
    text-align: center;
    margin-bottom: 40px;
}

.telegram-steps {
    margin: 30px 0;
}

.step-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f53676, #d62d64);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    color: #ffffff;
    margin-bottom: 10px;
}

.step-content p {
    color: #b0b8d4;
    margin-bottom: 15px;
}

.telegram-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.telegram-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
}

.telegram-input:focus {
    outline: none;
    border-color: #f53676;
    background: rgba(255, 255, 255, 0.08);
}

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

.telegram-btn-primary {
    background: #2aabee;
    color: white;
}

.telegram-btn-primary:hover {
    background: #1c8ecf;
    transform: translateY(-2px);
}

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

.telegram-btn-success {
    background: #4ade80;
    color: #1a1f3a;
}

.telegram-btn-success:hover {
    background: #22c55e;
    transform: translateY(-2px);
}

#telegram_test_result {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
}

#telegram_test_result.success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

#telegram_test_result.error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.telegram-note {
    margin-top: 30px;
    padding: 15px;
    background: rgba(245, 54, 118, 0.05);
    border: 1px solid rgba(245, 54, 118, 0.2);
    border-radius: 8px;
    color: #b0b8d4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.telegram-note.telegram-success {
    background: rgba(74, 222, 128, 0.05);
    border-color: rgba(74, 222, 128, 0.2);
}

/* Connected State */
.telegram-connected {
    text-align: center;
}

.telegram-info {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    color: #b0b8d4;
}

.info-item .value {
    color: #ffffff;
    font-weight: 600;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-badge.status-active {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.telegram-features {
    margin: 30px 0;
    text-align: left;
}

.telegram-features h4 {
    color: #ffffff;
    margin-bottom: 15px;
}

.telegram-features ul {
    list-style: none;
    padding: 0;
}

.telegram-features li {
    padding: 10px 0;
    color: #b0b8d4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.telegram-features li i {
    color: #4ade80;
}

/* ===== Dashboard Styles ===== */
.deriv-signals-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

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

.header-content h2 {
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f53676;
    border-radius: 20px;
    font-size: 14px;
    color: #ffffff;
}

.status-indicator i {
    animation: pulse 2s infinite;
}

.status-indicator.connected {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid #4ade80;
}

.status-indicator.disconnected {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
    border: 1px solid #f87171;
}

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

/* Market Selector */
.market-selector-section {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.market-selector-section label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.market-dropdown {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
}

.market-dropdown option {
    background: #1a1f3a;
    color: #ffffff;
    padding: 10px;
}

.market-dropdown:focus {
    outline: none;
    border-color: #f53676;
    background: rgba(255, 255, 255, 0.08);
}

/* Current Analysis */
.current-analysis-section {
    margin-bottom: 30px;
}

.analysis-card {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
}

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

.card-header h3 {
    color: #ffffff;
    font-size: 1.5rem;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.live-badge i {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.analysis-content {
    padding: 30px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 40px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.even-label {
    color: #4ade80;
}

.odd-label {
    color: #ef4444;
}

.progress-bar-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    display: flex;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.progress-even,
.progress-odd {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    position: relative;
}

.progress-even {
    background: linear-gradient(90deg, #4ade80, #22c55e);
}

.progress-odd {
    background: linear-gradient(90deg, #f87171, #ef4444);
}

.progress-text {
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-even .stat-icon {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

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

.stat-total .stat-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.stat-last .stat-icon {
    background: rgba(245, 54, 118, 0.2);
    color: #f53676;
}

.stat-content {
    flex: 1;
}

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

.stat-value {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
}

/* Streak Indicator */
.streak-indicator {
    padding: 20px;
    background: rgba(245, 54, 118, 0.1);
    border: 1px solid rgba(245, 54, 118, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f53676;
    font-weight: 600;
    margin-bottom: 20px;
}

.streak-indicator i {
    font-size: 24px;
}

/* Verification Panel - Proves Real Data */
.verification-panel {
    background: rgba(74, 222, 128, 0.05);
    border: 2px solid rgba(74, 222, 128, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.verification-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #4ade80;
}

.verification-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.verification-header i {
    font-size: 20px;
}

.verification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.verification-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.verification-item .label {
    color: #b0b8d4;
    font-size: 0.9rem;
}

.verification-item .value {
    color: #ffffff;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.recent-ticks {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.recent-ticks strong {
    color: #4ade80;
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.price-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.price-item {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #ffffff;
    animation: priceAppear 0.3s ease-out;
    white-space: nowrap;
}

.price-item.even {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.price-item.odd {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

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

/* Signal Alert */
.signal-alert {
    padding: 25px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 2px solid #4ade80;
    border-radius: 12px;
    display: flex;
    gap: 20px;
    animation: alertPulse 2s infinite;
}

@keyframes alertPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(74, 222, 128, 0.6);
    }
}

.alert-icon {
    width: 60px;
    height: 60px;
    background: #4ade80;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #1a1f3a;
    flex-shrink: 0;
}

.alert-content h4 {
    color: #4ade80;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.alert-content p {
    color: #ffffff;
    font-size: 1.1rem;
}

/* Hotcake Markets */
.hotcake-section {
    margin-bottom: 30px;
}

.section-header {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 0 0;
    padding: 25px 30px;
}

.section-header h3 {
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.section-header p {
    color: #b0b8d4;
    margin: 0;
}

.hotcake-grid {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.hotcake-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid #f53676;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.hotcake-card:hover {
    transform: translateY(-5px);
    border-color: #4ade80;
}

.hotcake-card h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.mini-progress {
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    margin-bottom: 10px;
}

.mini-progress-even,
.mini-progress-odd {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.mini-progress-even {
    background: #4ade80;
}

.mini-progress-odd {
    background: #ef4444;
}

.hotcake-signal {
    color: #4ade80;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.no-hotcakes {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #ffffff;
}

.no-hotcakes i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
    color: #ffffff;
}

.no-hotcakes p {
    color: #ffffff;
}

.no-hotcakes small {
    color: #b0b8d4;
}

.no-signals {
    text-align: center;
    padding: 40px;
    color: #ffffff;
}

.no-signals i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
    color: #ffffff;
}

.no-signals p {
    color: #ffffff;
}

/* Info Panel */
.info-panel {
    background: rgba(245, 54, 118, 0.05);
    border: 1px solid rgba(245, 54, 118, 0.2);
    border-radius: 16px;
    padding: 25px 30px;
    margin-top: 30px;
}

.info-panel h4 {
    color: #ffffff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-panel ul {
    list-style: none;
    padding: 0;
}

.info-panel li {
    color: #ffffff;
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.info-panel li:before {
    content: '•';
    color: #f53676;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 4px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(245, 54, 118, 0.2);
    border-top-color: #f53676;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-overlay p {
    color: #ffffff;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .telegram-setup-box,
    .deriv-signals-dashboard {
        padding: 20px 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .hotcake-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-bar {
        height: 50px;
    }
    
    .step-item {
        flex-direction: column;
    }
    
    .telegram-form {
        flex-direction: column;
    }
    
    /* Mobile-optimized verification panel */
    .verification-panel {
        padding: 15px;
    }
    
    .verification-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .verification-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .recent-ticks {
        padding: 10px;
    }
    
    .price-list {
        gap: 5px;
    }
    
    .price-item {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    /* Make verification header smaller on mobile */
    .verification-header h4 {
        font-size: 1rem;
    }
    
    /* Stack dashboard elements better on mobile */
    .dashboard-header {
        padding: 20px 15px;
    }
    
    .card-header h3 {
        font-size: 1.2rem;
    }
    
    .analysis-content {
        padding: 20px 15px;
    }
}

/* Ratio Badge */
.ratio-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f53676 0%, #d62d64 100%);
    color: #ffffff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ============================
   TRADING BOT STYLES
   ============================ */

.bot-panel-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.bot-controls {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

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

.bot-btn i {
    font-size: 16px;
}

.bot-btn.btn-start {
    background: linear-gradient(135deg, #00c853 0%, #00a943 100%);
    color: #ffffff;
}

.bot-btn.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
}

.bot-btn.btn-start:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.bot-btn.btn-stop {
    background: linear-gradient(135deg, #ff5252 0%, #e33636 100%);
    color: #ffffff;
}

.bot-btn.btn-stop:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.3);
}

.bot-btn.btn-settings {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #ffffff;
}

.bot-btn.btn-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.bot-btn.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.bot-btn.btn-primary {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #ffffff;
}

.bot-btn.btn-secondary {
    background: #f5f5f5;
    color: #333333;
}

.bot-btn.btn-danger {
    background: linear-gradient(135deg, #ff5252 0%, #e33636 100%);
    color: #ffffff;
}

.bot-btn.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.4);
}

.bot-btn.btn-danger:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.history-buttons {
    display: flex;
    gap: 10px;
}

.bot-status {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.status-badge.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.status-active i {
    animation: pulse-green 2s infinite;
}

.status-badge.status-inactive {
    background: #ffebee;
    color: #c62828;
}

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

.bot-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.bot-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border-radius: 8px;
}

.bot-stat .label {
    font-size: 13px;
    color: #666666;
}

.bot-stat .value {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
}

.bot-stat .value.profit {
    color: #00c853;
}

.bot-stat .value.loss {
    color: #ff5252;
}

/* Bot Settings Modal */
.bot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666666;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333333;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333333;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2196f3;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666666;
}

.form-group small a {
    color: #2196f3;
    text-decoration: none;
}

.form-group small a:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

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

/* Trade History */
.trade-history-section {
    margin-top: 30px;
}

.trade-history-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.trade-history-section .section-header h4 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-history-table {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
}

#trade_history_table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

#trade_history_table thead {
    background: #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 10;
}

#trade_history_table th {
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#trade_history_table td {
    padding: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
}

#trade_history_table td.profit {
    color: #00c853;
    font-weight: 600;
}

#trade_history_table td.loss {
    color: #ff5252;
    font-weight: 600;
}

#trade_history_table td.no-data {
    text-align: center;
    padding: 40px;
    color: #999999;
}

#trade_history_table .status-badge {
    font-size: 11px;
    padding: 4px 10px;
    margin: 0;
}

#trade_history_table .status-open {
    background: #fff3e0;
    color: #ef6c00;
}

#trade_history_table .status-closed {
    background: #e0f2f1;
    color: #00897b;
}

/* Responsive */
@media (max-width: 768px) {
    .bot-controls {
        flex-direction: column;
    }

    .bot-stats {
        grid-template-columns: 1fr;
    }

    /* Fix squeezed buttons on mobile */
    .history-buttons {
        flex-wrap: wrap;
    }

    .history-buttons .bot-btn {
        flex: 1 1 auto;
        min-width: 120px;
        justify-content: center;
    }

    .history-buttons .bot-btn.btn-small {
        padding: 10px 12px;
        font-size: 11px;
        white-space: nowrap;
    }

    .trade-history-table {
        font-size: 12px;
    }

    #trade_history_table th,
    #trade_history_table td {
        padding: 8px 6px;
    }
}

/* Extra small screens - stack buttons vertically */
@media (max-width: 480px) {
    .history-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .history-buttons .bot-btn {
        width: 100%;
        min-width: unset;
    }
}
