:root {
    --bg-color: #0a0a0a;
    --sidebar-bg: #050505;
    --text-color: #e0e0e0;
    --accent-cyan: #00e5ff;
    --accent-green: #00ff41;
    --accent-red: #ff003c;
    --border-color: #333;
    --card-bg: #111;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    font-size: 14px;
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr 420px;
    grid-template-rows: 100vh;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow: hidden;
    position: relative;
    z-index: 20; /* Lower than modal */
    height: 100vh;
    max-height: 100vh;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    flex-shrink: 0;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.logo-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar-content {
    flex-grow: 1;
}

/* Main Area */
.main-area {
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow: hidden;
    background-color: var(--bg-color);
    position: relative;
    z-index: 10;
    flex: 1;
    min-width: 0;  /* Grid/flex overflow fix */
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #111;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.selector-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

select {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

select option {
    background: #222;
    color: #fff;
    padding: 8px;
}

select option:hover,
select option:focus {
    background: #333 !important;
    color: #fff !important;
}

select option:checked {
    background: #00e5ff;
    color: #000;
}

/* Symbol input wrapper */
.symbol-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 200px;
}

#symbol-dropdown-btn {
    display: none; /* Desktop'ta gizli, mobile.css'de gösterilir */
}

/* Symbol Search Input - Simple like Bot Settings */
#symbol-search-input {
    min-width: 200px;
    padding: 6px 12px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s;
}

#symbol-search-input:focus {
    outline: none;
    border-color: #00e5ff;
    box-shadow: 0 0 5px rgba(0, 229, 255, 0.3);
}

#symbol-search-input::placeholder {
    color: #666;
}

/* Limit datalist dropdown height (browser support varies) */
#symbol-datalist {
    max-height: 400px;
    overflow-y: auto;
}

.balance-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.cyber-metric {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 5px 15px;
    border-radius: 4px;
    min-width: 100px;
    text-align: center;
}

.cyber-metric .label {
    font-size: 10px;
    color: #888;
    display: block;
    margin-bottom: 2px;
}

