/* ===== GLOBAL COLOR VARIABLES ===== */
:root {
  --primary: #4dabf7;      /* Bright blue - distinguishable for color blind */
  --secondary: #ff922b;    /* Orange - distinguishable for color blind */
  --background: #1a1a1a;   /* Dark background */
  --surface: #2d2d2d;      /* Slightly lighter background */
  --surface-hover: #363636;/* Hover state background */
  --text-primary: #e0e0e0; /* Primary text */
  --text-secondary: #b0b0b0;/* Secondary text */
  --border: #4dabf7;       /* Border color */
  --error: #ff6b6b;        /* Error color - distinguishable */
  --success: #51cf66;      /* Success color - distinguishable */
}

/* ===== GLOBAL RESET & BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== SHARED: RAM CALCULATOR & VIEW DISTANCE CALCULATOR ===== */
.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider-value {
  min-width: 60px;
  text-align: right;
  color: #4dabf7;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 8px;
  background: #363636;
  border-radius: 4px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #60a5fa;  /* Soft blue - friendly and modern */
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #3b82f6;
}

/* ===== SHARED: ERROR & BREAKDOWN ITEMS ===== */
.error {
  color: #ff6b6b;
  margin-top: 0.5rem;
}

.breakdown-item {
  cursor: help;
  position: relative;
}

.breakdown-item:hover {
  background-color: #363636;
}

.explanation {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: #2d2d2d;
  padding: 1rem;
  border-radius: 4px;
  width: 300px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: 1px solid #4dabf7;
}

.breakdown-item:hover .explanation {
  display: block;
}

/* ===== GLOBAL: TYPOGRAPHY ===== */
h1,
h2,
h3 {
  color: var(--primary);
  margin-bottom: 0.5em;
}

/* Paragraphs, List Items, Descriptions */
p,
li,
.category-description {
  font-size: 1.15rem;
  color: var(--text-primary);
}

label {
  font-size: 1.1rem;
  display: inline-block;
  margin-bottom: 6px;
  color: #4dabf7;
}

/* ===== GLOBAL: FORM INPUTS ===== */
textarea:not(.CodeMirror textarea):not(.json-editor-container textarea),
input[type="file"],
input[type="number"] {
  background-color: #2d2d2d;
  color: #e0e0e0;
  border: 1px solid #4dabf7;
  border-radius: 5px;
  padding: 10px;
  font-size: 1rem;
  width: 100%;
}

textarea:not(.CodeMirror textarea):not(.json-editor-container textarea) {
  min-height: 150px;
  resize: vertical;
}

/* ===== GLOBAL: BUTTONS ===== */
button {
  background-color: #60a5fa;  /* Soft blue - friendly and modern */
  color: #ffffff;
  border: none;
  padding: 10px 15px;
  margin-right: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
  background-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

/* ===== GLOBAL: LISTS ===== */
ul {
  list-style-type: none;
  padding: 0;
  background-color: #2d2d2d;
  border: 1px solid #4dabf7;
  border-radius: 5px;
  margin-top: 0.5rem;
  overflow-x: auto;
}

li {
  padding: 10px;
  border-bottom: 1px solid #3d3d3d;
}

li:last-child {
  border-bottom: none;
}

li:hover {
  background-color: #363636;
}

/* ===== GLOBAL: CODE SNIPPETS ===== */
code {
  background-color: #2d2d2d;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
  color: #60a5fa;  /* Soft blue - friendly and modern */
}

/* ===== FOOTER ===== */
footer {
  margin-top: 30px;
  padding: 20px 10px 16px 10px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}

.footer-main {
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 1rem;
  margin-top: 6px;
}

.footer-links a {
  color: #fff;
  background: #24292f;
  border: none;
  border-radius: 6px;
  padding: 6px 18px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: background 0.2s, color 0.2s, transform 0.1s;
  display: inline-block;
  cursor: pointer;
}

.footer-links a:hover,
.footer-links a:focus {
  background: #3b4045;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px) scale(1.04);
}

.footer-links a:visited {
  color: #fff;
}

footer a {
  color: #4dabf7;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer span {
  /* Only style the brand name in red, not the year */
}
footer #currentYear {
  color: var(--text-secondary); /* Match the rest of the footer text */
  font-weight: normal;
}
footer .footer-brand {
  color: #e53935; /* Nice red */
  font-weight: 600;
}

