* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0a0a0f;
  color: #e0e0e0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #0f0f18;
  border-bottom: 1px solid #1a1a2e;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-links a {
  color: #6b7280;
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

/* Market Switcher */
.market-switcher {
  display: flex;
  background: #0a0a0f;
  border: 1px solid #1a1a2e;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.market-tab {
  padding: 6px 16px !important;
  margin-left: 0 !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #6b7280 !important;
  text-decoration: none;
  transition: all 0.2s;
}

.market-tab:hover {
  color: #e0e0e0 !important;
  background: #12121e;
}

.market-tab.active {
  background: #1e3a5f !important;
  color: #ffffff !important;
}

.nav-separator {
  width: 1px;
  height: 20px;
  background: #1a1a2e;
  margin: 0 8px;
}

.nav-dropdown {
  display: inline-block;
  position: relative;
  margin-left: 24px;
  padding-bottom: 12px;
  margin-bottom: -12px;
}

.nav-dropdown-toggle {
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  margin-left: 0 !important;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active {
  color: #ffffff;
}

.nav-dropdown-toggle::after {
  content: " \25BE";
  font-size: 10px;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: #0f0f18;
  border: 1px solid #1a1a2e;
  border-radius: 6px;
  padding: 4px 0;
  z-index: 200;
  padding-top: 8px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: #6b7280;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-left: 0 !important;
}

.nav-dropdown-menu a:hover {
  color: #ffffff;
  background: #1a1a2e;
}

.nav-dropdown-menu a.active {
  color: #3b82f6;
}

main {
  padding: 20px 24px;
}

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

.symbol-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.symbol-dropdown {
  position: relative;
  width: 280px;
}

.symbol-dropdown input {
  width: 100%;
  background: #12121e;
  border: 1px solid #1a1a2e;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Segoe UI', sans-serif;
}

.symbol-dropdown input:focus {
  outline: none;
  border-color: #3b82f6;
}

.symbol-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: #12121e;
  border: 1px solid #1a1a2e;
  border-top: none;
  border-radius: 0 0 6px 6px;
  z-index: 100;
}

