* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background-color: #fdfdfd;
  background-image: radial-gradient(#d5d5d5 2px, transparent 2px);
  background-size: 30px 30px;
  font-family: 'Inter', system-ui, sans-serif;
  color: #000;
  padding: 2rem 1.5rem;
  position: relative;
}
body::before {
  display: none;
}
.scrap-card {
  background: #ffffff;
  border: 4px solid #000;
  border-radius: 0;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 10px 10px 0px #000;
  position: relative;
  transition: all 0.2s ease-in-out;
}
.scrap-card:hover { 
  transform: translate(-4px, -4px);
  box-shadow: 14px 14px 0px #e63946;
}
/* Memphis element */
.scrap-card::before {
  content: ''; position: absolute; top: -10px; left: -10px;
  width: 20px; height: 20px; background: #fcbf49;
  border: 3px solid #000; border-radius: 50%; z-index: 1;
}
/* Pushpin effect for specific cards */
.pin::after {
  content: '📍'; position: absolute; top: -15px; left: -10px; font-size: 1.5rem;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.1));
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-1deg); }
  75% { transform: rotate(1.5deg); }
}
.wiggle:hover { animation: wiggle 0.4s ease-in-out infinite; }

.grid-2col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; margin-top: 1rem; }
.naive-border { border-radius: 28px; border: 2px dashed #f4bc8c; background: #fffaf2; }
.sticker {
  background: #fdfdfd;
  border: 2px dashed #d4a373;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #a28462;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: rotate(-2deg);
  margin-bottom: 8px;
}
h1, h2, h3 { font-family: 'Inter', sans-serif; font-weight: 900; letter-spacing: -1px; text-transform: uppercase; }
h1 {
  font-size: 2.8rem;
  color: #e63946;
  text-shadow: 4px 4px 0px #000;
  margin-bottom: 5px;
}
h2 {
  font-size: 1.8rem;
  border-left: 8px solid #ffb882;
  padding-left: 1rem;
  margin: 1.5rem 0 1rem 0;
}
button, .btn {
  background: #fcbf49;
  border: 3px solid #000;
  padding: 10px 20px;
  border-radius: 0;
  font-weight: 800;
  cursor: pointer;
  transition: 0.1s;
  color: #000;
  box-shadow: 4px 4px 0 #000;
  text-transform: uppercase;
}
button:hover { background: #f77f00; transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }
.btn-primary {
  background: #e63946;
  color: white;
  border: 3px solid #000;
  padding: 14px 28px;
  border-radius: 0;
  font-weight: 900;
  cursor: pointer;
  font-size: 1rem;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 6px 6px 0px #000;
  transition: all 0.1s ease;
}
.btn-primary:hover { 
  background: #d90429; 
  transform: translate(2px, 2px);
  box-shadow: 4px 4px 0px #000;
}
.classroom-badge {
  background: #e1f0dc;
  border-radius: 28px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.8rem;
  margin-top: 1rem;
}
.video-embed {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 24px;
  border: 2px solid #fad5b0;
  margin: 10px 0;
}
.link-icon {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f7efe4; padding: 5px 12px; border-radius: 30px;
  font-size: 0.85rem; text-decoration: none; color: #5f4c38;
  transition: 0.2s;
}
.link-icon:hover { background: #eeddcc; transform: scale(1.02); }

/* RESOURCE HUB STYLES */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.hub-card {
  height: 280px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #fcbf49;
  cursor: pointer;
  border: 5px solid #000;
  box-shadow: 8px 8px 0px #000;
  transition: all 0.1s ease;
}
.hub-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0px #1d3557;
  background: #f77f00;
}
.hub-card-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
  color: #000;
  width: 100%;
}
.hub-card-content h3 { color: #000; margin-bottom: 5px; font-size: 1.6rem; font-weight: 900; }
.hub-card-content p { font-size: 0.9rem; margin-bottom: 12px; line-height: 1.2; font-weight: 600; }
.hub-card-links { display: flex; flex-direction: column; gap: 6px; }

/* FRAME/POLAROID EFFECT */
.polaroid-hub {
  border-bottom-width: 5px;
}
.comment-card, .case-card {
  background: #fff;
  border: 3px solid #000;
  border-radius: 0;
  margin-bottom: 1rem;
  padding: 1rem;
  border-left: 12px solid #fcbf49;
}
.case-extended { border-left-color: #e63946; background: #fff; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
textarea, input {
  background: #fff;
  border: 3px solid #000;
  border-radius: 0;
  padding: 12px 16px;
  width: 100%;
  resize: vertical;
  font-family: 'Inter', sans-serif;
  box-shadow: inset 4px 4px 0 #f0f0f0;
}
.loading { color: #aa9f8c; font-style: italic; }
.error { color: #d32f2f; background: #ffebee; padding: 1rem; border-radius: 16px; }
@media (max-width: 750px) {
  .grid-2col { grid-template-columns: 1fr; }
  body { padding: 1rem; }
  h1 { font-size: 1.8rem; }
}
footer {
  margin-top: 4rem;
  text-align: center;
  font-size: 0.8rem;
  color: #aa9f8c;
  border-top: 1px dashed #eedbc8;
  padding-top: 2rem;
}
.tag {
  background: #ffefdb;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.7rem;
}
.admin-badge { background: #ffefdb; border-radius: 20px; padding: 6px 12px; font-size: 0.7rem; }
.badge-group { background: #d9e6d4; border-radius: 20px; padding: 2px 8px; font-size: 0.7rem; }
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #eeddcc;
  border-top: 3px solid #4f8b3c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* NEW: Wellness & Resources */
.wellness-card {
  background: #fdfdfd;
  border: 4px solid #000;
  border-radius: 0;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 8px 8px 0px #00f2c3;
}
.help-button {
  background: #e63946;
  color: white;
  padding: 10px 20px;
  border-radius: 0;
  border: 3px solid #000;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 4px 4px 0 #000;
}
.help-button:hover { background: #d90429; transform: translate(2px,2px); box-shadow: 2px 2px 0 #000; }
.resource-badge {
  background: #ffffff;
  border: 3px solid #000;
  padding: 12px 20px;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #2d3e2b;
  transition: 0.2s;
  margin-bottom: 10px;
}
.resource-badge:hover { background: #f1f8e9; transform: translateX(8px); }

/* ====================================================================
   TV CASE STYLES (CLEAN)
   ==================================================================== */
.tv-case {
  background: #fdfdfd;
  border: 6px solid #000;
  padding: 20px;
  position: relative;
  box-shadow: 10px 10px 0px #000;
}
.tv-screen {
  background: #000;
  border: 4px solid #000;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.tv-controls {
  display: flex; gap: 15px; margin-top: 15px; justify-content: center;
}
.tv-btn {
  width: 44px; height: 44px; border: 3px solid #000;
  background: #fff; box-shadow: 3px 3px 0 #000;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.1s;
}
.tv-btn:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 #000; }

/* ====================================================================
   INTERACTIVE TOOLS (RADAR & GENDERBREAD)
   ==================================================================== */
.radar-container { width: 100%; max-width: 500px; margin: 0 auto; }
.genderbread-svg-container { text-align: center; margin-bottom: 2rem; background: #fff; padding: 20px; border-radius: 30px; border: 2px dashed #eeddcc; }

/* EVOLUTIONARY TIMELINE */
.timeline-era-preasilar { border-color: #d4a373 !important; background: #fffaf0 !important; font-family: 'Short Stack', cursive; }
.timeline-era-preasilar::after { content: '📜'; position: absolute; bottom: 10px; right: 10px; opacity: 0.3; font-size: 2rem; }

.timeline-era-ilustracion { border-color: #5d4037 !important; background: #fdfdfd !important; border-style: double !important; border-width: 6px !important; }
.timeline-era-ilustracion h4 { font-family: serif; font-variant: small-caps; }

.timeline-era-sigloXX { border-color: #78909c !important; border-radius: 0 !important; transform: rotate(1deg); }
.timeline-era-sigloXX::before { content: ""; position: absolute; top:0; left:0; width:100%; height:8px; background: repeating-linear-gradient(90deg, #78909c, #78909c 10px, transparent 10px, transparent 20px); }

.timeline-era-80s { background: #ffda00 !important; border: 4px solid #000 !important; box-shadow: 8px 8px 0 #ff7eb9 !important; }
.timeline-era-80s h4 { background: #000; color: #fff; padding: 5px; display: inline-block; }

.timeline-era-moderna { border-color: #81c784 !important; backdrop-filter: blur(10px); background: rgba(255,255,255,0.7) !important; }

/* HISTORY MAP (MUSICMAP STYLE) */
#historyMapWrapper {
  position: relative;
  width: 100%;
  height: 75vh;
  overflow: hidden;
  background: #0b0e14;
  border: 4px solid #000;
  box-shadow: 10px 10px 0 #e63946;
  cursor: crosshair;
  border-radius: 4px;
}
#historyMapWrapper g.brush .selection {
  fill: #fff;
  fill-opacity: 0.1;
  stroke: #fff;
}
.era-cloud {
  fill-opacity: 0.15;
  filter: blur(50px);
  transition: fill-opacity 0.6s ease;
}
.event-node {
  stroke: #fff;
  stroke-width: 1.5px;
  cursor: pointer;
  transition: r 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}
.event-node:hover {
  filter: drop-shadow(0 0 15px currentColor);
  stroke-width: 3px;
}
.history-label {
  font-size: 9px;
  fill: #fff;
  pointer-events: none;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 1px 1px 3px #000;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.node-group:hover .history-label { opacity: 1; font-size: 11px; }
.era-label {
  font-size: 42px;
  font-weight: 900;
  fill: #fff;
  pointer-events: none;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  opacity: 0.1;
  letter-spacing: 12px;
  transition: opacity 0.8s ease;
}
.history-tooltip {
  position: absolute;
  background: #fff;
  border: 4px solid #000;
  padding: 20px;
  width: 300px;
  z-index: 2500;
  box-shadow: 8px 8px 0 #000;
  pointer-events: none;
  display: none;
  font-size: 0.95rem;
  line-height: 1.4;
  transform: translate(15px, 15px);
}
.history-tooltip h4 { color: #e63946; margin-bottom: 8px; font-size: 0.8rem; letter-spacing: 1px; }
.history-tooltip .year-badge { background: #000; color: #fff; padding: 2px 8px; font-size: 0.75rem; font-weight: 900; margin-bottom: 8px; display: inline-block; }
.history-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}
.history-btn {
  width: 48px; height: 48px;
  background: #fff; border: 3px solid #000;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 4px 4px 0 #000;
  transition: 0.1s;
}
.history-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; background: #fcbf49; }
.history-btn span { font-size: 24px; color: #000; }
.map-legend {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(0,0,0,0.8);
  border: 2px solid #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}
.legend-item { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.legend-color { width: 12px; height: 12px; border-radius: 50%; }

/* ANIMATIONS */
.reveal-card { opacity: 0; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.reveal-card.visible { opacity: 1; transform: translateY(0); }

/* CRITERIA TABLES */
.criteria-capsule {
  display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px;
}
.criteria-box {
  padding: 12px; border-radius: 12px; font-size: 0.85rem;
}
.box-dsm { background: #e3f2fd; border-top: 4px solid #2196f3; }
.box-cie { background: #f1f8e9; border-top: 4px solid #8bc34a; }
.criteria-box ul { padding-left: 15px; margin-top: 5px; }
.criteria-box h5 { margin-bottom: 5px; color: #2c3e50; font-weight: 800; display: flex; align-items: center; gap: 5px; }


/* MODAL STYLES */
#toolModal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 1000;
  justify-content: center; align-items: center; padding: 20px;
}
.modal-content {
  background: #fff; border-radius: 0; width: 100%; max-width: 850px;
  max-height: 92vh; overflow-y: auto; padding: 3rem; position: relative;
  border: 6px solid #000; box-shadow: 12px 12px 0px #e63946;
}
.modal-content::after {
  display: none;
}
.close-modal {
  position: absolute; top: 20px; right: 20px; cursor: pointer;
  font-size: 2rem; color: #000;
  background: #fcbf49; border: 3px solid #000; padding: 2px;
}
.close-modal:hover { background: #e63946; color: #fff; }
.concept-card-tool {
  background-color: #fdfdfd; padding: 20px; border-radius: 0;
  margin-bottom: 20px; border: 3px solid #000; box-shadow: 4px 4px 0 #000;
}
.slider-container { margin: 15px 0; }
.slider-container label { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 8px; }
input[type="range"] { width: 100%; cursor: pointer; accent-color: #7eaa6b; }

/* TIMELINE STYLES */
.timeline-container { position: relative; padding: 2rem 0; }
.timeline-container::before {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: 4px; height: 100%; background: #eeddcc; border-radius: 4px;
}
.timeline-item-inner {
  display: flex; justify-content: flex-end; padding-right: 30px;
  position: relative; width: 50%; margin-bottom: 2rem;
}
.timeline-item-inner:nth-child(even) {
  align-self: flex-end; justify-content: flex-start; padding-left: 30px;
  padding-right: 0; margin-left: auto;
}
.timeline-card-inner {
  background: white; border-radius: 25px; padding: 1.5rem;
  border: 2px solid #eeddcc; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  width: 100%; position: relative;
}
.timeline-card-inner h3 { font-family: 'Short Stack', cursive; color: #5d422a; margin: 8px 0; }
.timeline-year {
  font-size: 0.75rem; font-weight: 700; background: #f1e0cd;
  padding: 3px 10px; border-radius: 20px; display: inline-block;
}
.timeline-item-inner:nth-child(even) .timeline-dot { left: -12px; right: auto; }
.timeline-dot {
  position: absolute; top: 20px; right: -12px; width: 24px; height: 24px;
  background: #7eaa6b; border: 4px solid white; border-radius: 50%; z-index: 2;
}
.timeline-detail {
    max-height: 0; overflow: hidden; transition: 0.3s ease-out;
    background: #fffaf2; border-radius: 15px; margin-top: 10px; font-size: 0.85rem;
}
.timeline-detail.show { max-height: 500px; padding: 10px; border: 1px dashed #eeddcc; }

/* INTERSECTIONALITY STYLES */
.inter-panel { background: #fffef7; border-radius: 20px; padding: 1.5rem; margin-bottom: 1.5rem; border: 1px solid #e7ddcf; }
.inter-selector-group { margin-bottom: 1rem; padding-bottom: 0.8rem; border-bottom: 1px dashed #ddd2bc; }
.inter-status-badge { font-size: 0.7rem; padding: 4px 10px; border-radius: 20px; margin-top: 5px; display: inline-block; }
.axis-bar-inter { height: 10px; background: #e2d9ce; border-radius: 12px; overflow: hidden; margin: 5px 0; }
.axis-fill-inter { height: 100%; transition: width 0.3s ease; }
.fill-opp { background: #e57373; }
.fill-priv { background: #81c784; }
.fill-neut { background: #ba8b3a; }
.counter-box-inter { background: white; border-radius: 15px; padding: 10px; text-align: center; border: 1px solid #eeddcc; flex: 1; }
