/* Design: Dark, sharp, distinctive - Not generic AI aesthetic */
:root {
  --bg: #0a0b0d;
  --surface: #14161a;
  --surface-hover: #1a1d23;
  --border: #252830;
  --text: #e8eaef;
  --text-muted: #6b7280;
  --accent: #7c3aed;
  --accent-hover: #8b5cf6;
  --accent-dim: rgba(124, 58, 237, 0.15);
  --success: #22c55e;
  --danger: #ef4444;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 8px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* Landing */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.landing-content {
  position: relative;
  text-align: center;
  max-width: 420px;
}

.logo-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: var(--accent);
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.landing h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--text-muted);
  margin: 0 0 2rem;
  font-size: 1rem;
  font-weight: 400;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: white;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.section h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.section .muted {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.back-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.back-link:hover {
  color: var(--accent);
}

/* Guild grid */
.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.guild-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.guild-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.guild-card-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.guild-card-link:hover {
  color: var(--accent);
}

.guild-card-invite {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
}

.guild-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.guild-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guild-icon span {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

.guild-icon.large {
  width: 72px;
  height: 72px;
}

.guild-icon.large span {
  font-size: 1.75rem;
}

.guild-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.guild-info .muted {
  font-size: 0.8rem;
}

.guild-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.guild-header h1 {
  margin: 0 0 0.25rem;
}

/* Feature toggles */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.feature-row:last-child {
  border-bottom: none;
}

.subsection-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.subsection-desc {
  margin-top: -0.25rem !important;
}

.panel {
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.panel-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.role-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
}

.role-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.role-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.channel-select {
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  min-width: 220px;
}

.channel-select:focus {
  outline: none;
  border-color: var(--accent);
}

.subsection-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.subsection-desc {
  margin-top: -0.25rem;
  margin-bottom: 0.75rem;
}

.log-channel-row {
  margin-top: 0.5rem;
}

.channel-select {
  padding: 0.6rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  min-width: 220px;
}

.channel-select:focus {
  outline: none;
  border-color: var(--accent);
}

.feature-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feature-info strong {
  font-weight: 500;
}

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

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 12px;
  transition: 0.2s;
}

.toggle-track::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle input:checked + .toggle-track {
  background: var(--accent);
}

.toggle input:checked + .toggle-track::before {
  transform: translateX(20px);
}

.toggle input:focus + .toggle-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ticket-settings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ticket-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ticket-row label {
  font-size: 0.9rem;
  font-weight: 500;
}

.twitch-streamers-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.twitch-streamer-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: var(--radius);
}
.twitch-login {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.empty {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

/* Responsive */
@media (max-width: 600px) {
  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .main {
    padding: 1.5rem 1rem;
  }

  .guild-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .feature-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Sivuston footer – tekijänoikeudet */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
}
.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--accent);
}
.landing .site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: none;
  margin-top: 0;
}


/* Tekijänoikeudet S44Gaming kaikki oikeudet pidätetään. https://discord.gg/ujB4JHfgcg */