/* Prompt Generator Specific Styles */

.pg-page {
  /* Using variables from parent styles.css */
}

/* Typography Overrides */
.pg-hero {
  padding: 54px 0 44px;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.pg-hero-content {
  margin-bottom: 50px;
}

.pg-hero h1 {
  font-size: 4.7rem;
  margin: 0 auto 24px auto;
  max-width: 960px;
  line-height: 0.96;
  letter-spacing: 0;
}

.pg-hero .hero-copy {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 24px;
}

/* Glassmorphism Tool Container */
.glass-tool-container {
  background: rgba(15, 20, 17, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(138, 244, 203, 0.15);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: left;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #eaf2ec;
  margin-bottom: 60px;
  font-family: "Space Grotesk", sans-serif;
  animation: rise 800ms ease both;
  animation-delay: 200ms;
}

.tool-tabs {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0;
}

.tool-tab {
  background: transparent;
  border: none;
  color: #8c9b91;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0 0 15px 0;
  position: relative;
  transition: color 0.2s ease;
}

.tool-tab:hover {
  color: #fff;
}

.tool-tab.active {
  color: #8af4cb;
}

.tool-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #8af4cb;
  box-shadow: 0 -2px 10px rgba(138, 244, 203, 0.5);
}

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

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

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.input-grid .input-group {
  margin-bottom: 0;
}

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

.input-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #d1ddd5;
}

.required {
  color: #ff6b6b;
}

.input-group input,
.input-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
  resize: vertical;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #8af4cb;
  box-shadow: 0 0 0 3px rgba(138, 244, 203, 0.15);
  background: rgba(0, 0, 0, 0.5);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: #5c6961;
}

.helper-text {
  font-size: 0.8rem;
  color: #7b8a80;
  margin-top: 6px;
}

/* Checkbox */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #c6d2ca;
  user-select: none;
}

.checkbox-container input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.3);
}

.checkbox-container input:checked ~ .checkmark {
  background: #8af4cb;
  border-color: #8af4cb;
}

.checkbox-container input:checked ~ .checkmark::after {
  content: "\2713";
  color: #0f1411;
  font-weight: 900;
  font-size: 0.9rem;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.generate-btn {
  font-size: 1.05rem;
  padding: 14px 28px;
  box-shadow: 0 8px 20px rgba(9, 127, 87, 0.3);
  cursor: pointer;
  border: none;
}

/* Output Section */
.output-container {
  margin-top: 40px;
  background: #000;
  border-radius: 12px;
  border: 1px solid rgba(138, 244, 203, 0.3);
  overflow: hidden;
  animation: fadeIn 0.4s ease;
}

.output-container.hidden {
  display: none;
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.output-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #8af4cb;
}

.output-actions {
  display: flex;
  gap: 10px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
}
.btn-sm:hover {
  background: rgba(255,255,255,0.2);
}

pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #eaf2ec;
  white-space: pre-wrap;
}

.output-footer {
  padding: 14px 20px;
  background: rgba(138, 244, 203, 0.05);
  border-top: 1px solid rgba(138, 244, 203, 0.15);
  font-size: 0.9rem;
  color: #b0c0b6;
}

.output-footer a {
  color: #8af4cb;
}

/* Content Sections */
.content-sections {
  max-width: 960px;
  margin: 0 auto;
}

.info-block {
  margin: 38px 0;
  padding: 44px 0;
  border-top: 1px solid rgba(16, 18, 15, 0.1);
}

.info-block h2 {
  font-size: 2.6rem;
  line-height: 1.05;
  margin-top: 0;
  margin-bottom: 24px;
}

.info-block h3 {
  font-size: 1.5rem;
  margin-top: 32px;
  margin-bottom: 16px;
}

.info-block p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.takeaway-box {
  background: linear-gradient(135deg, rgba(13, 159, 110, 0.1), transparent);
  border-left: 4px solid var(--brand);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  font-size: 1.1rem;
  color: var(--ink);
}

/* Dark Hacker Section */
.dark-section {
  background: #0f1411;
  color: #eaf2ec;
  padding: 60px;
  border-radius: var(--radius-lg);
  border: none;
}

.dark-section h2, .dark-section h3 {
  color: #fff;
}

.dark-section p {
  color: #c6d2ca;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.step-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  position: relative;
}

.step-num {
  position: absolute;
  top: -20px;
  left: 24px;
  width: 40px;
  height: 40px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 8px 16px rgba(13, 159, 110, 0.3);
}

.step-card h3 {
  margin-top: 10px;
  font-size: 1.2rem;
  color: #8af4cb;
}

.step-card ul {
  padding-left: 20px;
  color: #a4b5aa;
}

.step-card li {
  margin-bottom: 8px;
}

/* Grid layout for Contract items */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.contract-item {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease;
}

.contract-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.04);
}

.contract-item h4 {
  margin: 0 0 10px 0;
  font-size: 1.15rem;
  color: var(--brand-dark);
}

.contract-item p {
  margin: 0;
  font-size: 1rem;
}

.alert-box {
  margin-top: 40px;
  background: #fff5eb;
  border: 1px solid #ffd4a8;
  padding: 24px;
  border-radius: var(--radius-md);
}

.alert-box h4 {
  margin: 0 0 10px 0;
  color: #c25900;
  font-size: 1.1rem;
}

/* Alternate BG Section */
.alternate-bg {
  background: #ffffff;
  padding: 60px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0,0,0,0.02);
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.job-card {
  background: var(--bg);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px dashed #c0c6ba;
}

