:root {
  --color-bg-dark: #0d0a1a;
  --color-bg-card: #1a1528;
  --color-primary: #9b6dff;
  --color-primary-light: #b794ff;
  --color-secondary: #ffd700;
  --color-secondary-muted: #d4a800;
  --color-text: #e8e4f0;
  --color-text-muted: #a89ec4;
  --color-accent: #ff6b9d;
  --color-success: #4ade80;
  --font-display: 'Cinzel', serif;
  --font-body: 'Crimson Text', Georgia, serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-glow: 0 0 40px rgba(155, 109, 255, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg-dark);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

.magical-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(155, 109, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 107, 157, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 2rem;
  background: rgba(13, 10, 26, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(155, 109, 255, 0.2);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-secondary);
  letter-spacing: 0.05em;
}

main {
  padding-top: 80px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
  min-height: calc(100vh - 80px);
}

.hero-tag {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-primary-light);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}

.launch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: rgba(155, 109, 255, 0.15);
  border: 1px solid rgba(155, 109, 255, 0.3);
  border-radius: var(--radius-lg);
}

.badge-icon {
  font-size: 1.25rem;
}

.badge-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-primary-light);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-stack {
  position: relative;
  width: 280px;
  height: 360px;
}

.game-card {
  position: absolute;
  width: 180px;
  height: 240px;
  background: linear-gradient(145deg, var(--color-bg-card) 0%, #251e38 100%);
  border: 2px solid rgba(155, 109, 255, 0.4);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s ease;
}

.game-card:hover {
  transform: translateY(-10px) rotate(0deg) !important;
  z-index: 10;
}

.card-1 {
  top: 0;
  left: 0;
  transform: rotate(-15deg);
  z-index: 3;
  border-color: rgba(255, 215, 0, 0.5);
}

.card-2 {
  top: 30px;
  left: 50px;
  transform: rotate(0deg);
  z-index: 2;
  border-color: rgba(255, 107, 157, 0.5);
}

.card-3 {
  top: 60px;
  left: 100px;
  transform: rotate(15deg);
  z-index: 1;
}

.card-icon {
  font-size: 4rem;
}

.wench-icon {
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wench-icon svg {
  width: 64px;
  height: 64px;
}

.card-label {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.characters-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  text-align: center;
}

.characters-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.characters-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
}

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

.character-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(155, 109, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.character-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 107, 157, 0.5);
  box-shadow: 0 12px 40px rgba(255, 107, 157, 0.15);
}

.character-illustration {
  width: 120px;
  height: 160px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-illustration svg {
  width: 100%;
  height: 100%;
}

.character-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.character-role {
  font-size: 0.9rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.character-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.signup-section {
  background: linear-gradient(180deg, transparent 0%, rgba(155, 109, 255, 0.08) 50%, transparent 100%);
  padding: 6rem 2rem;
}

.signup-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.signup-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

.signup-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
}

.signup-form {
  position: relative;
}

.form-group {
  display: flex;
  gap: 0;
  background: var(--color-bg-card);
  border: 2px solid rgba(155, 109, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group:focus-within {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.form-group input {
  flex: 1;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--color-text);
}

.form-group input::placeholder {
  color: var(--color-text-muted);
}

.btn-submit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c4dff 100%);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(155, 109, 255, 0.4);
}

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

.btn-icon {
  transition: transform 0.2s ease;
}

.btn-submit:hover .btn-icon {
  transform: translateX(4px);
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

.success-message {
  display: none;
  padding: 2rem;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius-md);
  text-align: center;
}

.success-message.visible {
  display: block;
  animation: fadeIn 0.4s ease;
}

.success-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.success-message h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-success);
  margin-bottom: 0.5rem;
}

.success-message p {
  color: var(--color-text-muted);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.benefits {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.benefits-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-text);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.benefit-card {
  padding: 2rem;
  background: var(--color-bg-card);
  border: 1px solid rgba(155, 109, 255, 0.2);
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-6px);
  border-color: rgba(155, 109, 255, 0.5);
}

.benefit-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.benefit-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--color-secondary);
}

.benefit-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.features {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

.feature-text h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.feature-text p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.feature-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.dice-container {
  display: flex;
  gap: 1rem;
}

.dice {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}

.dice:nth-child(2) {
  animation-delay: 0.5s;
}

.dice:nth-child(3) {
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

.faction-badges {
  display: flex;
  gap: 2rem;
}

.faction-badge {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-radius: 50%;
  border: 3px solid;
}

.wizard-badge {
  background: rgba(155, 109, 255, 0.2);
  border-color: var(--color-primary);
  animation: pulse 2s ease-in-out infinite;
}

.tavern-badge {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--color-secondary);
  animation: pulse 2s ease-in-out infinite 0.5s;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(155, 109, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(155, 109, 255, 0);
  }
}

.final-cta {
  position: relative;
  padding: 6rem 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 215, 0, 0.05) 100%);
  overflow: hidden;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.cta-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.btn-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-muted) 100%);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-bg-dark);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(255, 215, 0, 0.3);
}

.cta-wench-decoration {
  position: absolute;
  bottom: 0;
  right: 5%;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}

.cta-wench-svg {
  width: 120px;
  height: 150px;
}

.footer {
  padding: 3rem 2rem;
  border-top: 1px solid rgba(155, 109, 255, 0.15);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 4rem 1.5rem;
    min-height: auto;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-visual {
    order: -1;
    margin-bottom: 2rem;
  }

  .card-stack {
    width: 240px;
    height: 300px;
  }

  .game-card {
    width: 150px;
    height: 200px;
  }

  .card-1 {
    left: 0;
  }

  .card-2 {
    left: 40px;
  }

  .card-3 {
    left: 80px;
  }

  .card-icon {
    font-size: 3rem;
  }

  .wench-icon svg {
    width: 50px;
    height: 50px;
  }

  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    direction: ltr;
  }

  .feature-visual {
    order: -1;
  }

  .characters-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  .cta-wench-decoration {
    display: none;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 1rem 1.25rem;
  }

  .logo-text {
    font-size: 1rem;
  }

  main {
    padding-top: 70px;
  }

  .characters-section,
  .signup-section,
  .benefits,
  .features,
  .final-cta {
    padding: 4rem 1.25rem;
  }

  .form-group {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .form-group input {
    padding: 1rem;
    text-align: center;
  }

  .btn-submit {
    justify-content: center;
    width: 100%;
    padding: 1rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .dice {
    font-size: 3rem;
  }

  .faction-badge {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }

  .character-illustration {
    width: 100px;
    height: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}