@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Ultra-Sophisticated Rise/Fall Trading Platform Variables */
:root {
  --primary-blue: #1a365d;
  --secondary-blue: #2563eb;
  --accent-blue: #3b82f6;
  --light-blue: #60a5fa;
  --dark-navy: #0f172a;
  --slate: #1e293b;
  --light-slate: #475569;
  --white: #ffffff;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --glass-bg: rgba(15, 23, 42, 0.85);
  --glass-light: rgba(59, 130, 246, 0.08);
  --glass-medium: rgba(59, 130, 246, 0.12);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(255, 255, 255, 0.2);
  --shadow-compact: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 12px rgba(59, 130, 246, 0.4);
  --shadow-active: 0 8px 20px rgba(59, 130, 246, 0.3);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.4);
  --gradient-primary: linear-gradient(135deg, #1a365d 0%, #2563eb 50%, #3b82f6 100%);
  --gradient-accent: linear-gradient(45deg, #3b82f6 0%, #60a5fa 100%);
  --gradient-black: linear-gradient(135deg, #000000 0%, #1f2937 50%, #374151 100%);
  --gradient-success: linear-gradient(135deg, #065f46 0%, #10b981 50%, #34d399 100%);
  --gradient-danger: linear-gradient(135deg, #7f1d1d 0%, #ef4444 50%, #f87171 100%);
  --gradient-shimmer: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 30%, #334155 60%, #475569 100%);
  color: var(--white);
  font-size: 10px;
  position: relative;
}

/* Static Background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 40% 60%, rgba(239, 68, 68, 0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
  padding: 6px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  gap: 4px;
}

/* Header */
.inline-container {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--glass-light);
  backdrop-filter: blur(15px) saturate(1.3);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  box-shadow: 
    var(--shadow-compact),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-bottom: 2px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.inline-container:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 
    var(--shadow-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Ultra-Premium Select Styling */
#symbolInput {
  flex: 1;
  min-width: 100px;
  padding: 4px 6px;
  font-size: 8px;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--dark-navy) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1px solid var(--slate);
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

#symbolInput::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 6px;
  background: var(--gradient-primary);
  opacity: 0;
  z-index: -1;
}

#symbolInput:hover, #symbolInput:focus {
  border-color: var(--accent-blue);
  box-shadow:
    0 0 0 2px rgba(59, 130, 246, 0.3),
    inset 0 1px 3px rgba(0, 0, 0, 0.3),
    var(--shadow-glow);
}

#symbolInput:focus::before {
  opacity: 0.1;
}

/* Advanced Input Styling */
#digitsInput {
  width: 50px;
  padding: 4px;
  font-size: 8px;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--dark-navy) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1px solid var(--slate);
  border-radius: 6px;
  text-align: center;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

#digitsInput:hover, #digitsInput:focus {
  border-color: var(--accent-blue);
  box-shadow:
    0 0 0 2px rgba(59, 130, 246, 0.3),
    inset 0 1px 3px rgba(0, 0, 0, 0.3),
    var(--shadow-glow);
}



.small-buttons-container,
.medium-buttons-container {
  display: flex;
  gap: 2px;
  
}

.small-button,
.medium-button {
  padding: 3px 6px;
  font-size: 7px;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--dark-navy) 0%, var(--slate) 100%);
  border: 1px solid var(--light-slate);
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-compact);
}


.small-button::before,
.medium-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  z-index: -1;
}


.small-button::after,
.medium-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.small-button:hover::before,
.medium-button:hover::before {
  left: 100%;
}

.small-button:hover,
.medium-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-hover);
  background: var(--gradient-accent);
}

.small-button:active::after,
.medium-button:active::after {
  width: 100px;
  height: 100px;
}

.small-button.clicked,
.medium-button.clicked {
  background: var(--gradient-success);
  border-color: var(--success);
}




/* Percentage Display Container - After small buttons */

#percentageDisplay {
  font-size: 9px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 8px;
  min-width: 120px;
  text-align: center;
  background: linear-gradient(90deg, rgba(59,130,246,0.06), rgba(59,130,246,0.03));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-compact);
}

/* Data Display Section */
.data-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px;
  background: var(--glass-light);
  backdrop-filter: blur(15px) saturate(1.3);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-compact);
}
/* Combined Button Percentage Styles */
.button-sections-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

.button-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  padding: 5px 2px;
}

