@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Ultra-Sophisticated Trading Platform Variables - Using Theme CSS */
/* Variables are now defined in ../theme.css */

* {
  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, #000000 0%, #0a0a0a 30%, #1a1a1a 60%, #2a2a2a 100%);
  color: var(--white);
  font-size: 10px;
  position: relative;
}

/* Sophisticated Background Animation */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(22, 163, 74, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 40% 60%, rgba(74, 222, 128, 0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
  animation: backgroundShift 20s ease-in-out infinite;
}

/* Floating Particles */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(34, 197, 94, 0.3), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(22, 163, 74, 0.3), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(74, 222, 128, 0.3), transparent),
    radial-gradient(1px 1px at 60% 10%, rgba(34, 197, 94, 0.3), transparent);
  background-repeat: repeat;
  background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px;
  animation: particleFloat 40s linear infinite;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
  padding: 4px;
  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);
  animation: containerGlow 3s ease-in-out infinite;
}

/* Premium Header with Advanced Animations */
.input-container {
  display: flex;
  align-items: center;
  gap: 4px;
  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),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-bottom: 4px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  animation: slideDown 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.input-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-shimmer);
  animation: shimmer 3s ease-in-out infinite;
}

.input-container:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 
    var(--shadow-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* 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;
  transition: var(--transition-spring);
  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;
  transition: var(--transition-smooth);
  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);
  transform: scale(1.02) translateY(-1px);
}

#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;
  transition: var(--transition-spring);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
}

#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);
  transform: scale(1.05);
}

#digitsInput:focus {
  animation: inputPulse 0.6s ease-out;
}

/* Sophisticated Button Styling */
.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: var(--gradient-primary);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-spring);
  box-shadow: 
    var(--shadow-compact),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.small-button::before,
.medium-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-shimmer);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 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: 120%;
  height: 120%;
}

.small-button.clicked,
.medium-button.clicked {
  background: var(--gradient-success);
  transform: scale(0.95);
  animation: buttonSuccess 0.4s ease-out;
}

/* Advanced Percentage Display */
.percentage {
  display: flex;
  gap: 1px;
  margin: 2px 0;
  border-radius: 6px;
  overflow: hidden;
  animation: slideUp 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-compact);
}

#evenPercentage,
#oddPercentage {
  flex: 1;
  padding: 4px 8px;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition-spring);
  position: relative;
  overflow: hidden;
}

#evenPercentage::before,
#oddPercentage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-100%);
  transition: transform 0.8s ease-out;
}

#evenPercentage {
  background: var(--gradient-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#oddPercentage {
  background: var(--gradient-black);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#evenPercentage:hover,
#oddPercentage:hover {
  transform: scale(1.08) translateY(-1px);
  z-index: 2;
  box-shadow: var(--shadow-active);
}

#evenPercentage:hover::before,
#oddPercentage:hover::before {
  transform: translateX(100%);
}

/* Premium Price Display */
#priceDisplay {
  font-size: 9px;
  font-weight: 700;
  color: var(--light-blue);
  text-align: center;
  padding: 3px;
  background: var(--glass-light);
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  margin: 2px 0;
  animation: priceGlow 2s ease-in-out infinite;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    var(--shadow-compact);
  position: relative;
  overflow: hidden;
}

#priceDisplay::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
  animation: priceUpdate 3s ease-in-out infinite;
}

/* Chart Container with Advanced Effects */
.chartcont {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}

.chartContainer {
  flex: 1;
  background: var(--glass-light);
  backdrop-filter: blur(15px) saturate(1.2);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  padding: 4px;
  position: relative;
  overflow: hidden;
  min-height: 0;
  animation: chartReveal 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 
    var(--shadow-compact),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.chartContainer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 8px 8px 0 0;
  animation: chartProgress 2s ease-in-out infinite;
}

.chartContainer::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

#evenOddChart,
#barGraph {
  cursor: crosshair;
  width: 100% !important;
  height: 100% !important;
  transition: var(--transition-smooth);
}

#evenOddChart:hover,
#barGraph:hover {
  filter: brightness(1.1) contrast(1.05);
}

/* Sophisticated Last Digits Display */
#lastDigitsList {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  background: var(--glass-light);
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  max-height: 60px;
  overflow-y: auto;
  margin: 2px 0;
  animation: digitsReveal 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    var(--shadow-compact);
}

#lastDigitsList li {
  list-style: none;
  padding: 2px 4px;
  font-size: 7px;
  font-weight: 700;
  border-radius: 3px;
  transition: var(--transition-bounce);
  cursor: pointer;
  min-width: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: var(--white) !important; /* Force white text for E and O */
}

#lastDigitsList li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#lastDigitsList li:hover {
  transform: scale(1.25) translateY(-2px) rotate(2deg);
  z-index: 2;
  box-shadow: var(--shadow-hover);
}

#lastDigitsList li:hover::before {
  transform: scale(2);
}

#lastDigitsList li[style*="blue"] {
  background: var(--gradient-primary);
  color: var(--white) !important;
  border: 1px solid var(--accent-blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#lastDigitsList li[style*="red"] {
  background: var(--gradient-black);
  color: var(--white) !important;
  border: 1px solid #374151;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Premium Sequence Container */
#sequenceCountsContainer {
  padding: 6px;
  background: var(--glass-light);
  backdrop-filter: blur(15px) saturate(1.2);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  margin: 2px 0;
  max-height: 100px;
  overflow-y: auto;
  animation: sequenceSlide 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    var(--shadow-compact);
}

