@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: #000000;
  color: white;
  overflow-x: hidden;
  line-height: 1.6;
}

#renderDiv {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Dark green, gold, black, gray color palette */
.bg-animated {
  background: linear-gradient(-45deg, #000000, #1a1a1a, #1a4a1a, #2a3a2a, #333333, #1a4a1a, #8b6914);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

/* Glass morphism with dark green/gold theme */
.glass-card {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: 20px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(184, 134, 11, 0.1) inset;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 134, 11, 0.4), transparent);
}

/* Gold glow effects */
.glow-box {
  box-shadow: 
    0 0 20px rgba(184, 134, 11, 0.3),
    0 0 40px rgba(184, 134, 11, 0.2),
    0 0 60px rgba(184, 134, 11, 0.1);
  transition: box-shadow 0.3s ease;
}

.glow-box:hover {
  box-shadow: 
    0 0 30px rgba(184, 134, 11, 0.5),
    0 0 60px rgba(184, 134, 11, 0.3),
    0 0 90px rgba(184, 134, 11, 0.2);
}

.glow-text {
  background: linear-gradient(45deg, #b8860b, #ffffff, #ffd700, #b8860b);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 300% 300%;
  animation: textShine 4s ease-in-out infinite;
  display: inline-block;
  text-shadow: 0 0 30px rgba(184, 134, 11, 0.5);
}

@keyframes textShine {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Spinner with gold accent */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  animation: spin 1s linear infinite;
  filter: drop-shadow(0 0 5px currentColor);
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
  50% { 
    transform: scale(1.02);
    opacity: 0.9;
    filter: brightness(1.1);
  }
}

.pulse-animation {
  animation: pulse 2.5s ease-in-out infinite;
}

/* Fade in animation */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95); 
    filter: blur(5px);
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
    filter: blur(0px);
  }
}

.fade-in {
  animation: fadeIn 1s ease-out forwards;
  opacity: 0;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* Responsive text */
.text-responsive {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .text-responsive {
    font-size: 3.5rem;
  }
}

@media (min-width: 1024px) {
  .text-responsive {
    font-size: 4rem;
  }
}

/* Gold network indicator */
.network-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd700, #b8860b);
  animation: networkPulse 2s ease-in-out infinite;
  display: inline-block;
  margin-right: 8px;
  box-shadow: 
    0 0 10px rgba(184, 134, 11, 0.6),
    0 0 20px rgba(184, 134, 11, 0.3);
}

@keyframes networkPulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 
      0 0 10px rgba(184, 134, 11, 0.6),
      0 0 20px rgba(184, 134, 11, 0.3);
  }
  50% { 
    transform: scale(1.5);
    box-shadow: 
      0 0 20px rgba(184, 134, 11, 0.8),
      0 0 40px rgba(184, 134, 11, 0.5);
  }
}

/* Button hover effects with dark green/gold */
.btn-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background-size: 200% 100%;
}

.btn-hover:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 10px 30px rgba(184, 134, 11, 0.4),
    0 0 0 1px rgba(184, 134, 11, 0.3) inset;
  background-position: 100% 0;
}

.btn-hover:active {
  transform: translateY(-1px);
}

/* Card hover effects */
.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 
    0 15px 45px rgba(26, 74, 26, 0.4),
    0 0 0 1px rgba(184, 134, 11, 0.3) inset,
    0 5px 15px rgba(0, 0, 0, 0.3);
  border-color: rgba(184, 134, 11, 0.5);
}

/* Error styling with proper colors */
.error-border {
  border-color: #ef4444 !important;
  box-shadow: 
    0 0 15px rgba(239, 68, 68, 0.4),
    0 0 30px rgba(239, 68, 68, 0.2) !important;
  animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Enhanced input styling */
input[type="text"] {
  color: white !important;
  background: rgba(0, 0, 0, 0.7) !important;
  transition: all 0.4s ease;
  border-radius: 12px !important;
}

input[type="text"]:focus {
  outline: none !important;
  border-color: #b8860b !important;
  box-shadow: 
    0 0 0 3px rgba(184, 134, 11, 0.3),
    0 0 20px rgba(184, 134, 11, 0.2) !important;
  transform: scale(1.02);
  background: rgba(0, 0, 0, 0.8) !important;
}

input[type="text"]::placeholder {
  color: rgba(156, 163, 175, 0.8) !important;
}

/* Scrollbar with gold theme */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 26, 26, 0.6);
  border-radius: 6px;
  border: 1px solid rgba(184, 134, 11, 0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #ffd700, #b8860b);
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(184, 134, 11, 0.3);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #b8860b, #ffd700);
  box-shadow: 0 0 15px rgba(184, 134, 11, 0.5);
}

/* Fixed footer */
.footer-fixed {
  margin-top: auto;
  padding: 2.5rem 1rem;
  text-align: center;
  border-top: 1px solid rgba(184, 134, 11, 0.2);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

.footer-fixed p {
  margin-bottom: 0.75rem;
}

.footer-fixed .text-xs p {
  margin-bottom: 0;
}

/* Container improvements */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.text-overlay-fix {
  position: relative;
  z-index: 2;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
  text-rendering: optimizeLegibility;
}

/* Link styling with gold theme */
a {
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  text-shadow: 0 0 10px currentColor;
  transform: translateY(-1px);
}

/* Button improvements */
button {
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  border-radius: 12px;
  font-weight: 600;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .glass-card {
    padding: 1.25rem;
    margin: 0.75rem 0;
    border-radius: 16px;
  }
  
  .text-responsive {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .grid {
    gap: 1rem;
  }
  
  .container {
    padding: 0 0.75rem;
  }
}

/* Accessibility improvements */
*:focus {
  outline: 2px solid rgba(184, 134, 11, 0.7);
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus,
input:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(184, 134, 11, 0.5),
    0 0 15px rgba(184, 134, 11, 0.3);
}

/* Performance optimizations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform, opacity;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .animate-pulse,
  .pulse-animation,
  .network-dot,
  .glow-text {
    animation: none;
  }
  
  .card-hover:hover {
    transform: translateY(-2px);
  }
}