/* ===== NAVBAR ===== */
.navbar {
  background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.navbar a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
  position: relative;
}

.navbar a:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

.navbar .brand {
  font-weight: bold;
  font-size: 20px;
  color: var(--primary);
  margin-right: 24px;
  text-shadow: 0 2px 4px rgba(77, 171, 247, 0.3);
  transition: all 0.3s ease-in-out;
}

.navbar .brand:hover {
  color: var(--primary);
  transform: translateY(-1px);
  text-shadow: 0 4px 8px rgba(77, 171, 247, 0.4);
}

.navbar .nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.navbar .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(77, 171, 247, 0.1), transparent);
  transition: left 0.5s ease-in-out;
}

.navbar .nav-link:hover::before {
  left: 100%;
}

.navbar .nav-link:hover {
  background: linear-gradient(135deg, var(--surface-hover) 0%, var(--surface) 100%);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(77, 171, 247, 0.2);
  transform: translateY(-2px);
}

/* Prevent visited state color changes for navbar links */
.navbar a:visited {
  color: var(--text-primary);
}

.navbar a:visited:hover {
  color: var(--primary);
}

.navbar .brand:visited {
  color: var(--primary);
}

.navbar .brand:visited:hover {
  color: var(--primary);
}

/* ===== HOMEPAGE ===== */
.homepage {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero {
  text-align: center;
  margin-bottom: 30px;
  padding: 30px 20px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  text-shadow: none !important;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.4;
}

.tools-list {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  overflow: visible;
}

.tools-list h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  color: var(--primary);
}

.tools-list ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  overflow: visible;
}

.tools-list li {
  background: none;
  border: none;
  border-radius: 0;
  transition: none;
  padding: 0;
  box-shadow: none;
}

.tools-list li:hover {
  background: none;
  transform: none;
  box-shadow: none;
}

.tool-link {
  display: block;
  padding: 1.5rem 1.25rem;
  background: rgba(45, 45, 45, 0.7);
  border: 1.5px solid rgba(77, 171, 247, 0.15);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(77, 171, 247, 0.08);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  margin-bottom: 1.25rem;
}
.tool-link:hover, .tool-link:focus {
  background: rgba(77, 171, 247, 0.10);
  box-shadow: 0 8px 32px rgba(77, 171, 247, 0.18);
  transform: translateY(-2px) scale(1.03);
  color: var(--primary);
  outline: none;
  z-index: 2;
}

.tool-link h3 {
  color: var(--primary);
  margin: 0 0 6px 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tool-link p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
}

.tool-card {
  background-color: #2b2b2b;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  transition: background-color 0.2s;
}

.tool-card:hover {
  background-color: #363636;
}

.tool-card h3 {
  margin-top: 0;
  color: #4dabf7;
}

.tool-card a {
  text-decoration: none;
  color: #4dabf7;
}

.tool-card a:hover {
  text-decoration: underline;
}

a:visited {
  color: #d77979;
}

