/* ==========================================================================
   Inferna moderna — capa de estilo sobre la plantilla tibiacom (propuesta).
   Solo CSS: no toca plantillas. Se carga DESPUES de todo lo demas, asi que
   quitar este fichero deja la web exactamente como estaba.
   ========================================================================== */

/* ---- 1. Cajas de contenido: barra de titulo en ascua con filo dorado ---- */
.Content .BorderTitleText {
  background:
    radial-gradient(90% 160% at 0% 0%, rgba(255, 150, 50, .28), transparent 55%),
    linear-gradient(180deg, #8c2915 0%, #5b150a 48%, #2f0a05 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 205, 150, .35), inset 0 -2px 0 #c8963e;
}
.Content .Box {
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
}

/* ---- 2. Tablas de datos (highscores, personajes, online, casas, guilds...) ---- */
.BoxContent table[cellspacing="1"] {
  border-spacing: 0;
  border-collapse: separate;
  border-radius: 6px;
  box-shadow: 0 2px 7px rgba(70, 40, 15, .22), 0 0 0 1px rgba(110, 75, 40, .25);
}
.BoxContent table[cellspacing="1"] > tbody > tr > td {
  border-bottom: 1px solid rgba(110, 80, 45, .13);
  transition: background-color .15s;
}
.BoxContent table[cellspacing="1"] > tbody > tr:last-child > td { border-bottom: 0; }
.BoxContent table[cellspacing="1"] > tbody > tr:first-child > td:first-child { border-top-left-radius: 6px; }
.BoxContent table[cellspacing="1"] > tbody > tr:first-child > td:last-child { border-top-right-radius: 6px; }
.BoxContent table[cellspacing="1"] > tbody > tr:last-child > td:first-child { border-bottom-left-radius: 6px; }
.BoxContent table[cellspacing="1"] > tbody > tr:last-child > td:last-child { border-bottom-right-radius: 6px; }

/* cabecera de tabla: cuero oscuro con letras doradas */
.BoxContent tr[bgcolor="#505050"] > td {
  background: linear-gradient(180deg, #3f2c1c 0%, #24180e 100%);
  color: #f2d08a;
  border-bottom: 2px solid #b8873a !important;
  padding-top: 6px;
  padding-bottom: 6px;
  letter-spacing: .02em;
  text-shadow: 0 1px 0 #000;
}
.BoxContent tr[bgcolor="#505050"] > td.white,
.BoxContent tr[bgcolor="#505050"] > td a,
.BoxContent tr[bgcolor="#505050"] > td b { color: #f2d08a; }

/* filas: pergamino mas limpio y resaltado al pasar el raton */
.BoxContent tr[bgcolor="#F1E0C6"] > td { background-color: #f7ecda; }
.BoxContent tr[bgcolor="#D4C0A1"] > td { background-color: #eddcbf; }
.BoxContent tr[bgcolor="#F1E0C6"]:hover > td,
.BoxContent tr[bgcolor="#D4C0A1"]:hover > td { background-color: #fff5df; }

/* tablas con el marco de tibia.com (.TableContainer: Who is online, cuenta...) */
.TableContainer {
  border: 0 !important;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 7px rgba(70, 40, 15, .22), 0 0 0 1px rgba(110, 75, 40, .3);
}
.TableContainer .CaptionContainer,
.TableContainer .CaptionContainer .CaptionInnerContainer {
  background: linear-gradient(180deg, #3f2c1c 0%, #24180e 100%) !important;
}
.TableContainer .CaptionContainer .CaptionInnerContainer { padding-top: 5px; padding-bottom: 5px; border-bottom: 2px solid #b8873a; }
.TableContainer .CaptionContainer span[class^="Caption"] { display: none !important; }
.TableContainer .CaptionContainer .Text { color: #f2d08a; text-shadow: 0 1px 0 #000; letter-spacing: .02em; }
.TableContainer .Table1, .TableContainer .Table2, .TableContainer .Table3,
.TableContainer .Table4, .TableContainer .Table5 { border: 0 !important; }
.TableContainer .Table2 .InnerTableContainer td,
.TableContainer .Table3 .TableContentAndRightShadow td {
  border: 0;
  border-bottom: 1px solid rgba(110, 80, 45, .13);
  transition: background-color .15s;
}
.TableContainer .LabelH, .TableContainer .LabelH td { background-color: #e5d1ad; color: #3a2512; }
.TableContainer tr[style*="#F1E0C6" i] > td, .TableContainer .Odd > td { background-color: #f7ecda; }
.TableContainer tr[style*="#D4C0A1" i] > td, .TableContainer .Even > td { background-color: #eddcbf; }
.TableContainer tr[style*="#F1E0C6" i]:hover > td, .TableContainer tr[style*="#D4C0A1" i]:hover > td,
.TableContainer .Odd:hover > td, .TableContainer .Even:hover > td { background-color: #fff5df; }

/* highscores: medalla de oro, plata y bronce en los tres primeros */
.BoxContent:has(option[value*="/highscores/"]) table[cellspacing="1"] > tbody > tr:nth-child(-n+4):not(:first-child) > td:nth-child(2) {
  text-align: center;
  font-weight: bold;
  color: #2a1606;
  background-repeat: no-repeat;
  background-position: center;
}
.BoxContent:has(option[value*="/highscores/"]) table[cellspacing="1"] > tbody > tr:nth-child(2) > td:nth-child(2) {
  background-image: radial-gradient(circle, #fff0a8 0, #f0c040 6px, #b07d12 10px, #6e4a08 11px, transparent 12px);
}
.BoxContent:has(option[value*="/highscores/"]) table[cellspacing="1"] > tbody > tr:nth-child(3) > td:nth-child(2) {
  background-image: radial-gradient(circle, #ffffff 0, #d2d8e0 6px, #8d97a5 10px, #59616d 11px, transparent 12px);
}
.BoxContent:has(option[value*="/highscores/"]) table[cellspacing="1"] > tbody > tr:nth-child(4) > td:nth-child(2) {
  background-image: radial-gradient(circle, #ffd9b0 0, #d9904a 6px, #9a5a20 10px, #5e340f 11px, transparent 12px);
}
.BoxContent:has(option[value*="/highscores/"]) table[cellspacing="1"] > tbody > tr:nth-child(2) > td { background-color: #fbefc9; }
.BoxContent:has(option[value*="/highscores/"]) table[cellspacing="1"] > tbody > tr:nth-child(2) > td:first-child { box-shadow: inset 3px 0 0 #d9a230; }

/* ---- 3. Enlaces del contenido: rojo ascua en vez del azul de 2004 ---- */
.Content a { color: #9b2a10; transition: color .15s; }
.Content a:hover { color: #d2471b; }

/* ---- 4. Botones ----
   Los grandes (BigButton y Login) eran un GIF azul de fondo con el texto
   encima: el GIF se cambia por un degradado ascua con filo dorado, y el
   GIF de "raton encima" se sustituye por :hover. Los que son una imagen
   entera (texto incluido, p. ej. "View" de casas) solo admiten filtro. */
.BigButton, #Loginbox #LoginButton, .MediumButtonBackground {
  background: linear-gradient(180deg, #b4501f 0%, #7a2a10 55%, #4f1a09 100%) !important;
  border: 1px solid #e0a54a;
  border-radius: 4px;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 215, 160, .4), 0 1px 3px rgba(0, 0, 0, .55);
  transition: box-shadow .2s, filter .2s;
}
.BigButton:hover, #Loginbox #LoginButton:hover, .MediumButtonBackground:hover {
  filter: brightness(1.12);
  box-shadow: inset 0 1px 0 rgba(255, 215, 160, .5), 0 0 10px rgba(255, 140, 40, .6);
}
.BigButton .BigButtonOver, #Loginbox #LoginButton .Button, .MediumButtonBackground .MediumButtonOver { display: none !important; }
.BigButtonText {
  top: -1px !important;
  color: #fff1d6 !important;
  font-weight: bold !important;
  font-size: 11px !important;
  letter-spacing: .03em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .8) !important;
}
.BoxContent img[src*="/buttons/sbutton_"],
.BoxContent input[src*="/buttons/_sbutton_"] {
  filter: sepia(1) saturate(3) hue-rotate(-30deg) brightness(.85);
  transition: filter .2s;
}
.BoxContent a:hover img[src*="/buttons/sbutton_"],
.BoxContent input[src*="/buttons/_sbutton_"]:hover {
  filter: sepia(1) saturate(3) hue-rotate(-30deg) brightness(1.02) drop-shadow(0 0 5px rgba(255, 140, 40, .6));
}

/* ---- 5. Formularios ----
   Todo dentro de :where(), que no suma especificidad: cualquier pagina que
   ya estilice sus casillas (p. ej. el buscador oscuro de Monsters) manda. */
:where(.BoxContent input[type="text"], .BoxContent input[type="password"], .BoxContent input[type="email"],
       .BoxContent input[type="number"], .BoxContent input[type="search"], .BoxContent select, .BoxContent textarea) {
  border: 1px solid #a88a5f;
  border-radius: 4px;
  background: #fffaf0;
  color: #2a1b0e;
  padding: 3px 6px;
  box-shadow: inset 0 1px 2px rgba(70, 40, 15, .15);
  transition: border-color .15s, box-shadow .15s;
}
:where(.BoxContent input[type="text"], .BoxContent input[type="password"], .BoxContent input[type="email"],
       .BoxContent input[type="number"], .BoxContent input[type="search"], .BoxContent select, .BoxContent textarea):focus {
  outline: none;
  border-color: #c8963e;
  box-shadow: 0 0 0 3px rgba(227, 170, 79, .35);
}

/* ---- 6. Columna derecha: el mismo acero oscuro que la caja de Streamers ----
   Con #Themeboxes delante porque los <style> propios de cada caja van en el
   <body>, despues de esta hoja, y con la misma especificidad ganarian ellos. */
#Themeboxes #Topbar .top_level, #Themeboxes #PowergamersBar .pg_list, #Themeboxes #ServerSaveBar .ss_list {
  background: linear-gradient(#1b1f28, #0d0f14) !important;
  box-shadow: inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 0 0 2px rgba(140, 170, 220, .12);
  text-shadow: 0 1px 2px #000;
}
#Themeboxes #Topbar .online, #Themeboxes #PowergamersBar .online { color: #7ee07e; }
#Themeboxes #Topbar .offline, #Themeboxes #PowergamersBar .offline { color: #ff8f80; }
#Themeboxes #Topbar a.topfont:hover, #Themeboxes #PowergamersBar a.topfont:hover { color: #fff; }
#Themeboxes #Topbar a.topfont > span[style*="margin-left"],
#Themeboxes #PowergamersBar a.topfont > span[style*="margin-left"] { color: #9fb0cc !important; font-weight: normal; }
#Themeboxes #PowergamersBar a.topfont > span[style*="margin-left"] { color: #ffc27a !important; font-weight: bold; }
#Themeboxes #ServerSaveBar .ss_list { color: #d5dceb; }
#Themeboxes #ServerSaveBar .ss_label { color: #8fa3c4; text-shadow: none; }
#Themeboxes #ServerSaveBar .ss_clock {
  color: #f2d08a;
  font-family: Verdana, Tahoma, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(255, 170, 60, .4), 0 1px 2px #000;
}
#Themeboxes #ServerSaveBar .ss_clock.ss_soon { color: #ff6a50; }
#Themeboxes #ServerSaveBar .ss_note { color: #b7c2d6; text-shadow: none; }
#Themeboxes #ServerSaveBar .ss_at { color: #fff; }
#Themeboxes #ServerSaveBar .ss_weekly { color: #ff8a70; }

/* ---- 7. Detalles ---- */
html { scrollbar-color: #7a5a2e #0a1322; }
::selection { background: #e3aa4f; color: #1a0f05; }

@media (prefers-reduced-motion: reduce) {
  .Content a, .BigButton, #LoginButton, .MediumButtonBackground, .BoxContent table[cellspacing="1"] > tbody > tr > td { transition: none; }
}
