/* Modern Professional Demo Exchange Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Theme */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --dark-bg: #0f0f1e;
  --light-bg: #1a1a2e;
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent-color: #667eea;
  --accent-hover: #764ba2;
  --success-color: #4ade80;
  --error-color: #f87171;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  --blur: blur(10px);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Modern Gradient Mesh Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(125deg, #1a1a2e 0%, #0f0f1e 40%, #16213e 100%);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at top left, rgba(102, 126, 234, 0.15) 0%, transparent 40%),
    radial-gradient(ellipse at bottom right, rgba(240, 147, 251, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at center, rgba(118, 75, 162, 0.05) 0%, transparent 70%);
  z-index: -1;
}

/* Subtle floating orbs */
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  33% { transform: translateY(-20px) translateX(10px); }
  66% { transform: translateY(10px) translateX(-5px); }
}

.floating-orb {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.3;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.orb-2 {
  background: radial-gradient(circle, rgba(240, 147, 251, 0.4) 0%, transparent 70%);
  bottom: 20%;
  right: 10%;
  animation-delay: 7s;
}

.orb-3 {
  background: radial-gradient(circle, rgba(118, 75, 162, 0.4) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 14s;
}

/* Navigation Bar */
.nav-bar {
  background: rgba(26, 26, 46, 0.8);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideDown 0.5s ease-out;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-bar a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-right: 1.5rem;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  margin-right: 0;
}

.nav-bar a::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.nav-bar a:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

.nav-bar a:hover::before {
  width: 100%;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero .sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@media (min-width: 1024px) {
  .hero {
    padding: 2.5rem 2rem;
    min-height: calc(100vh - 200px);
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .sub {
    font-size: 1rem;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Info Section */
.info {
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  margin: 1.5rem auto;
  max-width: 800px;
  box-shadow: var(--shadow);
  animation: fadeInScale 0.8s ease-out 0.4s both;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(102, 126, 234, 0.3);
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Form Styling */
.form-page {
  width: 100%;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.form-page > div {
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 2rem;
  animation: fadeInScale 0.6s ease-out;
  width: 100%;
  max-width: 450px;
}

.form-page h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-page label {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-page input[type="text"],
.form-page input[type="password"],
.form-page input[type="number"],
.form-page select {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-page input:focus,
.form-page select:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button Styling */
button {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 0.75rem;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.5s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

button:hover::before {
  left: 100%;
}

button:active {
  transform: translateY(0);
}

/* Dashboard and Page Styling */
.dashboard, .support-page {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.desktop-optimized {
  min-height: calc(100vh - 250px);
}

.dashboard h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.6s ease-out;
}

.dashboard h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 1rem;
  color: var(--text-primary);
}

#balances {
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  animation: fadeInScale 0.6s ease-out 0.2s both;
}

#balances p {
  font-size: 1rem;
  margin: 0.5rem 0;
  color: var(--text-primary);
}

.dashboard form {
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  animation: fadeInScale 0.6s ease-out 0.4s both;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard form:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
}

.dashboard label {
  display: inline-block;
  margin-right: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.dashboard input[type="number"],
.dashboard select {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.dashboard input[type="number"]:focus,
.dashboard select:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.08);
}

/* Message Card */
.message {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeInScale 0.6s ease-out;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.message h2 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.message p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0.75rem 0;
}

.message strong {
  color: var(--text-primary);
}

.message a {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.message a:hover {
  color: var(--accent-hover);
  transform: translateX(5px);
}

/* Main Content Area */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 2rem;
}

/* Footer */
.footer {
  background: rgba(26, 26, 46, 0.8);
  backdrop-filter: var(--blur);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-align: center;
  padding: 1.5rem 0;
  margin-top: auto;
  position: relative;
}

/* Loading Animation */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    padding-bottom: 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .nav-bar {
    padding: 1rem;
  }
  
  .nav-bar a {
    margin-right: 1rem;
    font-size: 0.9rem;
  }
  
  .form-page,
  .dashboard,
  .message {
    margin: 2rem auto;
    padding: 1.5rem;
  }
  
  .dashboard form {
    padding: 1.5rem;
  }
  
  .desktop-optimized {
    min-height: auto;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) rgba(255, 255, 255, 0.05);
}

/* Success/Error States */
.success {
  color: var(--success-color);
  font-weight: 500;
}

.error {
  color: var(--error-color);
  font-weight: 500;
}

/* Pulse Animation for Important Elements */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Glow Effect for Inputs */
input[type="number"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Dropdown Styling Fix */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(160, 160, 160, 0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem !important;
}

select option {
  background: var(--dark-bg);
  color: var(--text-primary);
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

/* Gradient Text Animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-text {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}