/* ===== RESPONSIVE: GLOBAL & HOMEPAGE ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .tools-list {
    padding: 15px;
  }

  .tools-list ul {
    grid-template-columns: 1fr;
  }

  .tool-link {
    padding: 12px;
  }

  h1 {
    font-size: 1.8rem;
  }

  p,
  li,
  label {
    font-size: 1rem;
  }

  ul {
    max-height: 200px;
  }

  .navbar {
    padding: 12px 16px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .navbar .nav-link {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
  }

  .navbar .brand {
    font-size: 18px;
    margin-right: 16px;
    text-shadow: 0 1px 2px rgba(77, 171, 247, 0.3);
  }

  button {
    margin-top: 10px;
    display: block;
    width: 100%;
  }

  .tool-card {
    padding: 12px 16px;
  }
}

.pattern-match {
  background-color: var(--surface);
  border-left: 4px solid var(--primary);
  padding: 15px;
  margin-top: 15px;
  border-radius: 6px;
  transition: all 0.3s ease;
}
.pattern-match:hover {
  background-color: var(--surface-hover);
  transform: translateX(2px);
}
.pattern-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.severity-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.severity-label, .category-label {
  font-size: 0.8em;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: var(--surface-hover);
  color: var(--text-primary);
}
.pattern-explanation {
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
#highlightedOutput {
  background-color: #1e1e1e;
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid var(--border);
}
.filter-controls {
  display: none;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
  background-color: var(--surface);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.filter-controls select,
#filterInput {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--text-primary);
  min-width: 120px;
}
.filter-controls select:focus,
#filterInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.25);
}
#filterInput {
  flex: 1;
  min-width: 200px;
}
.action-buttons {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
  justify-content: center;
}
.loading-spinner {
  display: none;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  width: 20px;
  height: 20px;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}
#analyzeBtn.loading .loading-spinner {
  display: inline-block;
}
#analyzeBtn.loading span {
  display: none;
}
.metadata-section {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
.metadata-section h4 {
  color: var(--primary);
  margin: 0 0 1rem 0;
  font-size: 1.2em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.metadata-section h4::before {
  content: "📋";
  font-size: 1.1em;
}
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.metadata-item {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
  transition: all 0.3s ease;
}
.metadata-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}
.metadata-item strong {
  color: var(--primary);
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.metadata-item div {
  color: var(--text-primary);
  font-size: 1em;
  word-break: break-word;
}
.results-summary {
  margin: 1rem 0;
  background-color: var(--surface);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.severity-breakdown {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
  justify-content: center;
}
.severity-badge {
  padding: 4px 12px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.9em;
  font-weight: bold;
}
.no-matches {
  background-color: var(--surface);
  padding: 2rem;
  border-radius: 6px;
  text-align: center;
  border: 1px solid var(--border);
}
.no-matches h4 {
  color: var(--secondary);
  margin-bottom: 1rem;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}
.modal-content {
  background-color: var(--surface);
  margin: 10% auto;
  padding: 2rem;
  border: 1px solid var(--border);
  width: 80%;
  max-width: 900px;
  border-radius: 12px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.close {
  color: var(--text-secondary);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: var(--primary);
}
.history-item {
  background-color: var(--surface-hover);
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.history-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9em;
}
.history-time {
  color: var(--primary);
}
.history-matches {
  color: var(--secondary);
}
.history-preview {
  color: var(--text-secondary);
  font-size: 0.9em;
  margin-bottom: 0.5rem;
}
.history-load-btn {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
}
.history-load-btn:hover {
  background-color: #339af0;
}
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  color: #fff;
  z-index: 1001;
  max-width: 400px;
  animation: slideIn 0.3s ease;
}
.notification-error {
  background-color: var(--error);
}
.notification-success {
  background-color: var(--success);
}
.notification-warning {
  background-color: var(--secondary);
  color: #000;
}
.notification-info {
  background-color: var(--primary);
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.callstack-section {
  background-color: var(--surface);
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  border: 1px solid var(--border);
}
.callstack-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--background);
}
.stack-frame {
  display: flex;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}
.stack-frame:hover {
  background-color: var(--surface-hover);
}
.stack-frame.relevant {
  background-color: rgba(77, 171, 247, 0.1);
  border-left: 3px solid var(--primary);
}
.stack-frame.relevant:hover {
  background-color: rgba(77, 171, 247, 0.15);
}
.frame-number {
  background-color: var(--primary);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: bold;
  margin-right: 12px;
  flex-shrink: 0;
}
.frame-content {
  flex: 1;
  min-width: 0;
}
.frame-method {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--text-primary);
  margin-bottom: 2px;
  word-break: break-all;
}
.frame-line {
  font-size: 0.8em;
  color: var(--text-secondary);
}
.callstack-note {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-style: italic;
}
.potential-solutions {
  margin-top: 15px;
  padding: 15px;
  background-color: rgba(81, 207, 102, 0.1);
  border-radius: 4px;
  border-left: 3px solid var(--success);
}
.potential-solutions h5 {
  color: var(--success);
  margin: 0 0 10px 0;
  font-size: 1em;
}
.solutions-note {
  color: var(--text-secondary);
  font-size: 0.9em;
  font-style: italic;
  margin: 0 0 10px 0;
}
.potential-solutions ol {
  margin: 0;
  padding-left: 20px;
}
.potential-solutions li {
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.potential-solutions li:last-child {
  margin-bottom: 0;
}
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-controls {
    flex-direction: column;
  }
  .metadata-grid {
    grid-template-columns: 1fr;
  }
  .severity-breakdown {
    justify-content: center;
  }
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  .pattern-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
.visually-hidden {
  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,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== MINECRAFT RAM CALCULATOR ===== */
