* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  min-height: 100vh;
  padding: 2rem;
  color: #333;
  position: relative;
  overflow-x: hidden;
}

/* Animated background bubbles */
.background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(168, 85, 247, 0.3) 100%);
  animation: float 20s infinite ease-in-out;
}

.bubble:nth-child(1) {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.bubble:nth-child(2) {
  width: 300px;
  height: 300px;
  bottom: -50px;
  left: -50px;
  animation-delay: -7s;
}

.bubble:nth-child(3) {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.container {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.logo-img {
  max-width: 280px;
  height: auto;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 0.25rem;
}

.subtitle {
  color: #6b7280;
  font-size: 1rem;
  font-weight: 400;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

.form-section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-number {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.section-hint {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
}

textarea {
  width: 100%;
  min-height: 140px;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s ease;
  background: #fafafa;
}

textarea:focus {
  outline: none;
  border-color: #6366f1;
  background: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

textarea::placeholder {
  color: #9ca3af;
}

input[type="text"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: #fafafa;
}

input[type="text"]:focus {
  outline: none;
  border-color: #6366f1;
  background: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

input[type="text"]::placeholder {
  color: #9ca3af;
}

.question-block {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.question-number {
  font-weight: 600;
  font-size: 0.875rem;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.remove-question {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-question:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.add-question-btn {
  width: 100%;
  padding: 1rem;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  background: transparent;
  color: #6b7280;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.add-question-btn:hover:not(:disabled) {
  border-color: #6366f1;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
}

.add-question-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.primary-btn:active {
  transform: translateY(0);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: #f3f4f6;
  color: #4b5563;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  background: #e5e7eb;
}

/* Success message */
#success-message {
  text-align: center;
}

.success-icon {
  margin-bottom: 1.5rem;
}

#success-message h2 {
  color: #059669;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

#success-message > p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.share-link {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.share-link input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.9375rem;
  background: #f9fafb;
  font-family: monospace;
}

.share-link button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-link button:hover {
  background: #4f46e5;
}

.hint {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Claim page styles */
.loading {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #6366f1;
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.not-found {
  text-align: center;
  padding: 2rem;
}

.not-found-icon {
  margin-bottom: 1.5rem;
}

.not-found h2 {
  color: #dc2626;
  margin-bottom: 0.5rem;
}

.not-found p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.claim-intro {
  text-align: center;
  margin-bottom: 2rem;
}

.lock-icon {
  margin-bottom: 1rem;
}

.intro-text {
  color: #4b5563;
  font-size: 1rem;
}

/* Error message */
.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.error-message::before {
  content: "⚠";
}

/* Success box */
.success-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}

.success-box h2 {
  color: #166534;
  margin-bottom: 1rem;
  font-size: 1.375rem;
}

.success-box p {
  color: #15803d;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.success-box .message-content {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1rem 0;
  font-size: 1.125rem;
  line-height: 1.7;
  color: #1f2937;
  white-space: pre-wrap;
  text-align: left;
  border: 1px solid #d1fae5;
}

/* Failure box */
.failure-box {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.failure-box p {
  color: #b91c1c;
  font-size: 1.0625rem;
  font-weight: 500;
}

/* Rate limit warning */
.rate-limit-warning {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-align: center;
}

/* Responsive */
@media (max-width: 640px) {
  body {
    padding: 1rem;
  }
  
  .container {
    padding: 1.5rem;
    border-radius: 20px;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  .share-link {
    flex-direction: column;
  }
  
  .share-link button {
    padding: 0.875rem;
  }
}
