/* Dark Void Theme - D&D Campaign Website */

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

:root {
  --void-black: #0a0a0f;
  --void-dark: #12121a;
  --void-mid: #1a1a2e;
  --void-light: #252540;
  --accent-purple: #9d4edd;
  --accent-blue: #7b2cbf;
  --accent-glow: #c77dff;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-dim: #666680;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--void-black);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* Starfield background effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #ffffff15, transparent),
    radial-gradient(2px 2px at 40px 70px, #ffffff10, transparent),
    radial-gradient(1px 1px at 90px 40px, #ffffff12, transparent),
    radial-gradient(2px 2px at 160px 120px, #ffffff15, transparent),
    radial-gradient(1px 1px at 230px 80px, #ffffff10, transparent),
    radial-gradient(2px 2px at 300px 150px, #ffffff08, transparent),
    radial-gradient(1px 1px at 370px 50px, #ffffff12, transparent),
    radial-gradient(2px 2px at 450px 180px, #ffffff10, transparent),
    radial-gradient(1px 1px at 520px 90px, #ffffff15, transparent),
    radial-gradient(2px 2px at 600px 130px, #ffffff08, transparent);
  background-size: 650px 200px;
  animation: twinkle 8s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Navigation */
nav {
  background: linear-gradient(180deg, var(--void-dark) 0%, transparent 100%);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--void-light);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

nav a:hover {
  color: var(--accent-glow);
  background: var(--void-light);
  text-shadow: 0 0 10px var(--accent-purple);
}

nav a.active {
  color: var(--accent-glow);
  border-bottom: 2px solid var(--accent-purple);
}

/* Main content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Headers */
h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--accent-glow);
  text-shadow: 0 0 20px var(--accent-purple), 0 0 40px var(--accent-blue);
  letter-spacing: 2px;
}

h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
  border-left: 3px solid var(--accent-purple);
  padding-left: 1rem;
}

h3 {
  font-size: 1.3rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--accent-glow);
}

/* Sections */
.section {
  background: var(--void-dark);
  border: 1px solid var(--void-light);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--accent-purple);
}

.btn:active {
  transform: translateY(0);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545, #a71d2a);
}

.btn-secondary {
  background: var(--void-light);
  border: 1px solid var(--text-dim);
}

/* Forms */
input, textarea {
  background: var(--void-black);
  border: 1px solid var(--void-light);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
}

textarea {
  min-height: 200px;
  resize: vertical;
  font-family: inherit;
}

/* YouTube embed container */
.video-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 16/9;
}

.video-container iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 1px solid var(--void-light);
}

/* Wheel styles */
.wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.wheel-wrapper {
  position: relative;
  width: 350px;
  height: 350px;
}

#wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--accent-purple);
  box-shadow: 0 0 30px var(--accent-purple), inset 0 0 20px rgba(157, 78, 221, 0.3);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.wheel-pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 30px solid var(--accent-glow);
  filter: drop-shadow(0 0 10px var(--accent-purple));
  z-index: 10;
}

.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: var(--void-dark);
  border: 3px solid var(--accent-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--accent-glow);
  box-shadow: 0 0 15px var(--accent-purple);
}

.wheel-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
}

.wheel-input-group {
  display: flex;
  gap: 0.5rem;
}

.wheel-input-group input {
  flex: 1;
}

.wheel-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.wheel-item {
  background: var(--void-mid);
  border: 1px solid var(--void-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.wheel-item button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
}

.wheel-item button:hover {
  color: #dc3545;
}

#wheel-result {
  font-size: 1.5rem;
  color: var(--accent-glow);
  text-align: center;
  min-height: 2rem;
  text-shadow: 0 0 10px var(--accent-purple);
}

/* Notes styles */
.notes-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notes-status {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: right;
}

.notes-status.saved {
  color: #28a745;
}

/* NPC Cards */
.npc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.npc-card {
  background: var(--void-mid);
  border: 1px solid var(--void-light);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.npc-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(157, 78, 221, 0.2);
  border-color: var(--accent-purple);
}

.npc-card h3 {
  margin-top: 0;
}

.npc-card .npc-role {
  color: var(--accent-purple);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.npc-card .npc-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Rules list */
.rules-list {
  list-style: none;
}

.rules-list li {
  padding: 1rem;
  border-left: 2px solid var(--void-light);
  margin-bottom: 1rem;
  transition: border-color 0.3s ease;
}

.rules-list li:hover {
  border-color: var(--accent-purple);
}

.rules-list li strong {
  color: var(--accent-glow);
  display: block;
  margin-bottom: 0.5rem;
}

/* Info boxes */
.info-box {
  background: var(--void-mid);
  border-left: 3px solid var(--accent-purple);
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  border-radius: 0 8px 8px 0;
}

.info-box.warning {
  border-color: #ffc107;
}

.info-box.danger {
  border-color: #dc3545;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  border-top: 1px solid var(--void-light);
  margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
  nav ul {
    gap: 0.5rem;
  }

  nav a {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  main {
    padding: 1rem;
  }

  .wheel-wrapper {
    width: 280px;
    height: 280px;
  }
}
