/* Log Analyzer Styles — aligned with IDE Playground design system */

/* ── Theme variables ── */
[data-md-color-scheme="slate"] {
  --log-bg-start: #1b2735;
  --log-bg-end: #243b4a;
  --log-section-bg: rgba(0, 0, 0, 0.20);
  --log-header-bg: rgba(0, 0, 0, 0.35);
  --log-border: rgba(255, 255, 255, 0.08);
  --log-border-accent: rgba(255, 255, 255, 0.15);
  --log-border-strong: rgba(255, 255, 255, 0.22);
  --log-subtle-border: rgba(255, 255, 255, 0.15);
  --log-container-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-md-color-scheme="light"] {
  --log-bg-start: #e8f0f8;
  --log-bg-end: #d0dfee;
  --log-section-bg: rgba(0, 50, 100, 0.06);
  --log-header-bg: rgba(0, 50, 100, 0.09);
  --log-border: rgba(0, 50, 100, 0.12);
  --log-border-accent: rgba(0, 50, 100, 0.18);
  --log-border-strong: rgba(0, 50, 100, 0.22);
  --log-subtle-border: rgba(0, 50, 100, 0.18);
  --log-container-shadow: 0 8px 32px rgba(0, 50, 100, 0.12);
}

/* Main container */
.log-analyzer-container {
  background: linear-gradient(135deg, var(--log-bg-start), var(--log-bg-end));
  color: var(--text-color);
  padding: 0;
  overflow: hidden;
  min-height: 600px;
  width: 100%;
}

/* Main Container Layout */
.main-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Tab navigation */
.log-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--log-header-bg);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid var(--log-border-accent);
  margin: 0;
  padding: 10px 0;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.log-tab {
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--log-border-accent);
  padding: 0 24px;
  height: 40px;
  margin: 0 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: .8px;
  position: relative;
  min-width: 100px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.log-tab:hover {
  background: var(--log-section-bg);
  border-color: var(--log-border-strong);
  color: var(--button-hover);
}

.log-tab:active {
  transform: scale(.96);
  transition-duration: .08s;
}

.log-tab.active {
  background: linear-gradient(135deg, var(--highlight-color), var(--button-hover));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(0, 140, 180, .35), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}

/* Tab content with smooth transitions */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-in-out;
  padding: 20px 5px; /* Remove left/right padding for full-width log display */
}

.tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Add left/right padding back for non-log content elements
.tab-content .scenario-selector,
.tab-content .controls-container,
.tab-content .log-stats {
  margin-left: 30px;
  margin-right: 30px;
} */

/* Scenario selector */
.scenario-selector {
  margin-bottom: 30px;
  text-align: center;
  padding: 20px;
  background: var(--log-section-bg);
  border-radius: 10px;
  border: 1px solid var(--log-border);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  position: relative;
  overflow: visible;
  transition: border-color .2s ease;
}

.scenario-selector:hover {
  border-color: var(--log-border-accent);
}

.scenario-selector::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
  z-index: -1; /* Ensure shimmer doesn't interfere with click events */
  pointer-events: none; /* Explicitly disable pointer events on shimmer */
}

.scenario-selector label {
  font-weight: 700;
  margin-right: 20px;
  color: var(--text-color);
  font-size: 16px;
  position: relative;
}

.scenario-selector label::before {
  content: '🔍';
  margin-right: 8px;
  font-size: 20px;
}