.cyber-metric .value {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

/* Chart */
.chart-container {
    height: calc(100vh - 520px);
    min-height: 200px;
    background: #0e1117;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
    width: 100%;
    min-width: 0;  /* Responsive fix */
    overflow: hidden;
    flex-shrink: 1;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    flex-shrink: 0;
}

.tab-btn {
    background: none;
    border: none;
    color: #888;
    padding: 10px 25px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #ccc;
}

.tab-btn.active {
    color: var(--accent-cyan);
    border-bottom: 2px solid var(--accent-cyan);
    font-weight: bold;
}

.tab-content {
    display: none;
    overflow-y: auto;
    min-height: 300px;
    flex-shrink: 0;
}

.tab-content.active {
    display: block;
}

/* Right Sidebar */
.right-sidebar {
    background-color: #0e0e0e;
    border-left: 1px solid var(--border-color);
    padding: 15px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    z-index: 20;
    width: 420px;
    min-width: 420px;
    max-width: 420px;
    flex-shrink: 0;
}

.section-header {
    font-family: 'Courier New', monospace;
    color: var(--accent-cyan);
    font-weight: bold;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    padding-bottom: 5px;
    font-size: 16px;
}

.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

.news-feed {
    flex-grow: 1;
    overflow-y: auto;
    /* max-height kaldırıldı - flex ile otomatik genişler */
}

.chat-box {
    height: 250px;
    overflow-y: auto;
    background: #111;
    border: 1px solid #333;
    margin-bottom: 10px;
    padding: 10px;
    font-size: 12px;
    border-radius: 4px;
}

.chat-input {
    display: flex;
    gap: 5px;
}

/* Referral Card Hover Effect */
.referral-card:hover {
    background: rgba(0, 229, 255, 0.15) !important;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
    transform: translateY(-2px);
    border-color: #fff !important;
}

/* Referral Glow Animation */
@keyframes neon-pulse {
    0% {
        box-shadow: 0 0 5px rgba(0, 229, 255, 0.2);
        border-color: rgba(0, 229, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
        border-color: rgba(0, 229, 255, 1);
    }
    100% {
        box-shadow: 0 0 5px rgba(0, 229, 255, 0.2);
        border-color: rgba(0, 229, 255, 0.5);
    }
}

.referral-glow {
    animation: neon-pulse 2s infinite ease-in-out;
}

.chat-input input {
    flex-grow: 1;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
}

.chat-input button {
    background: var(--accent-cyan);
    border: none;
    width: 40px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

/* Sidebar Controls */
.control-group {
    display: flex;
    flex-direction: column; /* Stack label and status vertically */
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    min-height: 50px;
}

.switch-label {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    color: #ccc;
    margin-bottom: 2px;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
    flex-shrink: 0;
    margin-left: 10px;
}

.switch input { 
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    cursor: pointer;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
    border: 1px solid #555;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: #aaa;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Checked State - Generic */
.switch input:checked + .slider {
    background-color: rgba(0, 229, 255, 0.2) !important;
    border-color: var(--accent-cyan) !important;
}

.switch input:checked + .slider:before {
    transform: translateX(18px) !important;
    background-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px var(--accent-cyan) !important;
}

/* Checked State - ID Specific Overrides (Safety Net) */
#toggle-autopilot:checked + .slider,
#toggle-brain:checked + .slider,
#toggle-auto-trade:checked + .slider,
#toggle-liquidation-map:checked + .slider {
    background-color: rgba(0, 229, 255, 0.2) !important;
    border-color: var(--accent-cyan) !important;
}

#toggle-autopilot:checked + .slider:before,
#toggle-brain:checked + .slider:before,
#toggle-auto-trade:checked + .slider:before,
#toggle-liquidation-map:checked + .slider:before {
    transform: translateX(18px) !important;
    background-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px var(--accent-cyan) !important;
}

/* Class-based Active State (JavaScript Fallback) */
.switch.active .slider {
    background-color: rgba(0, 229, 255, 0.2) !important;
    border-color: var(--accent-cyan) !important;
}

.switch.active .slider:before {
    transform: translateX(18px) !important;
    background-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px var(--accent-cyan) !important;
}

/* Hover State */
.switch:hover .slider {
    border-color: #777;
}

.switch:hover input:checked + .slider {
    border-color: #fff;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Accordion */
.accordion {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #0e0e0e;
    overflow: hidden;
}

.accordion-header {
    padding: 12px 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    background: #151515;
    color: #eee;
    border-bottom: 1px solid #222;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    background: #222;
    color: var(--accent-cyan);
}

.accordion-header::after {
    content: '+';
    font-weight: bold;
    color: #666;
}

.accordion-header.active::after {
    content: '-';
    color: var(--accent-cyan);
}

.accordion-content {
    padding: 10px;
    display: none;
    background: #0a0a0a;
    border-top: 1px solid var(--border-color);
    max-height: 350px;
    overflow-y: auto;
}

.accordion-content input[type="text"],
.accordion-content input[type="password"], 
.accordion-content select {
    width: 100%;
    padding: 6px;
    margin-bottom: 8px;
    background: #111;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
}

.accordion-content label {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    color: #aaa;
}

.accordion-content input[type="range"] {
    width: 100%;
    margin-bottom: 10px;
}

/* Dashboard Card */
.cyber-dashboard .cyber-card {
    background: linear-gradient(180deg, rgba(10,10,15,0.95) 0%, rgba(20,20,30,0.95) 100%);
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    min-height: 100px;
}

.cyber-dashboard .cyber-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* AI Analytics Sidebar */
.ai-analytics-sidebar {
    background: linear-gradient(180deg, #0a0a0f 0%, #050508 100%);
    border-right: 1px solid #00e5ff33;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden; /* Changed from auto to hidden to manage scroll internally */
    position: relative;
    z-index: 15;
    box-shadow: inset -2px 0 10px rgba(0, 229, 255, 0.05);
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    flex-shrink: 0;
}

.ai-terminal-container {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;      /* Take up all available space */
    overflow-y: auto;  /* Scroll content within this container */
}

.ai-panel-header {
    font-family: 'Orbitron', 'Courier New', monospace;
    color: #00e5ff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 15px 10px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.1), transparent);
    border-top: 1px solid #00e5ff;
    border-bottom: 1px solid #00e5ff;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.ai-status-card {
    background: linear-gradient(135deg, #111 0%, #0a0a0a 100%);
    border: 1px solid #00e5ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}

.ai-status-card .card-title {
    font-size: 12px;
    color: #00e5ff;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-status-card .status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #222;
    font-size: 11px;
}

.ai-status-card .status-row:last-child {
    border-bottom: none;
}

.ai-status-card .status-label {
    color: #888;
}

.ai-status-card .status-value {
    color: #fff;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.ai-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.ai-status-badge.active {
    background: rgba(0, 255, 65, 0.2);
    color: #00ff41;
    border: 1px solid #00ff41;
}

.ai-status-badge.inactive {
    background: rgba(255, 0, 60, 0.2);
    color: #ff003c;
    border: 1px solid #ff003c;
}

.ai-decision-table {
    width: 100%;
    font-size: 10px;
    border-collapse: collapse;
    margin-top: 10px;
}

.ai-decision-table th {
    background: #0a0a0a;
    color: #00e5ff;
    padding: 6px 4px;
    text-align: left;
    border-bottom: 1px solid #00e5ff;
    font-weight: bold;
}

.ai-decision-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #222;
    color: #ccc;
}

.ai-decision-table tr:hover {
    background: #111;
}

.ai-confidence-bar {
    width: 100%;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
}

.ai-confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff003c, #ffee00, #00ff41);
    transition: width 0.3s;
}

.ai-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.ai-stat-box {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.ai-stat-box .stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #00e5ff;
    font-family: 'Courier New', monospace;
}

.ai-stat-box .stat-label {
    font-size: 9px;
    color: #888;
    margin-top: 3px;
}

.ai-news-summary {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.ai-news-item {
    font-size: 10px;
    color: #aaa;
    padding: 5px 0;
    border-bottom: 1px solid #1a1a1a;
}

.ai-news-item:last-child {
    border-bottom: none;
}

.ai-news-item .sentiment {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.ai-news-item .sentiment.positive { background: #00ff41; }
.ai-news-item .sentiment.negative { background: #ff003c; }
.ai-news-item .sentiment.neutral { background: #888; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ============ THINKING CARDS STYLES ============ */
.thinking-cards-container {
    display: flex;
    flex-direction: row !important;
    gap: 15px;
    margin-top: 10px;
    width: 100%;
    flex-wrap: nowrap;
}

.thinking-card {
    flex: 1;
    max-width: 33.333%; /* 3 kart için ideal genişlik */
    background: linear-gradient(135deg, rgba(0,229,255,0.05) 0%, rgba(0,0,0,0.8) 100%);
    border: 1px solid rgba(0,229,255,0.2);
    border-radius: 8px;
    padding: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(0,229,255,0.1),
        inset 0 1px 0 rgba(255,255,255,0.1);
    min-height: 140px;
    max-height: 140px;
    position: relative;
    overflow: hidden;
}

.thinking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,229,255,0.6), transparent);
    animation: scanLine 3s linear infinite;
}

@keyframes scanLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.thinking-card-title {
    font-size: 12px;
    font-weight: 600;
    color: #00e5ff;
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0,229,255,0.2);
    padding-bottom: 8px;
}

.thinking-card:hover {
    border-color: rgba(0,229,255,0.4);
    box-shadow: 
        0 6px 20px rgba(0,229,255,0.15),
        inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* AI Stats Grid düzenleme */
.thinking-card .ai-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-top: 10px;
}

.thinking-card .ai-stat-box {
    text-align: center;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    border: 1px solid rgba(0,229,255,0.1);
}

.thinking-card .stat-value {
    font-size: 14px;
    font-weight: bold;
    color: #00ff41;
    margin-bottom: 2px;
}

.thinking-card .stat-label {
    font-size: 9px;
    color: #aaa;
    text-transform: uppercase;
}

/* Decision Table için thinking card stili */
.thinking-card .ai-decision-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8px;
}

.thinking-card .ai-decision-table th,
.thinking-card .ai-decision-table td {
    padding: 2px 4px;
    text-align: left;
    border-bottom: 1px solid rgba(0,229,255,0.1);
}

.thinking-card .ai-decision-table th {
    background: rgba(0,229,255,0.1);
    font-weight: 600;
    font-size: 8px;
    color: #00e5ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thinking-card .ai-decision-table td {
    font-size: 8px;
    color: #ddd;
}

.thinking-card .ai-decisions-log {
    max-height: 150px;
    overflow-y: auto;
    padding: 5px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    border: 1px solid rgba(0,229,255,0.1);
}

/* ============ QUANTUM DASHBOARD STYLES ============ */
.quantum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
    font-size: 10px;
}

.q-box {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(0,229,255,0.1);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60px;
    transition: border-color 0.3s;
}

.q-box:hover {
    border-color: rgba(0,229,255,0.3);
    background: rgba(0,229,255,0.05);
}

.q-label {
    font-size: 8px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.q-val {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    text-shadow: 0 0 5px rgba(255,255,255,0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.q-sub {
    font-size: 9px;
    color: #aaa;
    margin-top: 2px;
}

/* Utility Classes for Dashboard */
.text-red { color: #ff003c !important; text-shadow: 0 0 5px rgba(255,0,60,0.3); }
.text-green { color: #00ff41 !important; text-shadow: 0 0 5px rgba(0,255,65,0.3); }
.text-yellow { color: #ffaa00 !important; }

.warning-blink {
    color: #ffaa00;
    font-weight: bold;
    animation: blink-warning 1.5s infinite;
}

.warning {
    color: #ffaa00;
}

@keyframes blink-warning {
    0% { opacity: 1; text-shadow: 0 0 0 transparent; }
    50% { opacity: 0.6; text-shadow: 0 0 5px #ffaa00; }
    100% { opacity: 1; text-shadow: 0 0 0 transparent; }
}

/* Responsive düzenlemeler */
@media (max-width: 1000px) {
    .thinking-cards-container {
        flex-wrap: wrap !important;
    }
    
    .thinking-card {
        flex: 1;
        min-width: 250px;
        min-height: 180px;
    }
}

@media (max-width: 800px) {
    .thinking-cards-container {
        flex-direction: column !important;
        gap: 10px;
    }
    
    .thinking-card {
        min-height: auto;
        min-width: auto;
        flex: none;
    }
}

/* ============ AI TERMINAL CARDS - MODERN CYBERPUNK ============ */
.ai-terminal-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    height: calc(100vh - 160px);
    min-height: 300px;
    flex: 1;
}

.ai-terminal-card {
    background: linear-gradient(135deg, rgba(0,229,255,0.03) 0%, rgba(0,0,0,0.95) 100%);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    flex: 1;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.ai-terminal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, rgba(0,229,255,0.4), rgba(0,255,65,0.2), rgba(0,229,255,0.4));
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0% { background: linear-gradient(135deg, rgba(0,229,255,0.4), rgba(0,255,65,0.2), rgba(0,229,255,0.4)); }
    50% { background: linear-gradient(135deg, rgba(0,255,65,0.4), rgba(0,229,255,0.2), rgba(0,255,65,0.4)); }
    100% { background: linear-gradient(135deg, rgba(0,229,255,0.4), rgba(0,255,65,0.2), rgba(0,229,255,0.4)); }
}

.ai-terminal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,229,255,0.2);
}

.ai-terminal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(90deg, rgba(0,229,255,0.1) 0%, rgba(0,0,0,0.8) 100%);
    border-bottom: 1px solid rgba(0,229,255,0.2);
    position: relative;
}

.ai-terminal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00e5ff, transparent);
    animation: scanLine 2s linear infinite;
}

.terminal-icon {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

.terminal-title {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    color: #00e5ff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.terminal-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.terminal-status::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.7; }
}

.terminal-status.online {
    background: #00ff41;
    box-shadow: 0 0 8px #00ff41;
}

.terminal-status.processing {
    background: #ff9500;
    box-shadow: 0 0 8px #ff9500;
}

.terminal-status.scanning {
    background: #00e5ff;
    box-shadow: 0 0 8px #00e5ff;
}

.ai-terminal-content {
    padding: 15px;
    background: rgba(0,0,0,0.3);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.terminal-log {
    min-height: 80px;
    flex: 1;
    overflow-y: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.5;
    padding: 10px;
    border-radius: 6px;
    position: relative;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-log .log-entry {
    color: #e0ffe0;
    padding: 3px 0;
    border-bottom: 1px solid rgba(0,255,65,0.1);
    margin-bottom: 3px;
}

.positions-log {
    background: rgba(0,10,0,0.85);
    border: 1px solid rgba(0,200,0,0.4);
    color: #00ff41;
}

.brain-log {
    background: linear-gradient(135deg, rgba(26,0,80,0.8) 0%, rgba(10,0,48,0.9) 100%);
    border: 1px solid rgba(170,0,255,0.3);
    color: #d0f;
}

.signals-log {
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(10,10,10,0.9) 100%);
    border: 1px solid rgba(34,34,34,0.5);
    color: #0ff;
}

.log-placeholder {
    color: #666;
    font-style: italic;
}

/* Terminal scroll styling */
.terminal-log::-webkit-scrollbar {
    width: 4px;
}

.terminal-log::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-log::-webkit-scrollbar-thumb {
    background: rgba(0,229,255,0.3);
    border-radius: 2px;
}

.terminal-log::-webkit-scrollbar-thumb:hover {
    background: rgba(0,229,255,0.5);
}

/* Specific card hover effects */
.positions-card:hover .positions-log {
    border-color: rgba(0,255,65,0.6);
    box-shadow: inset 0 0 20px rgba(0,255,65,0.1);
}

.brain-card:hover .brain-log {
    border-color: rgba(170,0,255,0.6);
    box-shadow: inset 0 0 20px rgba(170,0,255,0.1);
}

.signals-card:hover .signals-log {
    border-color: rgba(0,229,255,0.6);
    box-shadow: inset 0 0 20px rgba(0,229,255,0.1);
}

/* ============ AI CHAT - MODERN CYBERPUNK ============ */
.ai-chat-container {
    background: linear-gradient(135deg, rgba(0,229,255,0.03) 0%, rgba(0,0,0,0.95) 100%);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 400px);
}

.ai-chat-container::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, rgba(0,229,255,0.4), rgba(255,0,150,0.2), rgba(0,229,255,0.4));
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: chatBorderGlow 3s linear infinite;
    pointer-events: none;
}

@keyframes chatBorderGlow {
    0% { background: linear-gradient(135deg, rgba(0,229,255,0.4), rgba(255,0,150,0.2), rgba(0,229,255,0.4)); }
    50% { background: linear-gradient(135deg, rgba(255,0,150,0.4), rgba(0,229,255,0.2), rgba(255,0,150,0.4)); }
    100% { background: linear-gradient(135deg, rgba(0,229,255,0.4), rgba(255,0,150,0.2), rgba(0,229,255,0.4)); }
}

.ai-chat-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,229,255,0.15);
}