main {
  flex: 1;
  max-width: 700px;
  margin: 2em auto 4em auto;
  padding: 0 1em;
  width: 100%;
}

form#ramCalcForm {
  background-color: #2d2d2d;
  border: 1px solid #4dabf7;
  border-radius: 8px;
  padding: 20px;
}

form#ramCalcForm label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #4dabf7;
  font-size: 1.1rem;
}

form#ramCalcForm select,
form#ramCalcForm input[type="number"] {
  background-color: #363636;
  border: 1px solid #4dabf7;
  border-radius: 5px;
  color: #e0e0e0;
  padding: 10px;
  font-size: 1rem;
  width: 100%;
  margin-bottom: 20px;
  transition: border-color 0.3s;
}

form#ramCalcForm select:focus,
form#ramCalcForm input[type="number"]:focus {
  outline: none;
  border-color: #4dabf7;
  box-shadow: 0 0 6px #4dabf7;
}

form#ramCalcForm button {
  background-color: #60a5fa;  /* Soft blue - friendly and modern */
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

form#ramCalcForm button:hover {
  background-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#result {
  margin-top: 2.5em;
  background-color: #2d2d2d;
  border-left: 4px solid #4dabf7;
  padding: 15px 20px;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 1.15rem;
  line-height: 1.5;
  box-shadow: 0 0 10px rgba(77, 171, 247, 0.2);
}

#result h2 {
  color: #4dabf7;
  margin-top: 1em;
  font-weight: 700;
}

.ram-breakdown ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  background-color: #363636;
  border: 1px solid #4dabf7;
  border-radius: 5px;
  overflow: visible;
}

.ram-breakdown li {
  padding: 10px;
  border-bottom: 1px solid #3d3d3d;
  position: relative;
}

.ram-breakdown li:last-child {
  border-bottom: none;
}

.ram-breakdown li:hover {
  background-color: #404040;
}

.total-ram {
  margin-top: 1em;
  font-size: 1.2rem;
  font-weight: bold;
  color: #4dabf7;
}

/* ===== GENERAL PAGE HEADER ===== */
header {
  text-align: center;
  padding: 2em 1em 1em 1em;
  max-width: 700px;
  margin: 0 auto;
  color: #4dabf7;
}

header p {
  font-size: 1.2rem;
  color: #b0b0b0;
  margin-top: 0.3em;
}

/* ===== VIEW DISTANCE CALCULATOR ===== */
.calculator-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.input-panel {
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.result-panel {
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  position: sticky;
  top: 2rem;
  height: fit-content;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}
.form-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-primary);
}
.ram-display {
  text-align: center;
  margin-bottom: 2rem;
}
.ram-amount {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.ram-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}
.breakdown-chart {
  margin: 1.5rem 0;
}
.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--background);
  border-radius: 6px;
  border-left: 4px solid var(--primary);
}
.breakdown-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.breakdown-value {
  color: var(--primary);
  font-weight: 600;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
}
.server-type-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-style: italic;
}
.recommendations {
  margin-top: 1.5rem;
}
.recommendations h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}
.recommendations ul {
  list-style: none;
  padding: 0;
}
.recommendations li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.recommendations li:last-child {
  border-bottom: none;
}

/* ===== RESPONSIVE: VIEW DISTANCE CALCULATOR ===== */
@media (max-width: 768px) {
  .calculator-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .calculator-container {
    padding: 1rem;
  }
  .input-panel,
  .result-panel {
    padding: 1rem;
  }
  .ram-amount {
    font-size: 2.2rem;
  }
}

/* ===== CRASH REPORT ANALYZER: FILE UPLOAD AREA ===== */
textarea#crashInput,
.action-buttons,
.loading-spinner,
#analyzeBtn.loading .loading-spinner,
#analyzeBtn.loading span,
pre[id*="Output"],
.crash-analysis,
.modal,
.modal-content,
.modal-header,
.close,
.close:hover,
.file-upload-container,
.upload-area,
.upload-area.drag-over,
.upload-icon,
.upload-text,
.file-input-wrapper,
.file-input-button,
#fileUpload {
  margin-bottom: 1.5rem;
}

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

