:root {
  --purple: #8b5cf6;
  --pink: #ec4899;
  --yellow: #fbbf24;
  --cyan: #22d3ee;
  --dark: #1e1b4b;
  --light: #faf5ff;
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--dark) 0%, #312e81 100%);
  color: var(--light);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  padding: 4rem 0;
}

header h1, header .tagline {
  text-align: left;
}

h1 {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--pink), var(--yellow), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.5rem;
  color: var(--purple);
  opacity: 0.9;
}

.section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.section p {
  margin-bottom: 1rem;
}

.section a {
  color: var(--cyan);
  text-decoration: none;
}

.section a:hover {
  text-decoration: underline;
}

.steps {
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 0.75rem 0;
  padding-left: 2.5rem;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--pink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
}

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

.app-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--light);
  transition: transform 0.2s, background 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.app-card h3 {
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.app-card p {
  font-size: 0.875rem;
  opacity: 0.8;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  opacity: 0.7;
  font-style: italic;
}

footer {
  text-align: center;
  padding: 2rem;
  opacity: 0.6;
  font-size: 0.875rem;
}

footer a {
  color: var(--cyan);
  text-decoration: none;
}

/* Header layout */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Auth styles */
#auth-container {
  padding-top: 1rem;
}

.login-btn, .logout-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.2s, opacity 0.2s;
}

.login-btn {
  background: var(--purple);
  color: white;
}

.login-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light);
  font-size: 0.875rem;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* Form styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--purple);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--light);
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--purple);
}

.form-group textarea {
  resize: vertical;
}

.submit-btn {
  background: linear-gradient(90deg, var(--pink), var(--purple));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Result messages */
.success-message {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #86efac;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.success-message a {
  color: var(--cyan);
}

.error-message {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.75rem 1.5rem;
  color: var(--light);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s, background 0.2s;
}

.tab-btn:hover {
  opacity: 0.8;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.05);
  opacity: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: -1px;
}

.tab-content {
  display: none;
  border-radius: 0 1rem 1rem 1rem;
}

.tab-content.active {
  display: block;
}
