/* pentest/public/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Caveat:wght@700&display=swap');

:root {
  --background: #08090c;
  --surface: rgba(13, 15, 20, 0.75);
  --primary: #ffb300; /* Neon Amber */
  --primary-glow: rgba(255, 179, 0, 0.25);
  --primary-container: rgba(255, 179, 0, 0.08);
  --on-background: #e6e8eb;
  --on-surface: #a3aab5;
  --outline: rgba(255, 179, 0, 0.15);
  --outline-active: rgba(255, 179, 0, 0.45);
  --transition-speed: 0.4s;
  --transition-bezier: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--background);
  color: var(--on-background);
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
}

/* Background Canvas */
.canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#doodle-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Layout Wrapper */
.main-wrapper {
  position: relative;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 3rem 1.5rem;
  z-index: 2;
}

/* Dashboard Card */
.dashboard-card {
  width: 100%;
  max-width: 950px;
  background: var(--surface);
  border: 1.5px solid var(--outline);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 
              0 0 40px rgba(255, 179, 0, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.badge {
  background: var(--primary-container);
  color: var(--primary);
  border: 1px solid var(--outline);
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1rem;
  box-shadow: 0 0 10px var(--primary-glow);
}

.title {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--on-background);
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 15px rgba(255, 179, 0, 0.15);
}

.description {
  font-size: 1rem;
  color: var(--on-surface);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Docker Banner */
.docker-status-banner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2rem;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.docker-status-banner.success {
  background-color: rgba(76, 175, 80, 0.06);
  border-color: rgba(76, 175, 80, 0.2);
  color: #81c784;
}

.docker-status-banner.error {
  background-color: rgba(244, 67, 54, 0.06);
  border-color: rgba(244, 67, 54, 0.2);
  color: #e57373;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-indicator.online {
  background-color: #4caf50;
  box-shadow: 0 0 8px #4caf50;
}

.status-indicator.offline {
  background-color: #f44336;
  box-shadow: 0 0 8px #f44336;
}

/* Scopes Grid */
.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 1.2rem;
  border-left: 3px solid var(--primary);
  padding-left: 0.6rem;
  text-shadow: 0 0 8px var(--primary-glow);
}

.scopes-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.scope-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.scope-card:hover {
  background: rgba(255, 179, 0, 0.02);
  border-color: rgba(255, 179, 0, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.scope-card input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  cursor: pointer;
}

.scope-card.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.2);
}

.scope-card.disabled:hover {
  border-color: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.scope-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.scope-name {
  font-weight: 600;
  color: var(--on-background);
  font-size: 0.95rem;
}

.scope-desc {
  font-size: 0.8rem;
  color: var(--on-surface);
  line-height: 1.4;
}

/* Target Configuration Section with transition */
.target-config-section {
  max-height: 600px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.6s var(--transition-bezier), 
              opacity 0.5s ease, 
              margin-bottom 0.6s var(--transition-bezier);
  margin-bottom: 2.5rem;
}

.target-config-section.hidden {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  pointer-events: none;
}

/* Form Inputs */
.form-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 280px;
  max-width: 100%;
  max-height: 150px;
  opacity: 1;
  overflow: hidden;
  transition: flex 0.5s var(--transition-bezier), 
              max-width 0.5s var(--transition-bezier), 
              max-height 0.5s var(--transition-bezier), 
              opacity 0.4s ease, 
              padding 0.5s var(--transition-bezier);
}

.form-group.hidden {
  flex: 0 0 0px;
  max-width: 0px;
  max-height: 0px;
  opacity: 0;
  pointer-events: none;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--on-background);
}

.required-asterisk {
  color: var(--primary);
  font-weight: 800;
  margin-left: 2px;
}

.form-group input[type="text"] {
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid var(--outline);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  color: var(--on-background);
  outline: none;
  transition: all 0.25s ease;
}

.form-group input[type="text"]:focus {
  border-color: var(--outline-active);
  box-shadow: 0 0 12px var(--primary-glow);
}

.helper-text {
  font-size: 0.8rem;
  color: var(--on-surface);
}

/* Submit Button */
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: #000;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1rem;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(255, 179, 0, 0.25);
}

.btn-submit:hover:not(:disabled) {
  background: #ffc107;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 179, 0, 0.4);
}

.btn-submit:disabled {
  background: rgba(255, 179, 0, 0.1);
  color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  cursor: not-allowed;
}

/* Terminal logs */
.terminal-wrapper {
  margin-top: 3rem;
  background: #040507;
  border: 1.5px solid rgba(255, 179, 0, 0.25);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.2rem;
  background: rgba(255, 179, 0, 0.05);
  border-bottom: 1.5px solid rgba(255, 179, 0, 0.15);
}

.terminal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge {
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 4px;
  text-transform: uppercase;
}

.status-badge.pulse {
  background: rgba(255, 179, 0, 0.15);
  color: var(--primary);
  border: 1px solid rgba(255, 179, 0, 0.3);
  animation: terminal-pulse 1.5s infinite alternate;
  display: inline-flex;
  align-items: center;
}

