/* Tema Ámbar CRT — inspirado en monitores de fósforo y ordenadores clásicos */
:root {
  --crt-amber: #ffb000;
  --crt-amber-light: #ffd35a;
  --crt-green: #8cff00;
  --crt-bg: #090a03;
  --crt-panel: #111207;
  --crt-border: #b87800;
}

html {
  background: var(--crt-bg);
}

body {
  background-color: var(--crt-bg);
  color: var(--crt-amber-light);
  font-family: "Courier New", Courier, monospace;
  text-shadow: 0 0 2px rgba(255, 176, 0, .28);
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 190, 60, .035) 0,
    rgba(255, 190, 60, .035) 1px,
    transparent 1px,
    transparent 4px
  );
}

a:link, a:visited {
  color: var(--crt-amber);
  text-decoration: none;
}

a:hover, a:active {
  color: var(--crt-green);
  text-decoration: underline;
  text-shadow: 0 0 6px rgba(140, 255, 0, .5);
}

#site_title_bar_wrapper {
  background-color: #171303;
  border-bottom: 3px solid var(--crt-amber);
}

#site_title {
  background-color: transparent;
}

#site_title img {
  max-width: 100%;
  height: auto;
  image-rendering: auto;
}

#menu ul li a,
#menu li a {
  color: var(--crt-amber-light);
  background-color: #151406;
  border-bottom: 1px solid #614500;
}

#menu ul li a:hover,
#menu li a:hover,
#menu li .current {
  color: var(--crt-green);
  background-color: #242307;
}

#content h1, #content h2, #content h3,
h1, h2, h3 {
  color: var(--crt-amber);
  font-family: "Courier New", Courier, monospace;
  text-shadow: 0 0 4px rgba(255, 176, 0, .3);
}

.section_modelo,
.section_modelo_accesorio {
  color: #ffe7a0;
  background-color: rgba(15, 16, 5, .96);
  border: 1px solid var(--crt-border);
  border-radius: 2px;
  box-shadow: inset 0 0 12px rgba(255, 176, 0, .06), 0 0 5px rgba(255, 176, 0, .12);
}

.button a,
input[type="submit"],
button {
  color: #171000;
  background: linear-gradient(#ffd35a, #d88900);
  border: 1px solid #ffca35;
  border-radius: 2px;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  text-shadow: none;
  box-shadow: 0 0 5px rgba(255, 176, 0, .18);
}

.button a:hover,
input[type="submit"]:hover,
button:hover {
  color: #071000;
  background: var(--crt-green);
  border-color: var(--crt-green);
}

hr {
  border: 0;
  border-top: 1px solid var(--crt-amber);
}

img {
  image-rendering: auto;
}

/* Mantiene legibles las tablas y fichas de catálogo */
table, th, td {
  border-color: #614500;
}
th {
  color: var(--crt-green);
  background-color: #171806;
}

::selection {
  color: #090a03;
  background: var(--crt-amber);
}

/* ================================================================
   CAPA DE ACABADO: adaptar también el catálogo y los elementos antiguos
   de 20th.css al lenguaje visual de un monitor CRT ámbar.
   ================================================================ */

:root {
  --crt-amber: #ffb21a;
  --crt-amber-light: #ffe09a;
  --crt-green: #9dff00;
  --crt-bg: #080902;
  --crt-panel: #111207;
  --crt-border: #8c5c00;
  --crt-muted: #b7a16d;
}

html, body {
  min-height: 100%;
  background-color: var(--crt-bg) !important;
}

body {
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255, 166, 0, .09), transparent 58%),
    repeating-linear-gradient(to bottom, rgba(255, 190, 60, .045) 0, rgba(255, 190, 60, .045) 1px, transparent 1px, transparent 4px) !important;
  background-attachment: fixed;
  color: var(--crt-amber-light) !important;
  line-height: 1.65;
}