.symbol-list a {
  display: block;
  padding: 8px 14px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.symbol-list a:hover {
  background: #1a1a2e;
  color: #ffffff;
}

.symbol-list a.active {
  color: #3b82f6;
  background: #0f1a2e;
}

.symbol-count {
  color: #4b5563;
  font-size: 12px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: #0f0f18;
  border: 1px solid #1a1a2e;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
}

.stat-label {
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-value {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

.stat-sub {
  color: #6b7280;
  font-size: 12px;
  margin-top: 4px;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

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

.card {
  background: #0f0f18;
  border: 1px solid #1a1a2e;
  border-radius: 8px;
  padding: 16px;
}

.chart-card {
  grid-column: 1 / -1;
}

#chart-container {
  width: 100%;
  height: 400px;
  border-radius: 4px;
  overflow: hidden;
}

.card-header {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a2e;
}

.market-data .data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #111119;
}

.market-data .data-row:last-child {
  border-bottom: none;
}

.market-data .label {
  color: #d1d5db;
  font-size: 13px;
  font-weight: 500;
}

.label-desc {
  color: #4b5563;
  font-size: 11px;
  margin-top: 2px;
}

.market-data .value {
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

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

th {
  text-align: left;
  color: #6b7280;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  border-bottom: 1px solid #1a1a2e;
}

td {
  padding: 8px 10px;
  border-bottom: 1px solid #111119;
  color: #d1d5db;
  font-size: 13px;
}

tr:hover td {
  background: #111119;
}

.green { color: #10b981; }
.red { color: #ef4444; }
.yellow { color: #f59e0b; }

.tp-sl-bar {
  position: relative;
  width: 60px;
  height: 6px;
  background: linear-gradient(to right, #ef4444, #374151 50%, #10b981);
  border-radius: 3px;
}

.tp-sl-progress {
  position: absolute;
  top: -3px;
  width: 4px;
  height: 12px;
  background: #ffffff;
  border-radius: 2px;
  transform: translateX(-50%);
}

.btn-close-trade {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}
.btn-close-trade:hover {
  background: #ef4444;
}
.btn-close-trade:disabled {
  background: #6b7280;
  cursor: default;
}

.empty {
  text-align: center;
  color: #374151;
  padding: 24px;
  font-size: 13px;
}

.filters {
  margin-bottom: 16px;
}

.filters form {
  display: flex;
  gap: 10px;
  align-items: center;
}

select, input[type="text"], input[type="number"] {
  background: #12121e;
  border: 1px solid #1a1a2e;
  color: #e0e0e0;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 13px;
}

select:focus, input:focus {
  outline: none;
  border-color: #3b82f6;
}

button {
  background: #1a1a2e;
  border: 1px solid #2d2d44;
  color: #e0e0e0;
  padding: 8px 20px;
  border-radius: 6px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover {
  background: #2d2d44;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  justify-content: center;
}

.pagination a {
  color: #6b7280;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #1a1a2e;
  font-size: 13px;
}

.pagination a.active {
  color: #ffffff;
  background: #1e3a5f;
  border-color: #3b82f6;
}

.settings-card {
  max-width: 500px;
}

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

.form-group label {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
  width: 100%;
}

.form-group.checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e0e0e0;
  cursor: pointer;
}

.alert {
  color: #10b981;
  background: #052e16;
  border: 1px solid #10b981;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}

.activity-card {
  margin-top: 16px;
}

.activity-log {
  max-height: 400px;
  overflow-y: auto;
  padding: 4px 0;
}

.activity-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 2px;
  font-size: 13px;
  transition: background 0.15s;
}

.activity-line:hover {
  background: #12121e;
}

.activity-time {
  color: #4b5563;
  font-size: 12px;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  min-width: 65px;
}

.activity-symbol {
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  min-width: 80px;
}

.activity-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  min-width: 60px;
  text-align: center;
}

.activity-detail {
  color: #9ca3af;
  font-size: 13px;
}

.activity-empty {
  color: #374151;
  text-align: center;
  padding: 32px;
  font-size: 14px;
}

/* Tools */

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

.tool-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.tool-header .meta {
  color: #4b5563;
  font-size: 12px;
}

.score-bar {
  width: 80px;
  height: 6px;
  background: #1a1a2e;
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.score-bar-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
}

.wall-bid { color: #10b981; }
.wall-ask { color: #ef4444; }

.strength-bar {
  display: inline-block;
  height: 6px;
  background: #3b82f6;
  border-radius: 3px;
  min-width: 4px;
  vertical-align: middle;
}

.depth-chart-container {
  width: 100%;
  height: 400px;
  border-radius: 4px;
  overflow: hidden;
}

.tool-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.tool-stat {
  background: #0f0f18;
  border: 1px solid #1a1a2e;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
}

.tool-stat .label {
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.tool-stat .value {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-card {
  display: block;
  background: #0f0f18;
  border: 1px solid #1a1a2e;
  border-radius: 8px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 0.2s;
}

.news-card:hover {
  border-color: #3b82f6;
}

.news-title {
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.news-meta {
  color: #4b5563;
  font-size: 12px;
}

.news-meta span {
  margin-right: 12px;
}

.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.search-box input {
  flex: 1;
  max-width: 300px;
}

.btn-scan {
  background: #1e3a5f;
  border: 1px solid #3b82f6;
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-scan:hover {
  background: #2a4a6f;
}

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

.loading-text {
  text-align: center;
  color: #4b5563;
  padding: 32px;
  font-size: 14px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #151520;
}

/* Stock Scanner */

.vol-distribution-bar {
  display: flex;
  flex: 1;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  gap: 2px;
}

.vol-dist-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.7);
  min-width: 20px;
  transition: all 0.3s;
}

.vol-dist-segment:hover {
  opacity: 0.8;
}

.trend-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trend-arrow {
  display: inline-block;
  width: 0;
  height: 0;
}

.trend-arrow.bullish {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid #10b981;
}

.trend-arrow.bearish {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #ef4444;
}

.trend-arrow.neutral {
  width: 10px;
  height: 2px;
  background: #6b7280;
}

.active-stock td {
  background: #0f1a2e !important;
  border-bottom-color: #1e3a5f !important;
}

.active-stock td:first-child {
  border-left: 2px solid #3b82f6;
}

.cost-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.cost-badge.below {
  background: #052e16;
  color: #10b981;
}

.cost-badge.slightly-below {
  background: #1e3a5f;
  color: #3b82f6;
}

.cost-badge.above {
  background: #451a03;
  color: #f97316;
}

.rsi-oversold {
  color: #10b981 !important;
  font-weight: 700;
}

.rsi-overbought {
  color: #ef4444 !important;
  font-weight: 700;
}

.stock-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #1a1a2e;
  border: 1px solid #2d2d44;
  color: #6b7280;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: #e0e0e0;
  border-color: #3b82f6;
}

.filter-btn.active {
  background: #1e3a5f;
  border-color: #3b82f6;
  color: #ffffff;
}

.vol-score-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vol-score-value {
  font-weight: 700;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  min-width: 28px;
}

.squeeze-score { color: #f59e0b; }
.high-score { color: #ef4444; }

.squeeze-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.squeeze-badge.strong {
  background: #78350f;
  color: #fbbf24;
}

.squeeze-badge.moderate {
  background: #451a03;
  color: #f59e0b;
}

.squeeze-badge.weak {
  background: #1a1a2e;
  color: #9ca3af;
}

.signal-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.signal-badge.strong {
  background: #052e16;
  color: #10b981;
}

.signal-badge.moderate {
  background: #1e3a5f;
  color: #3b82f6;
}

.signal-badge.weak {
  background: #1a1a2e;
  color: #6b7280;
}

.sortable::after {
  content: " \2195";
  font-size: 10px;
  color: #374151;
}

.sortable.sort-asc::after {
  content: " \2191";
  color: #3b82f6;
}

.sortable.sort-desc::after {
  content: " \2193";
  color: #3b82f6;
}

/* Stock Modal */

.stock-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.stock-modal-content {
  background: #0f0f18;
  border: 1px solid #1a1a2e;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
}

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

.stock-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

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

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

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-section {
  background: #0a0a0f;
  border: 1px solid #1a1a2e;
  border-radius: 8px;
  padding: 14px;
}

.detail-section h4 {
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #1a1a2e;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.detail-row span:first-child {
  color: #6b7280;
}

.detail-row span:last-child {
  color: #e0e0e0;
  font-weight: 600;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

.component-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 12px;
}

.comp-label {
  color: #6b7280;
  min-width: 90px;
}

.comp-value {
  color: #9ca3af;
  min-width: 50px;
  text-align: right;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

.comp-score {
  color: #e0e0e0;
  font-weight: 700;
  min-width: 28px;
  text-align: right;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

.signal-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #111119;
}

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

/* ===== RESPONSIVE ===== */

/* Tablo yatay scroll */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Genel overflow koruma */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 8px;
  overflow-x: hidden;
}

main {
  padding: 20px 16px;
  overflow-x: hidden;
}

/* Tablet */
@media (max-width: 1024px) {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .tool-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  nav {
    padding: 10px 16px;
  }
  .nav-links a {
    margin-left: 16px;
    font-size: 13px;
  }
}

/* Mobil */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .nav-links a {
    margin-left: 8px;
    font-size: 12px;
  }
  .nav-separator {
    display: none;
  }
  main {
    padding: 12px 8px;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .stat-card {
    padding: 10px 8px;
  }
  .stat-value {
    font-size: 16px;
  }
  .stat-label {
    font-size: 10px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .tool-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 12px;
  }
  .card-header {
    font-size: 11px;
    flex-direction: column;
    gap: 8px;
  }
  table {
    font-size: 12px;
  }
  th, td {
    padding: 6px 6px;
    white-space: nowrap;
  }
  .filters form {
    flex-wrap: wrap;
  }
  .symbol-dropdown {
    width: 100%;
  }
  .search-box {
    flex-direction: column;
  }
  .search-box input {
    max-width: 100%;
  }
  .market-switcher {
    order: -1;
  }
  .stock-modal-content {
    width: 95%;
    padding: 16px;
    max-height: 90vh;
  }
  #chart-container {
    height: 250px;
  }
  .depth-chart-container {
    height: 250px;
  }
  .stock-filters {
    gap: 4px;
  }
  .filter-btn {
    padding: 4px 10px;
    font-size: 11px;
  }
}

/* Küçük mobil */
@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .stat-value {
    font-size: 14px;
  }
  .nav-brand {
    font-size: 15px;
  }
  .market-tab {
    padding: 4px 10px !important;
    font-size: 11px !important;
  }
  .pagination a {
    padding: 4px 8px;
    font-size: 11px;
  }
}