#sequenceCountsLabel {
  font-size: 9px;
  font-weight: 800;
  color: var(--light-blue);
  margin-bottom: 4px;
  text-align: center;
  animation: labelGlow 2s ease-in-out infinite;
}

#sequenceCountsList {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#sequenceCountsList li {
  padding: 3px 6px;
  background: var(--glass-medium);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  font-size: 7px;
  font-weight: 600;
  transition: var(--transition-spring);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

#sequenceCountsList li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

#sequenceCountsList li:hover {
  background: var(--glass-border-hover);
  transform: translateX(4px) scale(1.02);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-hover);
  color: var(--white);
}

#sequenceCountsList li:hover::before {
  width: 100%;
}

/* Advanced Progress Bar */
.progress {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  width: 2px;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
}

.bar {
  display: block;
  height: 0;
  width: 100%;
  background: var(--gradient-primary);
  box-shadow: 
    0 0 8px rgba(59, 130, 246, 0.8),
    0 0 16px rgba(59, 130, 246, 0.4);
  transition: height 0.2s ease;
  position: relative;
}

.bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.8) 0%, transparent 70%);
  filter: blur(4px);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: var(--dark-navy);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(59, 130, 246, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-accent);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
}

/* Select Options */
select option {
  background: var(--dark-navy);
  color: var(--white);
  padding: 4px;
    font-size: 8px;
  font-weight: 600;
  }

/* Advanced Animations */
@keyframes backgroundShift {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(-20px) translateY(-10px); }
  50% { transform: translateX(20px) translateY(10px); }
  75% { transform: translateX(-10px) translateY(20px); }
}

@keyframes particleFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-100vh) rotate(360deg); }
}

@keyframes containerGlow {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 20px rgba(59, 130, 246, 0.1); }
}

@keyframes shimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideUp {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes digitsReveal {
  0% { opacity: 0; transform: translateX(-20px) scale(0.9); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes sequenceSlide {
  0% { opacity: 0; transform: translateX(20px) scale(0.9); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes chartReveal {
  0% { opacity: 0; transform: scale(0.9) rotateX(10deg); }
  100% { opacity: 1; transform: scale(1) rotateX(0deg); }
}

@keyframes priceGlow {
  0%, 100% { 
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-compact);
  }
  50% { 
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--shadow-compact), 0 0 10px rgba(59, 130, 246, 0.3);
  }
}

@keyframes priceUpdate {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

@keyframes chartProgress {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(1.1); }
}

@keyframes labelGlow {
  0%, 100% { text-shadow: 0 0 5px rgba(96, 165, 250, 0.5); }
  50% { text-shadow: 0 0 10px rgba(96, 165, 250, 0.8), 0 0 20px rgba(96, 165, 250, 0.4); }
}

@keyframes inputPulse {
  0% { transform: scale(1.05); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4); }
  100% { transform: scale(1.05); }
}

@keyframes buttonSuccess {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.05); }
  100% { transform: scale(0.95); }
}

/* Mobile Optimization for Iframe */
@media screen and (max-width: 480px) {
  .container {
    padding: 2px;
  }

  .input-container {
    padding: 4px;
    gap: 2px;
  }
  
  #symbolInput {
    font-size: 7px;
    padding: 3px 4px;
    min-width: 80px;
  }

  #digitsInput {
    width: 40px;
    font-size: 7px;
    padding: 3px;
}
  
  .small-button,
  .medium-button {
    padding: 2px 4px;
    font-size: 6px;
  }
  
  #evenPercentage,
  #oddPercentage {
    padding: 3px 6px;
    font-size: 7px;
  }
  
  #priceDisplay {
    font-size: 8px;
    padding: 2px;
  }
  
  .chartContainer {
    padding: 2px;
  }
  
  #lastDigitsList {
    max-height: 40px;
    padding: 2px;
    gap: 1px;
  }
  
  #lastDigitsList li {
    padding: 1px 3px;
    font-size: 6px;
    min-width: 10px;
  }
  
  #sequenceCountsContainer {
    padding: 4px;
    max-height: 80px;
  }
  
  #sequenceCountsLabel {
    font-size: 8px;
  }
  
  #sequenceCountsList li {
    padding: 2px 4px;
    font-size: 6px;
  }
}

/* Extra Small Screens */
@media screen and (max-width: 360px) {
  .container {
    padding: 1px;
  }
  
  .input-container {
    padding: 2px;
  }
  
  #symbolInput {
    font-size: 6px;
    min-width: 60px;
  }
  
  #digitsInput {
    width: 30px;
    font-size: 6px;
  }
  
  .small-button,
  .medium-button {
    padding: 1px 3px;
    font-size: 5px;
  }

  #lastDigitsList {
    max-height: 30px;
}

#lastDigitsList li {
    font-size: 5px;
    min-width: 8px;
}
}

/* Hide unused elements for space efficiency */
table,
#lastDigitsContainer {
  display: none !important;
}

