/* Esoteric Runes - Enhanced Styles with Crystal Ball */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --dark-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --purple-glow: 0 0 30px rgba(138, 43, 226, 0.3);
  --blue-glow: 0 0 30px rgba(30, 144, 255, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--dark-bg);
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  background-attachment: fixed;
}

/* Decorative Background Elements */
.decorative-element {
  position: absolute;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 10;
}

/* Header Styles */
.header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.header-icon {
  background: var(--primary-gradient);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: var(--purple-glow);
}

.header-icon svg {
  width: 32px;
  height: 32px;
  color: #ffd700;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #e0b0ff, #8a2be2, #4169e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.1rem;
  color: #b0b0b0;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Question Form */
.question-form {
  max-width: 600px;
  margin: 0 auto 3rem;
}

.form-card {
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.form-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #d8bfd8;
}

.question-input {
  width: 100%;
  height: 120px;
  padding: 1rem;
  background: rgba(10, 10, 20, 0.7);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  resize: none;
  transition: all 0.3s ease;
}

.question-input::placeholder {
  color: #666666;
}

.question-input:focus {
  outline: none;
  border-color: #8a2be2;
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  margin-top: 1rem;
  background: var(--primary-gradient);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--purple-glow);
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 25px rgba(138, 43, 226, 0.6);
}

.submit-btn:disabled {
  background: linear-gradient(135deg, #666666 0%, #444444 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Enhanced Magic Crystal Ball */
.magic-sphere-container {
  max-width: 600px;
  margin: 0 auto 3rem;
}

.magic-sphere-card {
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.magic-sphere-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #d8bfd8;
}

/* Crystal Ball Container */
.crystal-ball-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 1.5rem;
}

/* Crystal Ball Base */
.crystal-ball-base {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 40px;
  background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
  border-radius: 50% 50% 0 0;
  z-index: 1;
}

/* Crystal Ball Glass */
.crystal-ball-glass {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at 30% 30%, 
    rgba(255, 255, 255, 0.15) 0%, 
    rgba(138, 43, 226, 0.05) 30%, 
    rgba(30, 30, 60, 0.8) 100%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    inset 0 0 50px rgba(255, 255, 255, 0.2),
    0 0 30px rgba(138, 43, 226, 0.4),
    inset 0 0 100px rgba(0, 0, 0, 0.6);
  z-index: 2;
  overflow: hidden;
}

/* Rotating Runes Inside Crystal Ball */
.crystal-ball-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  animation: rotateRunes 8s linear infinite;
  z-index: 3;
}

.rune-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
}

.rune-in-orbit {
  position: absolute;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: floatRune 3s ease-in-out infinite;
}

@keyframes rotateRunes {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes floatRune {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-10px) scale(1.1); }
}

/* Fog/Mist Effect Inside Crystal Ball */
.crystal-fog {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, 
    rgba(255, 255, 255, 0.05) 0%, 
    transparent 70%);
  border-radius: 50%;
  z-index: 4;
  animation: pulseFog 4s ease-in-out infinite;
}

@keyframes pulseFog {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.extraction-message {
  color: #b0b0b0;
  font-style: italic;
  margin-top: 1rem;
  font-size: 1.1rem;
  min-height: 1.5em;
}

/* Results Section */
.results-section {
  max-width: 1000px;
  margin: 0 auto;
}

.runes-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: #d8bfd8;
}

.runes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.rune-card {
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.rune-card:hover {
  transform: translateY(-5px);
}

.rune-image-container {
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rune-image {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.rune-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffd700;
}

.rune-description {
  font-size: 0.95rem;
  color: #c0c0c0;
  line-height: 1.6;
}

/* Global Meaning */
.global-meaning-card {
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.global-meaning-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #d8bfd8;
}

.global-meaning-text {
  font-size: 1.1rem;
  color: #e0e0e0;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(138, 43, 226, 0.2);
  color: #888888;
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }
  
  .header p {
    font-size: 1rem;
  }
  
  .crystal-ball-container {
    width: 250px;
    height: 250px;
  }
  
  .crystal-ball-glass {
    width: 200px;
    height: 200px;
  }
  
  .crystal-ball-content {
    width: 160px;
    height: 160px;
  }
  
  .rune-in-orbit {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .rune-image-container {
    width: 160px;
    height: 160px;
  }
  
  .rune-image {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  
  .header h1 {
    font-size: 1.8rem;
  }
  
  .crystal-ball-container {
    width: 220px;
    height: 220px;
  }
  
  .crystal-ball-glass {
    width: 170px;
    height: 170px;
  }
  
  .crystal-ball-content {
    width: 140px;
    height: 140px;
  }
  
  .rune-in-orbit {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .runes-grid {
    grid-template-columns: 1fr;
  }
  
  .rune-image-container {
    width: 140px;
    height: 140px;
  }
  
  .rune-image {
    width: 100px;
    height: 100px;
  }
}
/* Button Group */
.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.reset-btn {
  flex: 1;
  padding: 1rem;
  background: linear-gradient(135deg, #666666 0%, #444444 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reset-btn:hover {
  background: linear-gradient(135deg, #777777 0%, #555555 100%);
  transform: translateY(-2px);
}

/* Responsive Button Group */
@media (max-width: 480px) {
  .button-group {
    flex-direction: column;
    gap: 0.5rem;
  }
}