/* ============================================
   ROBOTS.TXT GENERATOR 2026 — MODERN STYLES
   ============================================ */

/* CSS Variables for Theming */
:root {
  --primary: #274c77;
  --primary-light: #6096ba;
  --primary-glow: rgba(39, 76, 119, 0.3);
  --accent: #00d4aa;
  --accent-glow: rgba(0, 212, 170, 0.2);
  --danger: #ff4757;
  --warning: #ffa502;
  --success: #2ed573;
  
  --bg: #f0f3fb;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-panel: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(39, 76, 119, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 212, 170, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  padding-top: 70px;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero Section */
.generator-hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-content .badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  color: white;
  font-size: 0.9rem;
  padding: 4px 14px;
  border-radius: 100px;
  vertical-align: middle;
  margin-left: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Workspace Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 60px;
}

@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* Panels */
.control-panel,
.preview-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.control-panel:hover,
.preview-panel:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.panel-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

/* Buttons */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-add {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border: 2px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: rgba(96, 150, 186, 0.05);
}

.btn-add.primary {
  border-style: solid;
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(39, 76, 119, 0.05);
}

.btn-add.primary:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-remove {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-remove:hover {
  background: rgba(255, 71, 87, 0.1);
  color: var(--danger);
}

.btn-generate {
  width: 100%;
  padding: 16px;
  margin-top: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px var(--primary-glow);
  position: relative;
  overflow: hidden;
}

.btn-generate::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-generate:hover::after {
  left: 100%;
}

.btn-generate:active {
  transform: translateY(0);
}

/* Form Sections */
.form-section {
  margin-bottom: 28px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-label {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

#templateSelect {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

#templateSelect:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Inputs */
input[type="url"],
input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-panel);
  color: var(--text);
  transition: var(--transition);
}

input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

input::placeholder {
  color: #94a3b8;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text);
}

.input-group small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Sitemap Inputs */
.sitemap-input,
.disallow-input,
.allow-input {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  animation: slideIn 0.3s ease;
}

/* Rule Block */
.rule-block {
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  animation: slideIn 0.3s ease;
  transition: var(--transition);
}

.rule-block:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.rule-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.rule-block-title {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

.user-agent-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--bg-panel);
  font-size: 0.9rem;
  cursor: pointer;
}

.rule-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rule-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rule-row select {
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
}

.rule-row input {
  flex: 1;
}

/* Advanced Accordion */
.accordion-toggle {
  width: 100%;
  padding: 14px;
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.accordion-toggle:hover {
  background: rgba(39, 76, 119, 0.05);
  border-color: var(--primary-light);
}

.accordion-toggle i {
  transition: transform 0.3s ease;
}

.accordion-toggle.active i {
  transform: rotate(90deg);
}

.advanced-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 4px;
}

.advanced-content.open {
  max-height: 500px;
  padding: 16px 4px 0;
}

/* Preview Panel */
.preview-container {
  position: relative;
  background: #0f172a;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

#robotsPreview {
  margin: 0;
  padding: 24px;
  background: transparent;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
}

#robotsPreview code {
  font-family: inherit;
}

/* Syntax Highlighting Colors */
.hljs-comment { color: #6b7280; font-style: italic; }
.hljs-keyword { color: #f472b6; }
.hljs-string { color: #a5f3fc; }
.hljs-number { color: #fcd34d; }

.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-overlay.hidden {
  display: none;
}

.pulse {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  animation: pulse 1.5s infinite;
}

/* Score Card */
.score-card {
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.05), rgba(0, 212, 170, 0.05));
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 24px;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.score-label {
  font-weight: 700;
  color: var(--text);
}

.score-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.score-bar {
  height: 8px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 16px;
}

.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 100px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-checks {
  list-style: none;
}

.score-checks li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.score-checks li.pass { color: var(--success); }
.score-checks li.fail { color: var(--danger); }
.score-checks li.warn { color: var(--warning); }

/* Bot Analysis */
.bot-analysis {
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.bot-analysis h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bot-map {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.bot-item:hover {
  transform: translateX(4px);
}

.bot-name {
  font-weight: 600;
  color: var(--text);
}

.bot-status {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 600;
}

.bot-status.allowed {
  background: rgba(46, 213, 115, 0.1);
  color: var(--success);
}

.bot-status.blocked {
  background: rgba(255, 71, 87, 0.1);
  color: var(--danger);
}

.bot-status.partial {
  background: rgba(255, 165, 2, 0.1);
  color: var(--warning);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
  font-style: italic;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--bg-panel);
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 300px;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

.toast-icon {
  font-size: 1.2rem;
}

.toast-message {
  font-weight: 600;
  color: var(--text);
}

/* Content Section */
.content-modern {
  padding: 80px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.content-block {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.content-block:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.content-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px var(--primary-glow);
}

.content-block h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.content-block p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.05rem;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  padding: 12px 0;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li i {
  color: var(--accent);
  margin-top: 4px;
  flex-shrink: 0;
}

/* Feature Cards */
.card-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover .card-glow {
  opacity: 1;
}

.feature-card i {
  font-size: 2.5rem;
  color: var(--primary-light);
  margin-bottom: 20px;
  position: relative;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  position: relative;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  position: relative;
}

/* FAQ Modern */
.faq-modern {
  max-width: 800px;
  margin: 0 auto;
}

.faq-modern h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 40px;
}

.faq-item {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question i {
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.faq-question.active i {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 24px;
}

.faq-answer.open {
  max-height: 300px;
  padding: 0 24px 20px;
}

.faq-answer p {
  color: var(--text-muted);
  line-height: 1.8;
}

/* Related Tools */
.related-tools-wrap {
  margin-bottom: 40px;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .workspace-grid {
    gap: 24px;
  }
  
  .control-panel,
  .preview-panel {
    padding: 24px;
  }
  
  .panel-header {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .rule-row {
    flex-wrap: wrap;
  }
  
  .rule-row select {
    width: 100%;
  }
  
  .content-block {
    padding: 28px;
  }
  
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  
  .toast {
    min-width: unset;
    width: 100%;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}