/*
SPDX-FileCopyrightText: © 2025 StreamKit Contributors

SPDX-License-Identifier: MPL-2.0
*/

:root {
  /* StreamKit dark theme colors - matching main app */
  --sk-font-ui: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  --bg: #0b0f19;
  --bg-secondary: #121826;
  --panel-bg: #1a2235;
  --text: #e2e8f0;
  --text-muted: #94a3b8;

  --border: #2c364d;
  --border-strong: #475569;

  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-contrast: #0b0f19;

  --error: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;

  --hover-bg: #1e293b;
  --shadow: rgba(0, 0, 0, 0.6);
}

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

body {
  font-family: var(--sk-font-ui);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  text-align: center;
  padding-bottom: 3rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 3rem;
}

.logo-container {
  margin-bottom: 1rem;
}

.logo {
  width: 64px;
  height: auto;
  display: inline-block;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.note {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
}

.action {
  text-align: center;
  margin-bottom: 2rem;
}

.primary-btn {
  background: var(--primary);
  color: var(--primary-contrast);
  border: none;
  padding: 1rem 3rem;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px var(--shadow);
}

.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow);
}

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

.primary-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.5;
}

.status {
  text-align: center;
  margin: 0 auto 4rem;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  max-width: 600px;
  display: none; /* Hidden by default */
}

.status.loading,
.status.error,
.status.success {
  display: block; /* Show when it has a state class */
}

.status.loading {
  background: var(--panel-bg);
  color: var(--text);
  border: 2px solid var(--border);
}

.status.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 2px solid var(--error);
}

.status.success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 2px solid var(--success);
}

.info {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid var(--border);
}

.info h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.info ul {
  list-style: none;
  margin-bottom: 2rem;
}

.info li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
}

.info li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

footer {
  text-align: center;
  padding-top: 3rem;
  margin-top: auto;
  border-top: 2px solid var(--border);
  color: var(--text-muted);
}

footer a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 0.5rem;
}

footer a:hover {
  text-decoration: underline;
}

/* Spinner animation */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .container {
    padding: 2rem 1.5rem;
  }

  .logo {
    width: 48px;
  }

  header {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
  }

  header h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .hero {
    margin-bottom: 2rem;
  }

  .action {
    margin: 2rem 0;
  }

  .primary-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}