/* Cabecera: sustituye los fondos grises heredados por un panel de terminal. */
#site_title_bar_wrapper,
#site_title_bar,
#site_title_bar #site_title,
#header_wrapper,
#header {
  background-color: #100e04 !important;
  background-image: repeating-linear-gradient(0deg, rgba(255,176,0,.06) 0, rgba(255,176,0,.06) 1px, transparent 1px, transparent 5px) !important;
  border-color: var(--crt-amber) !important;
}
#site_title_bar_wrapper {
  border-bottom: 2px solid var(--crt-amber) !important;
  box-shadow: 0 3px 14px rgba(255, 176, 0, .14);
}
#site_title_bar #site_title {
  background-image: none !important;
}
#site_title img {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255,176,0,.22));
}

/* Contenedores y fichas que usa realmente index.php. */
.section_modelo,
.section_modelo_accesorio,
.section_sistemas,
.section_w940,
.section_w440,
.section_w300,
.section_w210,
#box,
#cajamodelo,
#cajafotillo,
.cajatitulomodelo,
#letras,
#content,
.sub_content {
  color: var(--crt-amber-light) !important;
  background-color: rgba(13, 14, 5, .96) !important;
  background-image: repeating-linear-gradient(to bottom, rgba(255,176,0,.025) 0, rgba(255,176,0,.025) 1px, transparent 1px, transparent 5px) !important;
  border-color: #795300 !important;
  box-shadow: inset 0 0 0 1px rgba(255,176,0,.035), 0 0 8px rgba(255,176,0,.07);
}
.section_modelo,
.section_modelo_accesorio,
.section_sistemas {
  border: 1px solid var(--crt-border) !important;
  border-radius: 3px !important;
  margin-bottom: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.section_modelo:hover,
.section_modelo_accesorio:hover,
.section_sistemas:hover {
  border-color: var(--crt-amber) !important;
  box-shadow: inset 0 0 12px rgba(255,176,0,.07), 0 0 10px rgba(255,176,0,.14);
}
.rounded_top, .rounded_bottom,
.rounded_top_sistemas, .rounded_bottom_sistemas {
  height: 7px !important;
  background: linear-gradient(90deg, #5c3900, var(--crt-amber), #5c3900) !important;
  border: 0 !important;
}
.rounded_top span, .rounded_bottom span,
.rounded_top_sistemas span, .rounded_bottom_sistemas span {
  display: none !important;
}

/* Navegación, letras e índices: indicadores tipo terminal. */
#menu, #menu ul, #menu li {
  background-color: #0c0d04 !important;
  border-color: #624600 !important;
}
#menu ul li a, #menu li a {
  display: block;
  color: var(--crt-amber-light) !important;
  background-color: rgba(25, 22, 5, .92) !important;
  background-image: none !important;
  border-bottom: 1px solid rgba(255,176,0,.22) !important;
  text-shadow: 0 0 4px rgba(255,176,0,.18);
  padding-top: 4px;
  padding-bottom: 4px;
}
#menu ul li a::before, #menu li a::before {
  content: "> ";
  color: var(--crt-green);
  font-weight: bold;
}
#menu ul li a:hover, #menu li a:hover,
#menu li .current, #menu li a.current {
  color: var(--crt-green) !important;
  background-color: #202007 !important;
  box-shadow: inset 3px 0 0 var(--crt-green);
  text-decoration: none;
}
.letras, #letras a, a.letras {
  display: inline-block;
  min-width: 20px;
  margin: 2px;
  padding: 2px 5px;
  color: var(--crt-amber) !important;
  background: #171507 !important;
  border: 1px solid #6c4b00;
  text-align: center;
  text-decoration: none !important;
}
.letras:hover, #letras a:hover, a.letras:hover {
  color: #080902 !important;
  background: var(--crt-amber) !important;
  border-color: var(--crt-amber-light);
}

