/*
 * Enhanced Gothic Theme CSS
 * A dark, atmospheric theme with blood-red gradients, fog effects, and gothic typography
 */

/* ===== GOTHIC FONT INTEGRATION ===== */
body.theme-goth {
  font-family: 'UnifrakturCook', 'Cinzel', 'Times New Roman', serif;
  font-weight: 700;
}

/* ===== BLOOD-RED GRADIENT BACKGROUND WITH PULSING ANIMATION ===== */
@keyframes gothBloodPulse {
  0%, 100% {
    background-position: 0% 50%;
    filter: brightness(0.7) saturate(1.2) contrast(1.1);
  }
  25% {
    background-position: 50% 25%;
    filter: brightness(0.9) saturate(1.5) contrast(1.3);
  }
  50% {
    background-position: 100% 50%;
    filter: brightness(0.6) saturate(1.8) contrast(1.2);
  }
  75% {
    background-position: 25% 75%;
    filter: brightness(0.8) saturate(1.4) contrast(1.4);
  }
}

/* Enhanced blood-red background for goth theme */
body.theme-goth::before {
  background: linear-gradient(45deg, 
    #0a0000 0%,     /* Deep black-red */
    #1a0505 15%,    /* Dark blood */
    #2d0a0a 30%,    /* Darker red */
    #4d0000 45%,    /* Blood red */
    #1a0000 60%,    /* Black-red */
    #330000 75%,    /* Deep crimson */
    #0a0000 90%,    /* Back to black-red */
    #000000 100%    /* Pure black */
  );
  background-size: 600% 600%;
  animation: gothBloodPulse 8s ease-in-out infinite;
  opacity: 1;
}