.section-label {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 2px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.section-percentage {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}

/* Even section (RISE) styling */
#evenSection {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

/* Odd section (FALL) styling */
#oddSection {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* Hover effects */
.button-section:hover {
  transform: scale(1.02);
  z-index: 2;
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* Active state */
.button-section.active {
  box-shadow: inset 0 0 15px rgba(0,0,0,0.3);
}

/* Advanced Price Display */
#priceDisplay {
  font-size: 10px;
  font-weight: 800;
  color: var(--white);
  text-align: center;
  padding: 6px 10px;
  background: var(--glass-medium);
  backdrop-filter: blur(10px);
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-compact);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  margin: 0;
}

/* Ultra-Premium Last Digits List */
#lastDigitsList {
  font-size: 7px;
  font-weight: 600;
  font-family: 'Monaco', 'Consolas', monospace;
  line-height: 1.3;
  padding: 4px;
  margin: 1px 0;
  background: var(--glass-medium);
  backdrop-filter: blur(12px);
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  box-shadow: 
    var(--shadow-compact),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: var(--white);
  text-align: center;
  letter-spacing: 0.3px;
  position: relative;
}


/* Chart Toggle Section */
.chart-toggle-container {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  margin: 2px 0;
}

.chart-toggle {
  display: flex;
  background: var(--glass-light);
  border-radius: 6px;
  padding: 2px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-compact);
}

.chart-toggle-btn {
  padding: 4px 12px;
  font-size: 8px;
  font-weight: 600;
  background: transparent;
  color: var(--white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.chart-toggle-btn:hover {
  background: rgba(59, 130, 246, 0.2);
}

.chart-toggle-btn.active {
  background: var(--gradient-primary);
  box-shadow: var(--shadow-active);
}

/* Chart Section - Maximum Space */
.chart-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chart-frame, .chart-container {
  flex: 1;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-compact);
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  overflow: hidden;
  display: none;
  min-height: 0;
}

.chart-frame.active, .chart-container.active {
  display: block;
}

.chart-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

#barChartContainer {
  position: relative;
  padding: 8px;
}

#barChart {
  width: 100% !important;
  height: 100% !important;
}

/* Rise/Fall specific styling with Arrow Symbols */
span[style*="color: blue"] {
  color: transparent !important;
  text-shadow: none;
  font-weight: 700;
  font-size: 11px;
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  text-align: center;
}

span[style*="color: blue"]:before {
  content: "↑";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--success);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
  font-size: 12px;
  font-weight: 900;
}

span[style*="color: red"] {
  color: transparent !important;
  text-shadow: none;
  font-weight: 700;
  font-size: 11px;
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  text-align: center;
}

span[style*="color: red"]:before {
  content: "↓";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--danger);
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  font-size: 12px;
  font-weight: 900;
}

/* Select Options Styling */
select option {
  background: var(--dark-navy);
  color: var(--white);
  padding: 4px;
  border: none;
  font-size: 8px;
  font-weight: 500;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .inline-container {
    flex-wrap: wrap;
    gap: 4px;
  }
  
  #symbolInput {
    min-width: 100px;
    font-size: 8px;
    padding: 4px 6px;
  }

  #digitsInput {
    width: 45px;
    font-size: 8px;
    padding: 4px;
  }
  
  .small-button {
    padding: 3px 6px;
    font-size: 7px;
  }
  
  .percentage-container {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    margin-top: 2px;
  }
  
  #percentageDisplay {
    font-size: 7px;
    padding: 3px 6px;
    min-width: 110px;
  }
  
  .data-section {
    padding: 4px;
  }
  
  #priceDisplay {
    font-size: 9px;
    padding: 4px 8px;
  }
  
  #lastDigitsList {
    font-size: 7px;
    padding: 4px;
  }
  
  .chart-toggle-btn {
    padding: 3px 10px;
    font-size: 7px;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 4px;
    gap: 3px;
  }
  
  .inline-container {
    padding: 4px;
    gap: 3px;
  }
  
  #symbolInput {
    font-size: 7px;
    padding: 3px 5px;
  }

  #digitsInput {
    width: 40px;
    font-size: 7px;
    padding: 3px;
  }
  
  .small-button {
    padding: 2px 4px;
    font-size: 6px;
  }
  
  #percentageDisplay {
    font-size: 6px;
    padding: 2px 4px;
    min-width: 100px;
  }

  #lastDigitsList {
    font-size: 6px;
    padding: 3px;
  }
}

@media screen and (max-width: 360px) {
  .inline-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  #symbolInput {
    min-width: 100%;
  }
  
  .small-buttons-container {
    justify-content: center;
  }
  
  .percentage-container {
    justify-content: center;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--glass-bg);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(59, 130, 246, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--light-blue);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.7);
}