/* Tipografía, enlaces y títulos. */
h1, h2, h3, h4,
#content h1, #content h2, #content h3,
.titulo, .zxspectrum {
  color: var(--crt-amber) !important;
  font-family: "Courier New", Courier, monospace !important;
  text-shadow: 0 0 5px rgba(255,176,0,.24);
}
.zxspectrum a, .zxspectrumpeque a {
  color: var(--crt-green) !important;
}
.peque, .zxspectrumpeque, small {
  color: #c9b77f !important;
}
a img {
  transition: filter .15s ease, transform .15s ease;
}
a:hover img {
  filter: drop-shadow(0 0 4px rgba(255,176,0,.5));
}

/* Iconos GIF antiguos: mantenerlos reconocibles, pero integrados en la paleta. */
img[src*="/menu/"],
img[src*="/general/"],
img[src*="/media/"],
img[src*="coleccion.gif"],
img[src*="accesorio.gif"],
img[src*="cinta.gif"],
img[src*="usuario.gif"],
img[src*="laminas.gif"] {
  vertical-align: middle;
  border-radius: 2px;
  filter: sepia(.35) saturate(1.2) drop-shadow(0 0 2px rgba(255,176,0,.12));
}
img[src*="imagenes/logos/"],
img[src*="imagenes/fotillos/"],
.image-container img {
  background: #090a03;
  border: 1px solid rgba(255,176,0,.22);
  padding: 3px;
  box-sizing: border-box;
}
.image-container {
  background: radial-gradient(ellipse, rgba(255,176,0,.08), transparent 72%);
}

/* Formularios y botones heredados de imágenes de fondo. */
input, select, textarea {
  max-width: 100%;
  color: var(--crt-amber-light) !important;
  background: #090a03 !important;
  border: 1px solid #765300 !important;
  border-radius: 2px !important;
  font-family: "Courier New", Courier, monospace !important;
  box-shadow: inset 0 0 5px rgba(255,176,0,.05);
}
input:focus, select:focus, textarea:focus {
  outline: 1px solid var(--crt-green);
  border-color: var(--crt-green) !important;
}
.button a, .button_01 a, .button_02 a,
input[type="submit"], input[type="button"], button {
  color: #100d00 !important;
  background: linear-gradient(#ffd46a, #d98b00) !important;
  background-image: linear-gradient(#ffd46a, #d98b00) !important;
  border: 1px solid #ffca35 !important;
  border-radius: 2px !important;
  font-family: "Courier New", Courier, monospace !important;
  font-weight: bold;
  text-shadow: none !important;
  box-shadow: 0 0 6px rgba(255,176,0,.12);
}
.button a:hover, .button_01 a:hover, .button_02 a:hover,
input[type="submit"]:hover, input[type="button"]:hover, button:hover {
  color: #071000 !important;
  background: var(--crt-green) !important;
  border-color: var(--crt-green) !important;
}

/* Tablas, separadores y bloques de información. */
table { border-collapse: separate; border-spacing: 0; color: var(--crt-amber-light); }
table, th, td { border-color: #5f470c !important; }
th, caption { color: var(--crt-green) !important; background: #171806 !important; }
td { background-color: rgba(11,12,4,.72); }
hr { border: 0 !important; border-top: 1px solid var(--crt-amber) !important; opacity: .8; }
blockquote { border-left: 3px solid var(--crt-amber); padding-left: 12px; color: var(--crt-muted); }

/* Evita que el selector de temas quede desentonado. */
#botontema {
  color: var(--crt-amber-light) !important;
  background: #151406 !important;
  border: 1px solid var(--crt-amber) !important;
  border-radius: 2px !important;
  box-shadow: 0 0 10px rgba(255,176,0,.2);
  font-family: "Courier New", Courier, monospace !important;
}

::selection { color: #080902; background: var(--crt-amber); }

@media (max-width: 850px) {
  #site_title_bar_wrapper, #site_title_bar { max-width: 100%; }
  .section_modelo, .section_modelo_accesorio, .section_sistemas { margin-right: 5px !important; margin-left: 5px !important; }
  img { max-width: 100%; height: auto; }
  #botontema { top: 5px !important; right: 5px !important; font-size: 11px !important; }
}