.ai-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(90deg, rgba(0,229,255,0.1) 0%, rgba(0,0,0,0.8) 100%);
    border-bottom: 1px solid rgba(0,229,255,0.2);
    position: relative;
    flex-shrink: 0;
}

.ai-chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ff0096, transparent);
    animation: chatScanLine 2s linear infinite;
}

@keyframes chatScanLine {
    0% { background: linear-gradient(90deg, transparent, #ff0096, transparent); }
    50% { background: linear-gradient(90deg, transparent, #00e5ff, transparent); }
    100% { background: linear-gradient(90deg, transparent, #ff0096, transparent); }
}

.chat-icon {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

.chat-title {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    color: #00e5ff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.chat-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff0096;
    box-shadow: 0 0 8px #ff0096;
    position: relative;
}

.chat-status::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: chatStatusPulse 2s ease-in-out infinite;
}

@keyframes chatStatusPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.7; }
}

.ai-chat-content {
    padding: 15px;
    background: rgba(0,0,0,0.3);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
}

.ai-chat-box {
    flex: 1;
    overflow-y: auto;
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    line-height: 1.4;
    padding: 10px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(10,0,20,0.9) 100%);
    border: 1px solid rgba(255,0,150,0.2);
    color: #fff;
    position: relative;
    min-height: 0;
}

.ai-chat-box::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.ai-chat-box {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ai-chat-input {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ai-chat-input input {
    flex: 1;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(0,229,255,0.3);
    border-radius: 20px;
    color: #fff;
    padding: 8px 15px;
    font-size: 11px;
    outline: none;
    transition: all 0.3s ease;
}

.ai-chat-input input:focus {
    border-color: #00e5ff;
    box-shadow: 0 0 10px rgba(0,229,255,0.3);
}

.ai-chat-input input::placeholder {
    color: #666;
}

/* Gönder butonu kaldırıldı - Enter tuşu kullanılacak */

/* ============ MARKET SENTIMENT PANEL ============ */
.sentiment-panel {
    background: linear-gradient(135deg, rgba(0,229,255,0.03) 0%, rgba(0,0,0,0.95) 100%);
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    position: relative;
}

.sentiment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,229,255,0.1);
}

.sentiment-icon {
    font-size: 14px;
}

.sentiment-title {
    flex: 1;
    font-size: 10px;
    font-weight: 600;
    color: #00e5ff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sentiment-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sentiment-badge.bullish {
    background: rgba(0,255,65,0.15);
    color: #00ff41;
    border: 1px solid rgba(0,255,65,0.3);
}

.sentiment-badge.bearish {
    background: rgba(255,0,60,0.15);
    color: #ff003c;
    border: 1px solid rgba(255,0,60,0.3);
}

.sentiment-badge.neutral {
    background: rgba(255,255,255,0.08);
    color: #888;
    border: 1px solid rgba(255,255,255,0.15);
}

.sentiment-symbol {
    font-size: 11px;
    color: #888;
    margin-bottom: 10px;
}

.sentiment-exchanges {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sentiment-loading {
    color: #555;
    font-size: 10px;
    text-align: center;
    padding: 10px;
}

.sentiment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
}

.sentiment-row .exchange-name {
    width: 52px;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    flex-shrink: 0;
}

.sentiment-row .bar-container {
    flex: 1;
    height: 14px;
    background: rgba(255,0,60,0.2);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.sentiment-row .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff41, #00cc33);
    border-radius: 3px 0 0 3px;
    transition: width 0.6s ease;
    position: relative;
}

.sentiment-row .bar-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    font-weight: 600;
    text-shadow: 0 0 3px rgba(0,0,0,0.8);
}

.sentiment-row .bar-label.long-label {
    left: 4px;
    color: #fff;
}

.sentiment-row .bar-label.short-label {
    right: 4px;
    color: #fff;
}

.sentiment-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,229,255,0.1);
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.sentiment-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 60px;
}

