:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --accent: #e94560;
  --accent-hover: #ff6b6b;
  --success: #00d2d3;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --discord: #5865F2;
  --discord-hover: #4752c4;
  --ulule: #18a5d6;
  --ulule-hover: #1490bc;
  --border-radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-container {
  width: 100%;
  max-width: 720px;
  padding: 2rem 1.5rem;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.app-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--ulule));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.app-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.step-card.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-number.done {
  background: var(--success);
}

.step-title {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  color: #fff;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

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

.btn-discord {
  background: var(--discord);
}
.btn-discord:hover {
  background: var(--discord-hover);
}

.btn-ulule {
  background: var(--ulule);
}
.btn-ulule:hover {
  background: var(--ulule-hover);
}

.btn.validated {
  background: var(--success) !important;
  pointer-events: none;
}

.btn.validated::after {
  content: "✓";
  margin-left: 0.5rem;
  font-size: 1.1rem;
}

.btn-icon {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Projects list */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.project-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.project-guild {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-redeem {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  width: auto;
}

.btn-redeem:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-redeem.redeemed {
  background: var(--success);
  pointer-events: none;
  opacity: 0.85;
}

.btn-redeem.redeemed::before {
  content: "✓ ";
}

.btn-redeem:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-redeem.rate-limited {
  background: #636e72;
  opacity: 0.7;
  pointer-events: none;
}

/* Loading */
.loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Toast */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  max-width: 320px;
}

.toast-success { background: var(--success); color: #000; }
.toast-error { background: var(--accent); }
.toast-warning { background: #f0932b; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Footer */
.app-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.app-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  margin: 0 0.75rem;
  transition: var(--transition);
}

.app-footer a:hover {
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 480px) {
  .app-container {
    padding: 1.5rem 1rem;
  }
  .app-header h1 {
    font-size: 1.8rem;
  }
  .project-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .btn-redeem {
    width: 100%;
    text-align: center;
  }
}

