:root {
  --bg-color: #0f172a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --success-color: #10b981;
  --error-color: #ef4444;
  --font-family: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

.background-animation {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15), transparent 40%),
              radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15), transparent 30%);
  z-index: -1;
  animation: bgPulse 15s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.container {
  width: 100%;
  max-width: 600px;
  padding: 2rem;
  z-index: 1;
}

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

.header h1 {
  font-size: 2.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

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

.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.tab-btn.active {
  color: var(--text-primary);
}

.tab-btn.active::after {
  width: 100%;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

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

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

.card.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.input-group input,
.input-group textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

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

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

.primary-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

.loader.hidden {
  display: none;
}

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

.result-box {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--glass-border);
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.result-box.hidden {
  display: none;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  color: white;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { background: var(--success-color); }
.toast.error { background: var(--error-color); }

/* Submit Layout & Sidebar */
.submit-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .submit-layout {
    grid-template-columns: 1.2fr 0.8fr;
  }
  .container {
    max-width: 900px;
  }
}

.sidebar-guide h2 {
  margin-bottom: 1rem;
}

.guide-intro {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.guide-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  opacity: 0.8;
  line-height: 1;
  margin-top: 0.1rem;
}

.step-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.step-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.outline-btn {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  display: inline-block;
  text-decoration: none;
  width: auto;
}

.outline-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

/* Beautified Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.info-item {
  background: rgba(15, 23, 42, 0.5);
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--glass-border);
}

.info-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.info-value {
  font-size: 0.9rem;
  font-weight: 500;
  word-break: break-all;
}

.text-success { color: var(--success-color); }
.text-error { color: var(--error-color); }
.text-primary { color: var(--primary-color); }

.filter-select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}
.filter-select option {
  background: var(--bg-color);
  color: var(--text-primary);
}