.status-badge.pulse::after {
  content: '...';
  animation: loading-dots 1.5s steps(4, end) infinite;
  display: inline-block;
  width: 0px;
  overflow: hidden;
  text-align: left;
}

.btn-submit.auditing::after {
  content: '...';
  animation: loading-dots 1.5s steps(4, end) infinite;
  display: inline-block;
  width: 12px;
  text-align: left;
  margin-left: 2px;
}

@keyframes loading-dots {
  0%, 100% { width: 0px; }
  30% { width: 4px; }
  60% { width: 8px; }
  90% { width: 12px; }
}

.status-badge.completed {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

@keyframes terminal-pulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.terminal-body {
  padding: 1.2rem;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e0e4eb;
  background-color: #040507;
  max-height: 350px;
  overflow-y: auto;
  user-select: text;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Report box */
.report-box {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem;
  background: rgba(76, 175, 80, 0.04);
  border-top: 1.5px solid rgba(76, 175, 80, 0.2);
}

.report-icon {
  color: #4caf50;
}

.report-icon svg {
  width: 32px;
  height: 32px;
}

.report-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.report-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #81c784;
}

.report-filename {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--on-surface);
}

.btn-download {
  background: #2e7d32;
  color: #fff;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
}

.btn-download:hover {
  background: #388e3c;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

/* Modal View Report */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #0a0b0f;
  border: 1.5px solid var(--outline-active);
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8),
              0 0 30px var(--primary-glow);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--outline);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  font-family: monospace;
}

.btn-close-modal {
  background: transparent;
  border: 1px solid var(--outline);
  color: var(--on-background);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.05);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
  background: #050608;
  flex: 1;
  user-select: text;
}

.btn-download-link {
  background: var(--primary) !important;
  color: #000000 !important;
  text-decoration: none !important;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.7rem 1.6rem;
  border-radius: 12px;
  transition: all 0.25s ease;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(255, 179, 0, 0.25);
  border: none;
  cursor: pointer;
}

.btn-download-link:hover {
  background: #ffc107 !important;
  color: #000000 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 179, 0, 0.4);
}

/* Markdown Rendering Styles */
.markdown-body h1 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 800;
  border-bottom: 1px solid var(--outline);
  padding-bottom: 0.5rem;
}

.markdown-body h2 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.markdown-body p {
  margin-bottom: 1rem;
}

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--outline);
  margin: 1.5rem 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--outline);
}

.markdown-body th, .markdown-body td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--outline);
}

.markdown-body th {
  background: rgba(255, 179, 0, 0.05);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.markdown-body td {
  font-size: 0.85rem;
  color: var(--on-background);
}

.markdown-body tr:hover {
  background: rgba(255, 179, 0, 0.02);
}

.markdown-body a {
  color: var(--primary);
  text-decoration: underline;
}

.markdown-body a:hover {
  color: #ffc107;
}

.markdown-body strong {
  color: var(--primary);
}

/* Responsive CSS */
@media (max-width: 768px) {
  .dashboard-card {
    padding: 2rem 1.5rem;
  }
  
  .title {
    font-size: 2.2rem;
  }
  
  .scopes-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer Copyright */
.footer {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--on-surface);
  opacity: 0.5;
  letter-spacing: 0.5px;
  width: 100%;
}

/* Progress Cards Styling */
.process-wrapper {
  background: var(--surface);
  border: 1.5px solid var(--outline);
  border-radius: 20px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.process-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.process-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1.2px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  transition: all 0.3s ease;
  opacity: 0.4;
}

.process-card.running {
  background: rgba(255, 179, 0, 0.03);
  border-color: rgba(255, 179, 0, 0.2);
  box-shadow: 0 0 15px rgba(255, 179, 0, 0.05);
  opacity: 1;
}

.process-card.completed {
  background: rgba(46, 125, 50, 0.03);
  border-color: rgba(46, 125, 50, 0.2);
  opacity: 1;
}

.card-status-icon {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pixel-icon {
  image-rendering: pixelated;
  display: block;
}

@keyframes pixel-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pixel-running {
  animation: pixel-spin 2.5s steps(8) infinite;
}

.card-info {
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--on-background);
}

.process-card.running .card-title {
  color: var(--amber);
}

.process-card.completed .card-title {
  color: #81c784;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--on-surface);
  opacity: 0.7;
  margin-top: 0.2rem;
}

/* Result Container Styles */
.result-container {
  background: var(--surface);
  border: 1.5px solid var(--outline-active);
  border-radius: 20px;
  padding: 1.8rem;
  margin-top: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--outline);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.result-body {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.5rem;
  font-family: inherit;
  color: var(--on-background);
  line-height: 1.6;
}

/* Custom scrollbar for results */
.result-body::-webkit-scrollbar {
  width: 6px;
}
.result-body::-webkit-scrollbar-track {
  background: transparent;
}
.result-body::-webkit-scrollbar-thumb {
  background: var(--outline);
  border-radius: 3px;
}