.job-card h4 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.job-card p {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

/* Best Practices List */
.best-practices {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.best-practices li {
  margin-bottom: 24px;
  padding-left: 24px;
  position: relative;
}

.best-practices li::before {
  content: "->";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: bold;
}

.best-practices strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--ink);
}

/* FAQ Section */
.faq-list details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-list summary {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--brand);
  transition: transform 0.3s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p, .faq-list details ul {
  padding: 0 24px 24px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.faq-list details ul {
  padding-left: 44px;
  padding-bottom: 24px;
}

/* Bottom CTA */
.bottom-cta {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(to bottom, transparent, rgba(13, 159, 110, 0.05));
  border-radius: var(--radius-lg);
  margin-bottom: 60px;
}

.bottom-cta h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.bottom-cta p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  color: var(--muted);
}

.cta-center {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Advanced Toggle */
.advanced-toggle-container {
  margin-top: 10px;
  margin-bottom: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 15px;
}

.toggle-advanced-btn {
  background: none;
  border: none;
  color: #8af4cb;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-left: -12px;
  border-radius: 8px;
  transition: background 0.2s, opacity 0.2s;
}

.toggle-advanced-btn:hover,
.toggle-advanced-btn:focus {
  background: rgba(138, 244, 203, 0.08);
  outline: none;
}

.toggle-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: rgba(138, 244, 203, 0.2);
  border-radius: 6px;
  text-align: center;
  line-height: 18px;
  font-weight: bold;
  font-size: 1.1rem;
}

.advanced-fields {
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
  opacity: 1;
  padding-bottom: 10px;
}

.advanced-fields.hidden {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}

/* Animations replacements for images */

/* Wrapper vs Orchestrator */
.anim-wrapper-vs-orchestrator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

.anim-col {
  background: var(--bg);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.anim-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
  background: var(--line);
}

.anim-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  width: 100%;
}

.anim-arrow {
  color: var(--muted);
  font-size: 1.5rem;
  margin: 10px 0;
}

.anim-fade {
  color: var(--muted);
  opacity: 0.8;
}

.anim-glow {
  border-color: var(--brand);
  background: #f0fbf6;
  color: var(--brand-dark);
}

.anim-success {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand-dark);
  font-weight: bold;
}

/* 3-step Flowchart Line */
.anim-flowchart {
  position: relative;
  height: 40px;
  margin: 30px 0 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-line {
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(138, 244, 203, 0.2);
  z-index: 1;
}

.flow-dots {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  width: 80%;
}

.flow-dot {
  width: 14px;
  height: 14px;
  background: #8af4cb;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(138, 244, 203, 0.5);
  animation: pulse 2s infinite;
}

.flow-dot:nth-child(2) { animation-delay: 0.6s; }
.flow-dot:nth-child(3) { animation-delay: 1.2s; }

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(138, 244, 203, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 10px rgba(138, 244, 203, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(138, 244, 203, 0); }
}

/* Prompt Contract Breakdown */
.anim-prompt-contract {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  padding: 24px;
  background: #fafaf8;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  justify-content: center;
}

.contract-block {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.1);
  text-align: center;
  flex: 1 1 120px;
}

.ob-bg { background: #ffebee; color: #c62828; }
.cx-bg { background: #e3f2fd; color: #1565c0; }
.co-bg { background: #fff3e0; color: #ef6c00; }
.ex-bg { background: #e8f5e9; color: #2e7d32; }
.sc-bg { background: #f3e5f5; color: #6a1b9a; }

/* Before / After Diff */
.anim-diff {
  background: #0f1411;
  border-radius: var(--radius-md);
  margin-top: 30px;
  overflow: hidden;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
}

.diff-header {
  background: rgba(255,255,255,0.05);
  padding: 10px 16px;
  color: #a4b5aa;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.diff-before {
  padding: 16px;
  background: rgba(255, 107, 107, 0.1);
  color: #ff9e9e;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.diff-after {
  padding: 16px;
  background: rgba(138, 244, 203, 0.05);
  color: #8af4cb;
}

.diff-line {
  margin-bottom: 4px;
}

.diff-minus { color: #ff6b6b; margin-right: 8px; }
.diff-plus { color: #8af4cb; margin-right: 8px; }

/* Prompt Library Versioning */
.anim-library-ui {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-top: 30px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.lib-header {
  padding: 16px 20px;
  background: var(--bg);
  font-weight: bold;
  border-bottom: 1px solid var(--line);
}

.lib-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
}

.lib-row:last-child { border-bottom: none; }

.lib-v3 { background: #f4fdf8; }
.lib-v2 { background: #fff; color: var(--muted); }
.lib-v1 { background: #fafaf8; color: #888; text-decoration: line-through; }

.lib-succ {
  font-weight: bold;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.85rem;
}

.success-high { background: #dff7ea; color: var(--brand-dark); }
.success-med { background: #fff3e0; color: #ef6c00; }
.success-low { background: #ffebee; color: #c62828; }

@media (max-width: 768px) {
  .input-grid, .steps-grid, .grid-2col, .jobs-grid {
    grid-template-columns: 1fr;
  }
  
  .dark-section, .alternate-bg {
    padding: 30px 20px;
  }
  
  .pg-hero h1 {
    font-size: 2.55rem;
  }
  
  .tool-tabs {
    flex-direction: column;
  }
  
  .anim-wrapper-vs-orchestrator {
    grid-template-columns: 1fr;
  }
}

/* API & UI feedback */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.status-msg {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

.status-msg.error {
  display: block;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ff8e8e;
}

.status-msg.info {
  display: block;
  background: rgba(138, 244, 203, 0.1);
  border: 1px solid rgba(138, 244, 203, 0.3);
  color: #8af4cb;
}
