/* ============================================================
   Case pages unified CSS – intro + question pages, all cases
   Animated background: lava lamp gradient (sinister red / maroon / black)
   ============================================================ */

/* --- Lava lamp background (sinister vibe) --- */
.case-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  /* Sinister palette: black, deep crimson, maroon, dark red */
  background: linear-gradient(
    -45deg,
    #0a0a0a,
    #1a0505,
    #2d0000,
    #4a0e0e,
    #3d0000,
    #0a0a0a
  );
  background-size: 400% 400%;
}

/* Animate gradient position for lava lamp effect when motion is OK */
@media (prefers-reduced-motion: no-preference) {
  .case-bg {
    animation: case-bg-lavalamp 5s ease infinite;
  }
}

@keyframes case-bg-lavalamp {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Reduced motion: static gradient, no animation */
@media (prefers-reduced-motion: reduce) {
  .case-bg {
    background-position: 50% 50%;
  }
}

/* Child layers no longer used; keep for backwards compatibility (invisible) */
.case-bg__layer {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* --- Base layout (shared intro + questions) --- */
html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Courier New', monospace;
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  background: transparent;
}

.page-header {
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 100%;
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  height: 100px;
  line-height: 70px;
  z-index: 1000;
}

.container {
  max-width: 600px;
  margin: 120px auto 0 auto;
  background: #0c0c08;
  color: white;
  padding: 30px;
  border-radius: 10px;
  border: 2px solid white;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  box-sizing: content-box;
  position: relative;
  z-index: 1;
}

h1 { text-align: center; }

/* Question pages: all case containers use same padding */
.container[class*="-q1-container"],
.container[class*="-q2-container"],
.container[class*="-q3-container"],
.container[class*="-q4-container"],
.container[class*="-q5-container"] {
  padding-bottom: 20px;
}

textarea {
  width: 100%;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

button {
  background-color: #ff4c4c;
  color: white;
  padding: 10px 20px;
  font-family: 'Courier New', monospace;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:active {
  transform: scale(0.97);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

table {
  width: 100%;
  font-size: 14px;
  margin-top: 20px;
  border-collapse: collapse;
}

th, td {
  border: 1px solid white;
  padding: 6px 12px;
  text-align: left;
  white-space: nowrap;
}

th { background-color: #333; }

.sidebar {
  position: fixed;
  top: 190px;
  right: 30px;
  width: 300px;
  font-family: 'Courier New', monospace;
  z-index: 999;
}

.sidebar details {
  background-color: wheat;
  color: black;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.sidebar summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
}

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

.sidebar summary::after {
  content: '▶';
  transition: transform 0.25s ease;
}

.sidebar details[open] summary::after {
  transform: rotate(90deg);
}

.sidebar .section-content {
  padding: 10px 15px 15px;
  font-size: 12px;
  line-height: 1.4;
}

.start-button {
  display: block;
  margin: 40px auto 0 auto;
  background-color: #ff4c4c;
  color: white;
  font-size: 15px;
  padding: 12px 30px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  width: 200px;
}

.start-button:active {
  transform: scale(0.97);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

.copyright-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 10px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  color: rgba(240, 230, 210, 0.9);
  z-index: 999;
}

.cases-button {
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 1001;
}

.cases-button a {
  display: inline-block;
  background-color: rgba(212, 175, 55, 0.9);
  color: #1a1a1a;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.cases-button a:hover {
  background-color: #d4af37;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.6);
}

/* --- Intro responsive (merged from case-intro-responsive.css) --- */
@media (min-width: 768px) {
  .page-header { display: block; }
  .container {
    display: block;
    margin-top: 120px;
    max-width: 550px;
  }
}

@media (min-width: 1024px) {
  .container {
    margin-top: 140px;
    max-width: 600px;
  }
  .start-button {
    font-size: 16px;
    padding: 14px 32px;
  }
}

@media (min-width: 1280px) {
  .container {
    margin-top: 160px;
    max-width: 650px;
  }
  .start-button {
    font-size: 17px;
    padding: 16px 36px;
  }
}

@media (min-width: 1600px) {
  .container {
    margin-top: 180px;
    max-width: 700px;
  }
  .start-button {
    font-size: 18px;
    padding: 18px 40px;
  }
}