/* Scenario selector dropdown */
.scenario-selector select {
  background: linear-gradient(145deg, #141e28, #1a2a38);
  color: #d4dce6;
  border: 1px solid var(--log-border-accent);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-width: 280px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  appearance: none;
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 48px;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

/* Theme-aware dropdown arrow */
[data-md-color-scheme="slate"] .scenario-selector select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23e0e6ed' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

[data-md-color-scheme="light"] .scenario-selector select {
  background: linear-gradient(145deg, #d0dde8, #bccad8);
  color: #0f2a40;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23102a43' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
}

/* Dropdown options styling */
.scenario-selector select option {
  background: #141e28;
  color: #d4dce6;
  padding: 12px 16px;
  font-weight: 500;
}

/* Dark mode specific option styling */
[data-md-color-scheme="slate"] .scenario-selector select option {
  background: #141e28;
  color: #d4dce6;
}

[data-md-color-scheme="slate"] .scenario-selector select option:checked,
[data-md-color-scheme="slate"] .scenario-selector select option:hover {
  background: #047180;
  color: white;
}

/* Light mode specific option styling */
[data-md-color-scheme="light"] .scenario-selector select option {
  background: #d0dde8;
  color: #0f2a40;
}

[data-md-color-scheme="light"] .scenario-selector select option:checked,
[data-md-color-scheme="light"] .scenario-selector select option:hover {
  background: #4D81A7;
  color: white;
}

.scenario-selector select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 140, 180, 0.12);
  border-color: var(--highlight-color);
}

.scenario-selector select:hover {
  border-color: var(--log-border-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Analysis tools visibility control */
#log-analyzer-main {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#log-analyzer-main.visible {
  opacity: 1;
  transform: translateY(0);
}

#log-analysis-tools {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#log-analysis-tools.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Controls Container - Side by Side Layout */
.controls-container {
  display: flex;
  flex-direction: column; /* Changed from row to column for vertical stacking */
  gap: 20px; /* Reduced gap between panels */
  width: 100%;
  margin-bottom: 0px; /* Remove bottom margin to bring closer to log container */
}

.log-container {
  margin-top: 0px; /* Remove top margin to bring closer to controls container */
}

/* Filters Section */
.filters-section {
  flex: none;
  width: 100%;
  background: var(--log-section-bg);
  border-radius: 10px;
  padding: 15px 20px;
  border: 1px solid var(--log-border);
  order: 2;
  transition: border-color .2s ease;
}
.filters-section:hover {
  border-color: var(--log-border-accent);
}

.filters-section h4 {
  color: var(--button-hover);
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  display: inline-block;
  margin-right: 20px;
}

/* Quiz Section */
.quiz-section {
  flex: none;
  width: 100%;
  background: var(--log-section-bg);
  border-radius: 10px;
  padding: 15px 20px;
  border: 1px solid var(--log-border);
  display: none;
  order: 1;
  transition: border-color .2s ease;
}
.quiz-section:hover {
  border-color: var(--log-border-accent);
}

.quiz-section h4 {
  color: var(--button-hover);
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  display: inline-block;
  margin-right: 20px;
}

/* Quiz Content Optimization - 50% height reduction */
.quiz-content {
  padding: 8px 0; /* Reduced from 16px */
  margin: 0;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px; /* Reduced from 16px */
  padding: 6px 0; /* Reduced from 12px */
  border-bottom: 1px solid var(--log-subtle-border);
}

.quiz-header h4 {
  margin: 0;
  font-size: 14px; /* Reduced from 16px */
  font-weight: 600;
}

.quiz-progress {
  font-size: 12px; /* Reduced from 14px */
  color: var(--text-color);
  font-weight: 500;
}

.quiz-body {
  margin-bottom: 8px; /* Reduced from 16px */
}

.question {
  margin-bottom: 8px; /* Reduced from 16px */
}

.question h5 {
  font-size: 14px; /* Reduced from 16px */
  margin-bottom: 6px; /* Reduced from 12px */
  line-height: 1.3; /* Tighter line height */
  color: var(--text-color);
  font-weight: 600;
}

/* Horizontal layout for quiz inputs and options */
.quiz-input {
  width: 100%;
  padding: 6px 10px; /* Reduced from 12px 16px */
  font-size: 13px; /* Reduced from 14px */
  background: linear-gradient(145deg, var(--button-bg), rgba(255, 255, 255, 0.05));
  color: var(--text-color);
  border: 1px solid var(--log-subtle-border);
  border-radius: 4px; /* Reduced from 6px */
  margin-bottom: 6px; /* Reduced from 12px */
}

.multiple-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Horizontal grid layout */
  gap: 6px; /* Reduced from 12px */
  margin-bottom: 6px; /* Reduced from 12px */
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 6px; /* Reduced from 8px */
  padding: 4px 8px; /* Reduced from 8px 12px */
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px; /* Reduced from 6px */
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 12px; /* Reduced from 14px */
  line-height: 1.2; /* Tighter line height */
}

.choice-option:hover {
  background: var(--log-section-bg);
}

.choice-option input {
  margin: 0;
  flex-shrink: 0;
}

/* Quiz navigation - horizontal compact layout */
.quiz-controls {
  margin-top: 8px; /* Reduced from 16px */
}

.quiz-navigation {
  display: flex;
  gap: 6px; /* Reduced from 10px */
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.quiz-navigation .btn-cyber {
  padding: 4px 8px; /* Reduced from 8px 16px */
  font-size: 11px; /* Reduced from 12px */
  border-radius: 4px; /* Reduced from 6px */
  min-width: 60px; /* Reduced from 80px */
  white-space: nowrap;
}

/* Quiz hints - compact layout */
.question-hints {
  margin-top: 6px; /* Reduced from 12px */
}

.hint-btn {
  padding: 3px 6px; /* Reduced from 6px 12px */
  font-size: 10px; /* Reduced from 12px */
  background: var(--log-section-bg);
  border: 1px solid var(--log-subtle-border);
  color: var(--text-color);
  border-radius: 3px; /* Reduced from 6px */
  cursor: pointer;
  margin-bottom: 4px; /* Reduced from 8px */
}

.hints-content ul {
  margin: 4px 0; /* Reduced from 8px */
  padding-left: 16px; /* Reduced from 20px */
}

.hints-content li {
  font-size: 11px; /* Reduced from 12px */
  line-height: 1.3; /* Tighter line height */
  margin-bottom: 2px; /* Reduced from 4px */
  color: var(--text-color);
}

/* Quiz feedback - compact */
.quiz-feedback {
  margin-top: 6px; /* Reduced from 12px */
}

.feedback-notification {
  min-width: 300px !important; /* Double of 300px */
  max-width: 600px !important; /* Double of 600px */
  padding: 20px !important; /* Double of 20px */
  font-size: 15px !important; /* Double of 15px */
  font-weight: 600;
  text-align: center;
  border-radius: 10px !important; /* Double of 10px */
}

.feedback-notification.success {
  background: rgba(50, 205, 50, 0.2);
  color: #32cd32;
  border: 1px solid rgba(50, 205, 50, 0.4);
}

.feedback-notification.error {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.4);
}

/* Quiz results - compact layout */
.quiz-results {
  text-align: center;
  padding: 8px; /* Reduced from 16px */
}

.quiz-results h4 {
  margin-bottom: 8px; /* Reduced from 16px */
  font-size: 16px; /* Reduced from 18px */
}

.score-display {
  margin-bottom: 8px; /* Reduced from 16px */
}

.score-circle {
  width: 60px; /* Reduced from 80px */
  height: 60px; /* Reduced from 80px */
  border-radius: 50%;
  background: linear-gradient(145deg, var(--highlight-color), var(--button-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px; /* Reduced from 16px */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.score-value {
  font-size: 16px; /* Reduced from 20px */
  font-weight: 700;
  color: white;
}

.results-details {
  margin-bottom: 8px; /* Reduced from 16px */
}

.results-details p {
  font-size: 12px; /* Reduced from 14px */
  margin-bottom: 6px; /* Reduced from 12px */
}

.detailed-results {
  max-height: 120px; /* Reduced from 200px */
  overflow-y: auto;
  margin-top: 6px; /* Reduced from 12px */
}

.question-result {
  padding: 4px 6px; /* Reduced from 8px 12px */
  margin-bottom: 4px; /* Reduced from 8px */
  border-radius: 3px; /* Reduced from 6px */
  font-size: 10px; /* Reduced from 12px */
  line-height: 1.3;
}

.question-result.correct {
  background: rgba(50, 205, 50, 0.1);
  border-left: 3px solid #32cd32;
}

.question-result.incorrect {
  background: rgba(255, 107, 107, 0.1);
  border-left: 3px solid #ff6b6b;
}

/* Mobile responsive adjustments for quiz */
@media (max-width: 768px) {
  .multiple-choice {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 4px; /* Further reduced gap */
  }
  
  .quiz-navigation {
    flex-direction: column;
    gap: 4px;
  }
  
  .quiz-navigation .btn-cyber {
    width: 100%;
    min-width: auto;
  }
  
  .choice-option {
    padding: 6px 8px; /* Slightly larger padding on mobile for touch */
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:focus,
input:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 140, 180, 0.12);
}

.log-entry:focus-within {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .log-analyzer-container {
    background: white;
    color: black;
    box-shadow: none;
  }
  
  .log-tabs,
  .analysis-controls,
  .quiz-navigation {
    display: none;
  }
  
  .log-display {
    border: 1px solid black;
    max-height: none;
    overflow: visible;
  }
  
  .log-content {
    background: white;
    color: black;
    border: 1px solid black;
  }
  
  .log-entries {
    background: white;
    color: black;
    max-height: none;
    overflow: visible;
  }
  
  .line-number {
    color: #666;
    background: #f0f0f0;
  }
  
  .highlight {
    background: yellow;
    color: black;
  }
}

/* Scenario info styling */
.scenario-header {
  background: var(--log-section-bg);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--log-border);
}

.scenario-header h3 {
  color: var(--button-hover);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.scenario-description {
  color: var(--text-color);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.scenario-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: linear-gradient(145deg, var(--highlight-color), var(--button-hover));
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scenario-hints {
  background: var(--log-section-bg);
  border-radius: 8px;
  padding: 15px;
  border-left: 3px solid rgba(255, 193, 7, .55);
}

.scenario-hints h4 {
  color: var(--text-color);
  margin-bottom: 10px;
  font-size: 16px;
}

.scenario-hints ul {
  margin: 0;
  padding-left: 20px;
}

.scenario-hints li {
  color: var(--text-color);
  margin-bottom: 5px;
  line-height: 1.4;
}

/* Analysis controls initial state - hidden until scenario selected */
.analysis-controls {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.4s ease-in-out;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0;
  padding: 0;
}

.analysis-controls.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  max-height: 100px; /* Reduced from 200px to 100px for 50% reduction */
  overflow: visible;
  margin-bottom: 0; /* Removed bottom margin */
  padding: 15px 0; /* Reduced vertical padding */
  display: flex;
  flex-direction: row; /* Changed to horizontal layout */
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: row; /* Changed from column to row for horizontal layout */
  gap: 10px; /* Increased from 8px */
  align-items: center;
  flex: 1;
  min-width: 200px;
}

/* Control group labels */
.control-group label {
  font-weight: 700;
  color: var(--text-color);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0;
  margin-right: 10px;
  position: relative;
  display: inline-block;
  white-space: nowrap;
  min-width: fit-content;
}

.control-group label::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--highlight-color);
  transition: width 0.3s ease;
}

.control-group:hover label::after {
  width: 100%;
}

/* Input and select styling */
.control-group input,
.control-group select {
  background: var(--modal-bg);
  color: var(--text-color);
  border: 1px solid var(--log-border-accent);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color .2s ease, box-shadow .2s ease;
  position: relative;
  flex: 1;
  min-width: 120px;
}

.control-group input:hover,
.control-group select:hover {
  border-color: var(--log-border-strong);
}

.control-group input:focus,
.control-group select:focus {
  outline: none;
  border-color: var(--highlight-color);
  box-shadow: 0 0 0 2px rgba(0, 140, 180, 0.12);
}

.control-group input::placeholder {
  color: var(--text-color);
  opacity: 0.5;
  font-style: italic;
  font-weight: 400;
}

.control-buttons {
  display: flex;
  flex-direction: row; /* Changed from column to row */
  gap: 10px;
  align-items: center; /* Changed from stretch to center */
  margin-left: auto; /* Push buttons to the right */
}

/* Button styling */
.btn-analyze {
  background: linear-gradient(145deg, var(--button-bg), var(--button-bg-hover));
  color: var(--text-color);
  border: 1px solid var(--log-border-accent);
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-analyze:hover {
  background: linear-gradient(145deg, var(--button-bg-hover), var(--highlight-color));
  border-color: var(--log-border-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 140, 180, 0.3);
}

.btn-analyze:active {
  transform: scale(.97);
  transition-duration: .08s;
}

/* Log Statistics Section - Enhanced */
.log-stats {
  background: var(--log-section-bg);
  border-radius: 10px;
  padding: 16px 20px;
  border: 1px solid var(--log-border);
  transition: border-color .2s ease;
}
.log-stats:hover {
  border-color: var(--log-border-accent);
}

.log-stats h4 {
  color: var(--button-hover);
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: left;
  position: relative;
  display: inline-block;
}

.log-stats h4::after {
  content: '';
  position: absolute;
  bottom: -6px; /* Adjusted from -8px */
  left: 0; /* Changed from 50% to 0 */
  transform: none; /* Removed translateX */
  width: 40px; /* Reduced from 60px */
  height: 2px; /* Reduced from 3px */
  background: linear-gradient(90deg, 
    var(--highlight-color), 
    var(--button-hover)
  );
  border-radius: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Reduced from 240px */
  gap: 15px; /* Reduced from 20px */
  align-items: center;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--log-header-bg);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--log-border);
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
  border-color: var(--log-border-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-label {
  color: var(--text-color);
  font-weight: 600;
  font-size: 14px;
  opacity: 0.95;
}

.stat-value {
  color: var(--button-hover);
  font-weight: 700;
  font-size: 16px;
  font-family: 'Consolas', 'Monaco', monospace;
  text-align: right;
}

/* Log Content Section */
.log-content {
  background: var(--log-section-bg);
  border-radius: 10px;
  border: 1px solid var(--log-border-accent);
  overflow: hidden;
  box-shadow: var(--log-container-shadow);
  position: relative;
}

.log-entries {
  background: #000000; /* Pure black terminal background */
  color: #ffffff; /* Pure white terminal text */
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.4;
  max-height: 550px;
  overflow-y: auto;
  padding: 0; /* Remove all padding for true left alignment */
  position: relative;
  border-radius: 8px;
  margin: 0; /* Remove all margins for full width */
  border: 1px solid var(--log-border);
  width: 100%;
  box-sizing: border-box;
}

/* Thin scrollbar for log entries */
.log-entries::-webkit-scrollbar {
  width: 4px;
}

.log-entries::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

.log-entries::-webkit-scrollbar-thumb {
  background: var(--log-border-accent);
  border-radius: 4px;
}

.log-entries::-webkit-scrollbar-thumb:hover {
  background: var(--log-border-strong);
}

/* Individual Log Entries - Terminal Style */
.log-entry {
  display: block; /* Changed from flex to block for single-line terminal look */
  padding: 0px; /* Minimal padding - reduced vertical from 4px to 2px */
  border-bottom: none; /* Remove borders for clean terminal look */
  transition: all 0.2s ease;
  position: relative;
  margin: 0; /* Removed negative margin, was -15px */
  border-radius: 0; /* Remove border radius for terminal look */
  color: #ffffff; /* Terminal white text */
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.0; /* Increased for better multi-line readability */
  white-space: pre-wrap; /* Preserve whitespace like in terminal */
  word-wrap: break-word;
  width: 100%; /* Ensure full width */
  box-sizing: border-box;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.1); /* Subtle highlight on hover */
  color: #00ff00; /* Classic terminal green on hover */
}

.log-entry:last-child {
  border-bottom: none;
}

/* Line Numbers - Hidden for terminal look */
.line-number {
  display: none; /* Hide line numbers to simulate real terminal */
}

/* Log Content Text - Terminal Style */
.log-content-text,
.log-content span {
  color: #ffffff; /* Terminal white text */
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Log Entry Type Styling - Terminal Colors */
.log-entry[data-type="apache"] .log-content-text {
  color: #87ceeb; /* Sky blue for Apache logs */
}

.log-entry[data-type="ssh"] .log-content-text {
  color: #98fb98; /* Pale green for SSH logs */
}

.log-entry[data-type="system"] .log-content-text {
  color: #dda0dd; /* Plum for system logs */
}

.log-entry[data-type="generic"] .log-content-text {
  color: #ffffff; /* White for generic logs */
}

/* Highlighting and Status Colors - Terminal Style */
.highlight {
  background: #ffff00; /* Bright yellow highlight */
  color: #000000; /* Black text on yellow */
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: bold;
}

.error-entry {
  color: #ff6b6b !important; /* Red for errors */
  font-weight: bold;
}

.warning-entry {
  color: #ffa500 !important; /* Orange for warnings */
  font-weight: bold;
}

.success-entry {
  color: #32cd32 !important; /* Green for success */
  font-weight: bold;
}

/* Empty States - Terminal Style */
.log-entries:empty::before {
  content: 'No log entries to display. Select a scenario to begin analysis.';
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: #888888;
  font-style: italic;
  font-size: 16px;
  text-align: center;
  background: #000000;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
}

/* Loading State for Log Content */
.log-content.loading {
  position: relative;
  min-height: 200px;
}

.log-content.loading::after {
  content: '⚡ Analyzing logs...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--highlight-color);
  font-weight: 600;
  font-size: 16px;
  animation: pulse 1.5s infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes loading-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}