/* =============================================
   DESKTOP STYLES - Original Design
   ============================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #0a0a0f;
  background-image: 
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  color: #e0e0e5;
  min-height: 100vh;
  line-height: 1.5;
  font-size: 0.85rem;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(80, 120, 200, 0.12);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-bottom: 2rem;
}

.navbar .brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #6a88cc;
  box-shadow: 0 4px 12px rgba(106, 136, 204, 0.4);
  transition: all 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(106, 136, 204, 0.6);
}

.navbar .brand span {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6a88cc;
  letter-spacing: -0.5px;
}

.navbar .brand .mode-badge {
  background: linear-gradient(135deg, #ff6b8b, #ffa500);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: 0.5rem;
}

.help-btn {
  background: rgba(80, 120, 200, 0.1);
  border: 1px solid rgba(80, 120, 200, 0.2);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #6a88cc;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.help-btn:hover {
  background: rgba(80, 120, 200, 0.15);
  border-color: #6a88cc;
}

/* Container */
#container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Controls */
.controls {
  background: rgba(15, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
  border-radius: 18px;
  margin: 1.5rem 0;
  border: 1px solid rgba(80, 120, 200, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.control-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.control-group {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.control-group label {
  color: rgba(224, 224, 229, 0.7);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(80, 120, 200, 0.2);
  background: rgba(10, 10, 15, 0.8);
  color: #e0e0e5;
  transition: all 0.3s;
  font-family: 'JetBrains Mono', monospace;
}

input:focus, select:focus {
  outline: none;
  border-color: #6a88cc;
  box-shadow: 0 0 12px rgba(106, 136, 204, 0.3);
}

button {
  padding: 0.8rem 2rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:first-of-type {
  background: #6a88cc;
  color: white;
  box-shadow: 0 4px 12px rgba(106, 136, 204, 0.3);
}

button:first-of-type:hover {
  background: #5577bb;
  transform: translateY(-2px);
}

button:last-of-type {
  background: rgba(255, 107, 139, 0.2);
  color: #ff6b8b;
  border: 1px solid rgba(255, 107, 139, 0.3);
}

button:last-of-type:hover {
  background: rgba(255, 107, 139, 0.3);
}

.icon-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.2s;
}

.icon-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.icon-btn img {
  height: 36px;
  width: auto;
  display: block;
}

/* Banners */
.info-banner {
  background: rgba(80, 120, 200, 0.08);
  border: 1px solid rgba(80, 120, 200, 0.2);
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  margin: 1.2rem 0;
  text-align: center;
  color: #6a88cc;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
}

.warning-banner {
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid rgba(255, 165, 0, 0.3);
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  margin: 1.2rem 0;
  text-align: center;
  color: #ffa500;
  font-weight: 600;
  font-size: 0.82rem;
}

.live-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #6a88cc;
  border-radius: 50%;
  animation: pulse 2s infinite;
  margin-right: 0.5rem;
  box-shadow: 0 0 8px rgba(106, 136, 204, 0.5);
}

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

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

.stat-box {
  background: rgba(15, 15, 25, 0.8);
  padding: 1.2rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(80, 120, 200, 0.15);
  transition: all 0.3s;
}

.stat-box:hover {
  transform: translateY(-2px);
  border-color: #6a88cc;
  box-shadow: 0 8px 25px rgba(106, 136, 204, 0.2);
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(224, 224, 229, 0.6);
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6a88cc;
  font-family: 'JetBrains Mono', monospace;
}

#tpLiveIndicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin: auto;
  background: #333;
  opacity: 0.4;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
  transition: all 0.4s ease;
}

#tpLiveIndicator.active {
  background: #c00 !important;
  opacity: 1;
  box-shadow: 0 0 20px 4px #f00, 0 0 30px 8px rgba(255,0,0,0.8);
  transform: scale(1.4);
  animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 20px 4px #f00, 0 0 30px 8px rgba(255,0,0,0.8); }
  50% { box-shadow: 0 0 30px 10px #f00, 0 0 40px 15px rgba(255,0,0,0.8); }
}

/* Imbalance Bar */
.imbalance-bar {
  height: 45px;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  margin: 1.5rem 0;
  border: 1px solid rgba(80, 120, 200, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.imbalance-buy {
  background: linear-gradient(90deg, #6a88cc, #5577bb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: width 0.5s ease;
  color: white;
}

.imbalance-sell {
  background: linear-gradient(90deg, #ff6b8b, #ff4a6b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: width 0.5s ease;
  color: white;
}

/* Alert Box */
.alert-box {
  padding: 1.2rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid;
  transition: all 0.5s ease;
}

.alert-box.bullish {
  background: rgba(106, 136, 204, 0.1);
  border-color: #6a88cc;
  color: #6a88cc;
}

.alert-box.bearish {
  background: rgba(255, 107, 139, 0.1);
  border-color: #ff6b8b;
  color: #ff6b8b;
}

.alert-box.neutral {
  background: rgba(224, 224, 229, 0.05);
  border-color: rgba(224, 224, 229, 0.2);
  color: rgba(224, 224, 229, 0.6);
}

/* Containers */
.trade-signals-container {
  background: rgba(15, 15, 25, 0.8);
  border: 1px solid rgba(80, 120, 200, 0.15);
  border-radius: 18px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.section-header {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(80, 120, 200, 0.2);
  position: sticky;
  top: 0;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.section-header.buy { color: #6a88cc; }
.section-header.sell { color: #ff6b8b; }

/* Signal Cards */
.signal-card {
  background: rgba(20, 20, 35, 0.8);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  border: 2px solid;
  transition: all 0.3s ease;
}

.signal-card.long {
  border-color: rgba(106, 136, 204, 0.4);
  background: rgba(106, 136, 204, 0.05);
}

.signal-card.short {
  border-color: rgba(255, 107, 139, 0.4);
  background: rgba(255, 107, 139, 0.05);
}

.signal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(106, 136, 204, 0.3);
}

.signal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.signal-reason {
  background: rgba(80, 120, 200, 0.08);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  color: rgba(224, 224, 229, 0.9);
  font-size: 0.9rem;
  border-left: 3px solid #6a88cc;
}

.signal-levels {
  margin: 1.5rem 0;
}

.level-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  margin: 0.5rem 0;
  background: rgba(10, 10, 15, 0.6);
  border-radius: 8px;
  border-left: 3px solid rgba(80, 120, 200, 0.3);
}

.level-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(224, 224, 229, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.level-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
}

.level-value.entry { color: #6a88cc; }
.level-value.stop { color: #ff6b8b; }
.level-value.target { color: #6a88cc; }

.level-value small {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-left: 0.5rem;
}

.signal-rr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.rr-box {
  background: rgba(80, 120, 200, 0.08);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(80, 120, 200, 0.15);
}

.rr-label {
  font-size: 0.75rem;
  color: rgba(224, 224, 229, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.rr-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

/* Walls */
.wall-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.wall-section {
  background: rgba(15, 15, 25, 0.8);
  border: 1px solid rgba(80, 120, 200, 0.15);
  border-radius: 18px;
  padding: 1.5rem;
  min-height: 500px;
  max-height: 700px;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.wall-section::-webkit-scrollbar {
  width: 10px;
}

.wall-section::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 5px;
}

.wall-section::-webkit-scrollbar-thumb {
  background: #6a88cc;
  border-radius: 5px;
}

.wall-item {
  padding: 1.2rem;
  padding-right: 3.5rem;
  border-radius: 12px;
  margin: 1rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.wall-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(106, 136, 204, 0.3);
}

.wall-item.buy {
  background: rgba(106, 136, 204, 0.08);
  border-left: 4px solid #6a88cc;
}

.wall-item.sell {
  background: rgba(255, 107, 139, 0.08);
  border-left: 4px solid #ff6b8b;
}

.wall-item.spoofing {
  animation: spoofingFlash 1s infinite;
  border-left: 4px solid #ffa500;
}

@keyframes spoofingFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.wall-item.out-of-range {
  opacity: 0.6;
  border-left-style: dashed;
}

.whale-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  line-height: 1;
  z-index: 1;
}

.wall-header {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 2.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wall-item.buy .wall-header { color: #6a88cc; }
.wall-item.sell .wall-header { color: #ff6b8b; }

.wall-price {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0.8rem 0;
  font-family: 'JetBrains Mono', monospace;
}

.wall-detail {
  font-size: 0.85rem;
  margin: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wall-detail:last-child {
  border-bottom: none;
}

.wall-detail-label {
  color: rgba(224, 224, 229, 0.6);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wall-detail-value {
  font-weight: 700;
  color: #6a88cc;
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
}

.size-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0.2rem;
}

.size-mega {
  background: rgba(255, 107, 139, 0.2);
  color: #ff6b8b;
  border: 1px solid rgba(255, 107, 139, 0.3);
}

.size-large {
  background: rgba(255, 165, 0, 0.2);
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.3);
}

.size-medium {
  background: rgba(106, 136, 204, 0.2);
  color: #6a88cc;
  border: 1px solid rgba(106, 136, 204, 0.3);
}

.spoofing-badge {
  background: rgba(255, 165, 0, 0.3);
  color: #ffa500;
  border: 1px solid #ffa500;
  animation: pulse 1s infinite;
}

/* History */
.history-container {
  background: rgba(15, 15, 25, 0.8);
  border: 1px solid rgba(80, 120, 200, 0.15);
  border-radius: 18px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-height: 600px;
  overflow-y: auto;
}

.history-container::-webkit-scrollbar {
  width: 10px;
}

.history-container::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 5px;
}

.history-container::-webkit-scrollbar-thumb {
  background: #6a88cc;
  border-radius: 5px;
}

.history-item {
  background: rgba(20, 20, 35, 0.6);
  border-radius: 10px;
  padding: 1rem;
  margin: 0.8rem 0;
  border-left: 3px solid;
  transition: all 0.3s ease;
}

.history-item:hover {
  transform: translateX(5px);
  background: rgba(20, 20, 35, 0.8);
}

.history-item.long {
  border-left-color: #6a88cc;
}

.history-item.short {
  border-left-color: #ff6b8b;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.history-details {
  font-size: 0.85rem;
  color: rgba(224, 224, 229, 0.8);
  line-height: 1.6;
}

.history-details span {
  display: inline-block;
  margin-right: 1rem;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: rgba(224, 224, 229, 0.4);
  font-size: 1.1rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: rgba(15, 15, 25, 0.98);
  backdrop-filter: blur(12px);
  margin: 2% auto;
  padding: 2rem;
  border: 1px solid rgba(80, 120, 200, 0.15);
  border-radius: 18px;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: slideDown 0.4s;
}

@keyframes slideDown {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-content::-webkit-scrollbar {
  width: 10px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #6a88cc;
  border-radius: 5px;
}

.close-btn {
  color: rgba(255,255,255,0.4);
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  line-height: 1;
}

.close-btn:hover {
  color: #ff6b8b;
}

.modal-header {
  color: #6a88cc;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  clear: both;
  font-weight: 700;
}