/* ===== FOG OVERLAY EFFECT ===== */
.goth-fog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-image: 
    radial-gradient(ellipse 800px 400px at 10% 20%, rgba(128, 128, 128, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 600px 300px at 90% 80%, rgba(169, 169, 169, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 1000px 500px at 50% 50%, rgba(105, 105, 105, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 400px 200px at 30% 70%, rgba(128, 128, 128, 0.1) 0%, transparent 40%);
  animation: gothFogDrift 25s ease-in-out infinite;
}

body.theme-goth .goth-fog-overlay {
  opacity: 1;
}

@keyframes gothFogDrift {
  0%, 100% {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateX(-30px) translateY(15px) scale(1.05);
    opacity: 0.8;
  }
  50% {
    transform: translateX(20px) translateY(-20px) scale(0.95);
    opacity: 0.5;
  }
  75% {
    transform: translateX(-15px) translateY(25px) scale(1.02);
    opacity: 0.9;
  }
}

/* ===== GOTHIC ATMOSPHERE OVERLAY ===== */
body.theme-goth::after {
  background: 
    radial-gradient(circle at 20% 80%, rgba(139, 0, 0, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(128, 0, 0, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(139, 0, 0, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 60% 60%, rgba(165, 42, 42, 0.15) 0%, transparent 40%);
  animation: gothAtmosphere 30s ease-in-out infinite reverse;
}

@keyframes gothAtmosphere {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1) rotate(0deg);
    filter: brightness(0.8) saturate(1.3);
  }
  33% {
    opacity: 0.7;
    transform: scale(1.05) rotate(1deg);
    filter: brightness(1.1) saturate(1.6);
  }
  66% {
    opacity: 0.5;
    transform: scale(0.95) rotate(-1deg);
    filter: brightness(0.9) saturate(1.4);
  }
}

/* ===== GOTHIC TITLE STYLING ===== */
body.theme-goth .glow {
  color: #b30000;
  font-family: 'UnifrakturCook', 'Cinzel', serif;
  font-weight: 700;
  text-shadow: 
    0 0 15px rgba(139, 0, 0, 0.9),
    0 0 30px rgba(139, 0, 0, 0.7),
    0 0 45px rgba(165, 42, 42, 0.5),
    0 0 60px rgba(139, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 3px;
  animation: gothTitlePulse 6s ease-in-out infinite alternate;
}

@keyframes gothTitlePulse {
  0% {
    text-shadow: 
      0 0 15px rgba(139, 0, 0, 0.9),
      0 0 30px rgba(139, 0, 0, 0.7),
      0 0 45px rgba(165, 42, 42, 0.5),
      0 2px 4px rgba(0, 0, 0, 0.8);
    transform: scale(1);
  }
  50% {
    text-shadow: 
      0 0 25px rgba(139, 0, 0, 1),
      0 0 50px rgba(139, 0, 0, 0.9),
      0 0 75px rgba(165, 42, 42, 0.7),
      0 0 100px rgba(139, 0, 0, 0.5),
      0 2px 4px rgba(0, 0, 0, 0.9);
    transform: scale(1.02);
  }
  100% {
    text-shadow: 
      0 0 20px rgba(139, 0, 0, 0.95),
      0 0 40px rgba(139, 0, 0, 0.8),
      0 0 60px rgba(165, 42, 42, 0.6),
      0 0 80px rgba(139, 0, 0, 0.4),
      0 2px 4px rgba(0, 0, 0, 0.85);
    transform: scale(1.01);
  }
}

/* ===== GOTHIC BUTTON STYLING ===== */
body.theme-goth .start-btn {
  background: linear-gradient(135deg, 
    #4d0000 0%, 
    #800000 25%, 
    #b30000 50%, 
    #800000 75%, 
    #4d0000 100%
  );
  border: 2px solid #8b0000;
  color: #ffffff;
  font-family: 'UnifrakturCook', serif;
  font-weight: 700;
  text-shadow: 
    0 0 10px rgba(139, 0, 0, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.9);
  box-shadow: 
    0 8px 32px rgba(139, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 40px rgba(139, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

body.theme-goth .start-btn:hover {
  background: linear-gradient(135deg, 
    #660000 0%, 
    #990000 25%, 
    #cc0000 50%, 
    #990000 75%, 
    #660000 100%
  );
  border: 2px solid #b30000;
  box-shadow: 
    0 15px 50px rgba(139, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 60px rgba(139, 0, 0, 0.6),
    0 0 80px rgba(165, 42, 42, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6);
  transform: translateY(-2px) scale(1.02);
}

/* ===== GOTHIC CHAT BUBBLES ===== */
body.theme-goth .msg-bubble {
  backdrop-filter: blur(15px);
  border: 1px solid rgba(139, 0, 0, 0.4);
  box-shadow: 
    0 4px 25px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(139, 0, 0, 0.3);
  font-family: 'UnifrakturCook', serif;
  font-weight: 700;
}

body.theme-goth .msg-right {
  background: linear-gradient(135deg, 
    #4d0000 0%, 
    #800000 30%, 
    #b30000 60%, 
    #800000 100%
  );
  border: 1px solid #8b0000;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 
    0 4px 25px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(139, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.theme-goth .msg-left {
  background: linear-gradient(135deg, 
    rgba(20, 0, 0, 0.9) 0%, 
    rgba(40, 0, 0, 0.8) 50%, 
    rgba(30, 0, 0, 0.85) 100%
  );
  border: 1px solid rgba(139, 0, 0, 0.5);
  color: #ffcccc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  box-shadow: 
    0 4px 25px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(139, 0, 0, 0.3),
    inset 0 1px 0 rgba(139, 0, 0, 0.2);
}

/* ===== GOTHIC INPUT STYLING ===== */
body.theme-goth .chat-input {
  background: linear-gradient(135deg, 
    rgba(20, 0, 0, 0.8) 0%, 
    rgba(40, 0, 0, 0.7) 50%, 
    rgba(20, 0, 0, 0.8) 100%
  );
  border: 2px solid rgba(139, 0, 0, 0.5);
  color: #ffcccc;
  font-family: 'UnifrakturCook', serif;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(139, 0, 0, 0.3);
}

body.theme-goth .chat-input:focus {
  border: 2px solid #8b0000;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(139, 0, 0, 0.6),
    0 0 40px rgba(165, 42, 42, 0.4);
  background: linear-gradient(135deg, 
    rgba(30, 0, 0, 0.9) 0%, 
    rgba(50, 0, 0, 0.8) 50%, 
    rgba(30, 0, 0, 0.9) 100%
  );
}

body.theme-goth .chat-input::placeholder {
  color: rgba(255, 204, 204, 0.6);
  font-family: 'UnifrakturCook', serif;
}

/* ===== GOTHIC SEND BUTTON ===== */
body.theme-goth .send-btn {
  background: linear-gradient(135deg, 
    #4d0000 0%, 
    #800000 50%, 
    #4d0000 100%
  );
  border: 2px solid #8b0000;
  color: #ffffff;
  font-family: 'UnifrakturCook', serif;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 
    0 4px 15px rgba(139, 0, 0, 0.5),
    0 0 20px rgba(139, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.theme-goth .send-btn:hover {
  background: linear-gradient(135deg, 
    #660000 0%, 
    #b30000 50%, 
    #660000 100%
  );
  border: 2px solid #b30000;
  box-shadow: 
    0 6px 25px rgba(139, 0, 0, 0.7),
    0 0 30px rgba(139, 0, 0, 0.5),
    0 0 45px rgba(165, 42, 42, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px) scale(1.05);
}

/* ===== GOTHIC CHAT ACTIONS ===== */
body.theme-goth .skip-btn,
body.theme-goth .end-btn {
  font-family: 'UnifrakturCook', serif;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  border: 2px solid rgba(139, 0, 0, 0.6);
}

body.theme-goth .skip-btn {
  background: linear-gradient(135deg, 
    rgba(139, 69, 19, 0.8) 0%, 
    rgba(160, 82, 45, 0.9) 100%
  );
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
}

body.theme-goth .end-btn {
  background: linear-gradient(135deg, 
    rgba(139, 0, 0, 0.8) 0%, 
    rgba(178, 34, 34, 0.9) 100%
  );
  box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

/* ===== GOTHIC UI ELEMENTS ===== */
body.theme-goth .theme-switcher,
body.theme-goth .online-count,
body.theme-goth .language-switcher,
body.theme-goth .stats-button {
  background: linear-gradient(135deg, 
    rgba(20, 0, 0, 0.9) 0%, 
    rgba(40, 0, 0, 0.8) 100%
  );
  border: 1px solid rgba(139, 0, 0, 0.5);
  color: #ffcccc;
  font-family: 'UnifrakturCook', serif;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(139, 0, 0, 0.3);
}

body.theme-goth .theme-switcher:hover,
body.theme-goth .language-switcher:hover,
body.theme-goth .stats-button:hover {
  background: linear-gradient(135deg, 
    rgba(30, 0, 0, 0.95) 0%, 
    rgba(50, 0, 0, 0.9) 100%
  );
  border: 1px solid rgba(139, 0, 0, 0.7);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(139, 0, 0, 0.5);
}

/* ===== GOTHIC NOTIFICATION STYLING ===== */
body.theme-goth .notif {
  background: linear-gradient(135deg, 
    rgba(20, 0, 0, 0.95) 0%, 
    rgba(40, 0, 0, 0.9) 100%
  );
  border: 1px solid rgba(139, 0, 0, 0.5);
  color: #ffcccc;
  font-family: 'UnifrakturCook', serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(139, 0, 0, 0.3);
}

body.theme-goth .notif-btn {
  background: linear-gradient(135deg, 
    #4d0000 0%, 
    #800000 50%, 
    #4d0000 100%
  );
  border: 1px solid #8b0000;
  color: #ffffff;
  font-family: 'UnifrakturCook', serif;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 
    0 4px 15px rgba(139, 0, 0, 0.5),
    0 0 20px rgba(139, 0, 0, 0.3);
}

body.theme-goth .notif-btn:hover {
  background: linear-gradient(135deg, 
    #660000 0%, 
    #b30000 50%, 
    #660000 100%
  );
  box-shadow: 
    0 6px 25px rgba(139, 0, 0, 0.7),
    0 0 30px rgba(139, 0, 0, 0.5),
    0 0 45px rgba(165, 42, 42, 0.3);
}

/* ===== GOTHIC MODAL STYLING ===== */
body.theme-goth .rating-modal,
body.theme-goth .stats-panel,
body.theme-goth .theme-modal {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
}

body.theme-goth .rating-content,
body.theme-goth .stats-content,
body.theme-goth .theme-modal-content {
  background: linear-gradient(135deg, 
    rgba(20, 0, 0, 0.95) 0%, 
    rgba(40, 0, 0, 0.9) 50%, 
    rgba(20, 0, 0, 0.95) 100%
  );
  border: 2px solid rgba(139, 0, 0, 0.5);
  color: #ffcccc;
  font-family: 'UnifrakturCook', serif;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(139, 0, 0, 0.4);
}

/* ===== GOTHIC LOADING OVERLAY ===== */
body.theme-goth .loading-overlay {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}

body.theme-goth .loading-text {
  color: #b30000;
  font-family: 'UnifrakturCook', serif;
  font-weight: 700;
  text-shadow: 
    0 0 20px rgba(139, 0, 0, 0.9),
    0 0 40px rgba(139, 0, 0, 0.7),
    0 2px 4px rgba(0, 0, 0, 0.9);
  animation: gothLoadingPulse 2s ease-in-out infinite alternate;
}

@keyframes gothLoadingPulse {
  0% {
    text-shadow: 
      0 0 20px rgba(139, 0, 0, 0.9),
      0 0 40px rgba(139, 0, 0, 0.7),
      0 2px 4px rgba(0, 0, 0, 0.9);
    transform: scale(1);
  }
  100% {
    text-shadow: 
      0 0 30px rgba(139, 0, 0, 1),
      0 0 60px rgba(139, 0, 0, 0.9),
      0 0 80px rgba(165, 42, 42, 0.6),
      0 2px 4px rgba(0, 0, 0, 1);
    transform: scale(1.02);
  }
}

/* ===== GOTHIC SOUND TOGGLE ===== */
body.theme-goth .sound-toggle {
  background: linear-gradient(135deg, 
    rgba(20, 0, 0, 0.9) 0%, 
    rgba(40, 0, 0, 0.8) 100%
  );
  border: 1px solid rgba(139, 0, 0, 0.5);
  color: #ffcccc;
  font-family: 'UnifrakturCook', serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 2px 8px rgba(139, 0, 0, 0.3);
}

body.theme-goth .sound-toggle:hover {
  background: linear-gradient(135deg, 
    rgba(30, 0, 0, 0.95) 0%, 
    rgba(50, 0, 0, 0.9) 100%
  );
  box-shadow: 0 3px 12px rgba(139, 0, 0, 0.5);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  body.theme-goth .glow {
    font-size: 2.2rem;
    letter-spacing: 2px;
  }
  
  body.theme-goth .start-btn {
    padding: 15px 40px;
    font-size: 1.3rem;
  }
  
  .goth-fog-overlay {
    animation-duration: 20s;
  }
}

@media (max-width: 480px) {
  body.theme-goth .glow {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }
  
  body.theme-goth .start-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
  }
  
  body.theme-goth .chat-input,
  body.theme-goth .send-btn {
    font-size: 0.9rem;
  }
}