/* Base Styles & Custom Glassmorphism Theme */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  --bg-dark: #0b0f19;
  --panel-bg: rgba(15, 23, 42, 0.75);
  --panel-border: rgba(139, 92, 246, 0.25);
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.5);
  --accent-violet: #a855f7;
  --accent-pink: #ec4899;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--bg-dark);
  color: #f8fafc;
  overflow-x: hidden;
  min-height: 100vh;
  direction: rtl;
}

/* Ambient Background Lights */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb-1 {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: pulse-glow 8s infinite alternate ease-in-out;
}

.glow-orb-2 {
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: pulse-glow 10s infinite alternate ease-in-out reverse;
}

@keyframes pulse-glow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  100% { transform: scale(1.15) translate(30px, -20px); opacity: 1; }
}

/* Glassmorphism Panel Utility */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.1);
}

.glass-panel-interactive {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel-interactive:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 12px 35px -5px rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

/* Glowing Neon Button */
.btn-neon {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
  transition: all 0.25s ease;
}

.btn-neon:hover {
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.7);
  transform: translateY(-2px) scale(1.01);
}

.btn-neon:active {
  transform: translateY(0) scale(0.98);
}

/* Secondary Glass Button */
.btn-glass {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.btn-glass:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(139, 92, 246, 0.4);
}

/* Custom Input Field */
.glass-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #ffffff;
  transition: all 0.2s ease;
}

.glass-input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

/* Toast Notification Styles */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 50%;
  transform: translateX(50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 90%;
  max-width: 420px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.2rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(12px);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  animation: toast-in 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.error {
  background: rgba(225, 29, 72, 0.9);
  border: 1px solid rgba(244, 63, 94, 0.5);
}

.toast.success {
  background: rgba(16, 185, 129, 0.9);
  border: 1px solid rgba(52, 211, 153, 0.5);
}

.toast.info {
  background: rgba(139, 92, 246, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.5);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Secret Role Card Peek Effect */
.role-card-container {
  perspective: 1000px;
}

.role-card {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

.role-card.revealed {
  transform: rotateY(180deg);
}

.role-card-front, .role-card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.role-card-back {
  transform: rotateY(180deg);
}

/* Circular Timer SVG Ring */
.timer-svg {
  transform: rotate(-90deg);
}

.timer-circle-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.timer-circle-progress {
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
  stroke-linecap: round;
}

/* Animated Pulse Badge */
.pulse-badge {
  box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}