.sentiment-stat .stat-label {
    font-size: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.sentiment-stat .stat-value {
    font-size: 11px;
    font-weight: 600;
    color: #ddd;
}

.sentiment-stat .stat-value.positive { color: #00ff41; }
.sentiment-stat .stat-value.negative { color: #ff003c; }

/* Per-exchange detail block */
.sentiment-exchange-block {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.sentiment-exchange-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sentiment-exchange-stats {
    display: flex;
    gap: 12px;
    margin-top: 3px;
    padding-left: 60px;
}

.ex-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ex-stat-label {
    font-size: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ex-stat-value {
    font-size: 9px;
    color: #aaa;
    font-weight: 500;
}

.ex-stat-value.positive { color: #00ff41; }
.ex-stat-value.negative { color: #ff003c; }

.bar-fill.bar-fill-na {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}

/* ============ AI NEWS - MODERN CYBERPUNK ============ */
.ai-news-container {
    background: linear-gradient(135deg, rgba(0,229,255,0.03) 0%, rgba(0,0,0,0.95) 100%);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0 0 10px 0;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    height: 100%;
}

.ai-news-container::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, rgba(0,255,65,0.4), rgba(255,165,0,0.2), rgba(0,255,65,0.4));
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: newsBorderGlow 3s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes newsBorderGlow {
    0% { background: linear-gradient(135deg, rgba(0,255,65,0.4), rgba(255,165,0,0.2), rgba(0,255,65,0.4)); }
    50% { background: linear-gradient(135deg, rgba(255,165,0,0.4), rgba(0,255,65,0.2), rgba(255,165,0,0.4)); }
    100% { background: linear-gradient(135deg, rgba(0,255,65,0.4), rgba(255,165,0,0.2), rgba(0,255,65,0.4)); }
}

.ai-news-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,255,65,0.15);
}

.ai-news-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(90deg, rgba(0,255,65,0.1) 0%, rgba(0,0,0,0.8) 100%);
    border-bottom: 1px solid rgba(0,255,65,0.2);
    position: relative;
    flex-shrink: 0;
    z-index: 1;
}

.ai-news-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ff8800, transparent);
    animation: newsScanLine 2s linear infinite;
}

@keyframes newsScanLine {
    0% { background: linear-gradient(90deg, transparent, #ff8800, transparent); }
    50% { background: linear-gradient(90deg, transparent, #00ff41, transparent); }
    100% { background: linear-gradient(90deg, transparent, #ff8800, transparent); }
}

.news-icon {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

.news-title {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    color: #00ff41;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.news-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.news-status::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: newsStatusPulse 2s ease-in-out infinite;
}

@keyframes newsStatusPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.7; }
}

.news-status.live {
    background: #ff8800;
    box-shadow: 0 0 8px #ff8800;
}

/* İç content katmanı kaldırıldı - direkt feed */
.ai-news-feed-direct {
    flex: 1;
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    line-height: 1.4;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* Scrollbar gizli */
.ai-news-feed-direct::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.ai-news-feed-direct {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.news-placeholder {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* News item styles */
.news-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,136,0,0.1);
    margin-bottom: 8px;
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.news-item-title {
    font-weight: 400;
    color: #ddd;
    font-size: 12px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.news-item-source {
    font-size: 9px;
    color: #ff8800;
    margin-bottom: 2px;
}

.news-item-time {
    font-size: 9px;
    color: #666;
}

/* Right sidebar responsive */
.right-sidebar {
    background-color: var(--sidebar-bg);
    border-left: 1px solid var(--border-color);
}

/* News container hover effect */
.ai-news-container:hover .ai-news-feed-direct {
    background: rgba(20,10,0,0.3);
}

/* Feed scroll smooth */
.ai-news-feed-direct {
    scroll-behavior: smooth;
}

/* ============ BRAIN SETUP ITEMS - CLICKABLE CARDS ============ */
.brain-setup-item {
    padding: 8px 12px;
    margin: 4px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-left: 3px solid #00e5ff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brain-setup-item:hover {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border-left-color: #00ff88;
    transform: translateX(3px);
}

.brain-setup-symbol {
    font-weight: bold;
    color: #00e5ff;
    font-size: 13px;
}

.brain-setup-timeframe {
    color: #888;
    font-size: 10px;
    margin-top: 2px;
}

.brain-setup-badge {
    background: #00ff8844;
    color: #00ff88;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}
