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

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #f9fafb;
  --bg-secondary: #ffffff;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: var(--text-primary);
  padding: 20px;
  line-height: 1.6;
}

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

header {
  text-align: center;
  color: white;
  margin-bottom: 40px;
  padding-top: 60px;
  position: relative;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.user-info {
  position: absolute;
  top: 10px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 20px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.user-info span {
  font-size: 0.9rem;
  font-weight: 500;
}

.btn-link {
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-link:hover {
  background: white;
  color: var(--primary-color);
}

.card {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 30px;
}

h2 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.75rem;
}

h3 {
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

textarea,
input[type="text"],
select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

textarea {
  resize: vertical;
  min-height: 150px;
  font-family: 'Courier New', monospace;
}

textarea:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.char-counter {
  text-align: right;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

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

.btn-secondary {
  background: var(--text-secondary);
  color: white;
  margin-top: 16px;
  width: 100%;
}

.btn-secondary:hover {
  background: var(--text-primary);
}

.btn-copy {
  background: var(--success-color);
  color: white;
}

.btn-copy:hover {
  background: #059669;
}

.result-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid var(--border-color);
}

.hidden {
  display: none !important;
}

.url-container {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.url-input {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.warning-text {
  background: #fef3c7;
  border-left: 4px solid var(--warning-color);
  padding: 12px;
  margin: 16px 0;
  border-radius: 4px;
  color: #92400e;
}

.info-text {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 16px 0;
}

.error-message {
  background: #fee2e2;
  border-left: 4px solid var(--danger-color);
  padding: 12px;
  margin: 16px 0;
  border-radius: 4px;
  color: #991b1b;
}

.success-text {
  color: var(--success-color);
  font-weight: 600;
}

.info-box {
  background: var(--bg-primary);
  padding: 16px;
  border-radius: 8px;
  margin: 20px 0;
}

.info-note {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 8px;
}

.secret-content {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  margin: 20px 0;
  max-height: 400px;
  overflow-y: auto;
}

.secret-content pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.feature {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.feature h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

footer {
  text-align: center;
  color: white;
  padding: 20px;
  opacity: 0.8;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

#loadingSection,
#readySection,
#secretSection,
#errorSection {
  text-align: center;
  padding: 20px 0;
}

small {
  display: block;
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  header {
    padding-top: 60px;
  }

  header h1 {
    font-size: 2rem;
  }

  .user-info {
    position: fixed;
    top: 10px;
    right: 10px;
    left: 10px;
    justify-content: space-between;
    z-index: 100;
  }

  .card {
    padding: 24px;
  }

  .url-container {
    flex-direction: column;
  }

  .btn-copy {
    width: 100%;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card,
.feature {
  animation: fadeIn 0.5s ease-out;
}
