/* Amigo Secreto da Família Madi — "site pessoal de 2001", edição libanesa */

@font-face { font-family: "Lalezar"; src: url(/fonts/lalezar-latin.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Aref Ruqaa"; font-weight: 700; src: url(/fonts/arefruqaa-700-arabic.woff2) format("woff2"); font-display: swap; }

* { box-sizing: border-box; }

html { background: #0c2f52; }

body {
  margin: 0;
  padding: 10px 8px 30px;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Trebuchet MS", Verdana, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: #1a1a1a;
  background-color: #0c2f52;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%),
    linear-gradient(-45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%),
    radial-gradient(circle, rgba(242,194,48,.35) 2px, transparent 3px);
  background-size: 44px 44px;
}

img.sprite { image-rendering: pixelated; image-rendering: crisp-edges; vertical-align: middle; }

a { color: #0b4fb3; }
a:visited { color: #551a8b; }
a:hover { color: #e3242b; background: #ffff99; }

.page { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }

/* ------------------------------------------------------------ neve */
#snow { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.flake {
  position: absolute; top: -30px; color: #fff; opacity: .85;
  font-family: "Courier New", monospace; font-weight: bold; text-shadow: 0 0 3px #9cf;
  animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translate(0, -5vh); }
  50%  { transform: translate(18px, 50vh); }
  100% { transform: translate(-10px, 108vh); }
}

/* ------------------------------------------------------- pisca-pisca */
.lights {
  display: flex; justify-content: space-between; padding: 0 6px; height: 22px;
  border-top: 2px solid #2b5a2b; margin-bottom: 2px; overflow: hidden;
}
.lights i {
  width: 10px; height: 14px; margin-top: 2px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: #ff3b3b; box-shadow: 0 0 8px 2px #ff3b3b; animation: twinkle 1.2s steps(1) infinite;
}
.lights i:nth-child(4n+2) { background: #ffffff; box-shadow: 0 0 8px 2px #ffffff; animation-delay: .3s; }
.lights i:nth-child(4n+3) { background: #2fd06a; box-shadow: 0 0 8px 2px #2fd06a; animation-delay: .6s; }
.lights i:nth-child(4n+4) { background: #ffffff; box-shadow: 0 0 8px 2px #ffffff; animation-delay: .9s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; box-shadow: none; } }

/* ------------------------------------------------------------ banner */
.banner { color: #1a1a1a; background: #fff; border: 4px ridge #f2c230; text-align: center; }
.banner-text { flex: 1; min-width: 0; }
.banner-top { padding: 3px 8px; font-size: 13px; color: #ffe9a8; background: #e3242b; }
.banner-mid { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; }
.banner-ar, .ar { font-family: "Aref Ruqaa", "Geeza Pro", "Traditional Arabic", serif; font-weight: 700; }
.banner-ar { font-size: 26px; line-height: 1.3; color: #0a6e33; }
.banner h1 {
  margin: 0; font-size: clamp(36px, 9vw, 62px); line-height: 1; font-weight: 400;
  font-family: "Lalezar", Impact, "Arial Black", sans-serif;
  color: #e3242b; text-shadow: 2px 2px 0 #f2c230, 4px 4px 0 #0a6e33;
  animation: glow 2.4s steps(1) infinite;
}
@keyframes glow { 0%, 100% { color: #e3242b; } 50% { color: #0f9d4a; } }
.sub-title .ar { font-size: 19px; }
.sub-title { padding: 4px 8px; font-size: 16px; font-weight: bold; color: #fff; background: #e3242b; text-shadow: 1px 1px 0 #000; }
.banner-sprite { flex: none; }
.banner-sprite img { animation: bob 1.6s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* ----------------------------------------------------------- letreiro */
.marquee {
  overflow: hidden; white-space: nowrap; margin: 6px 0 10px;
  background: #000; color: #39ff14; border: 2px inset #888;
  font-family: "Courier New", monospace; font-weight: bold; font-size: 14px; padding: 4px 0;
}
.marquee-inner { display: inline-block; padding-left: 100%; animation: scroll 26s linear infinite; }
@keyframes scroll { to { transform: translateX(-100%); } }

/* -------------------------------------------------------------- caixas */
.box { margin: 0 0 12px; background: #fdf6e3; border: 4px ridge #0f9d4a; }
.box.red { border-color: #c81e26; }
.box.gold { border-color: #c98a12; }
.box-title {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 10px;
  font-size: 16px; font-weight: bold; color: #fff; text-shadow: 1px 1px 0 #000;
  background: linear-gradient(90deg, #0a6e33, #0f9d4a 60%, #7fd9a0);
}
.box.red .box-title { background: linear-gradient(90deg, #8f1016, #e3242b 60%, #f6a3a6); }
.box.gold .box-title { background: linear-gradient(90deg, #7a5200, #c98a12 60%, #f2d679); }
/* fileira de arquinhos sob cada título */
.arcada { height: 12px; background: radial-gradient(circle at 12px 14px, #fdf6e3 11px, transparent 12px) 0 0 / 24px 12px repeat-x #c9b98a; }
.box-body { padding: 6px 14px 14px; }
.box-body > :first-child { margin-top: 0; }
.box-body > :last-child { margin-bottom: 0; }

.center { text-align: center; }
.small { font-size: 12.5px; color: #555; }
.mono { font-family: "Courier New", monospace; word-break: break-all; }
.spacer { height: 10px; }

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

.new {
  display: inline-block; padding: 0 5px; font-size: 11px; font-weight: bold; color: #ff0;
  background: #e3242b; border: 1px solid #000; transform: rotate(-6deg);
}

hr { border: 0; height: 4px; margin: 12px 0; background: repeating-linear-gradient(90deg, #e3242b 0 12px, #fff 12px 24px, #0f9d4a 24px 36px, #fff 36px 48px); }

/* -------------------------------------------------------------- botões */
button, .btn {
  display: inline-block; padding: 6px 14px; cursor: pointer; text-decoration: none;
  font: bold 14px "Comic Sans MS", "Comic Sans", "Chalkboard SE", Verdana, sans-serif;
  color: #000; background: #d4d0c8; border: 3px outset #fff; border-radius: 0;
}
button:active, .btn:active { border-style: inset; }
button:disabled { color: #888; cursor: not-allowed; }
button:focus-visible, .btn:focus-visible, input:focus-visible { outline: 2px dotted #000; outline-offset: 2px; }
.btn-big { font-size: 18px; padding: 10px 22px; color: #fff; background: #0b7a39; border-color: #9be8b8; text-shadow: 1px 1px 0 #000; }
.btn-big:hover, .btn-big:visited { color: #fff; background: #096a31; }
.btn-red { color: #fff; background: #e3242b; border-color: #ff9aa0; text-shadow: 1px 1px 0 #000; }
.btn-mini { font-size: 12px; padding: 2px 8px; }
.btn-link { border: 0; background: none; color: #0b4fb3; text-decoration: underline; padding: 0; font-weight: normal; }

input[type="text"], input[type="url"] {
  width: 100%; padding: 5px 6px; font: 14px Verdana, Geneva, sans-serif;
  color: #000; background: #fff; border: 2px inset #999; border-radius: 0;
}
label { display: block; margin: 8px 0 3px; font-weight: bold; }

/* --------------------------------------------------------------- avisos */
.notice { margin: 0 0 12px; padding: 8px 10px; font-weight: bold; border: 2px dashed #000; background: #ffff99; }
.notice.error { color: #fff; background: #c81e26; border-color: #ff0; }
.notice.ok { background: #c9f7c9; }

/* ---------------------------------------------------------------- perfil */
.userbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.userbar .grow { flex: 1; min-width: 120px; }
img.avatar[referrerpolicy] { object-fit: cover; }
.avatar { width: 34px; height: 34px; border: 2px outset #ccc; background: #e6f6ea; object-fit: contain; }

.sug-row { display: grid; grid-template-columns: 26px 1fr 1fr auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.sug-row .num { font-weight: bold; text-align: right; color: #c81e26; }
@media (max-width: 560px) {
  .sug-row { grid-template-columns: 22px 1fr auto; }
  .sug-row input[type="url"] { grid-column: 2; grid-row: 2; }
}

ul.wishlist { margin: 6px 0; padding-left: 4px; list-style: none; text-align: left; }
ul.wishlist li { margin: 6px 0; padding-left: 30px; text-indent: -30px; }
ul.wishlist li img { margin-right: 6px; }

.people { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.people li { display: flex; align-items: center; gap: 5px; padding: 3px 8px 3px 3px; background: #e6f6ea; border: 2px groove #0f9d4a; font-size: 13.5px; }
.people li.me { background: #fff0b0; border-color: #c98a12; font-weight: bold; }
.people img.avatar[referrerpolicy] { object-fit: cover; }
.avatar { width: 22px; height: 22px; border-width: 1px; }

.counter {
  display: inline-block; padding: 2px 6px; letter-spacing: 3px; color: #39ff14; background: #000;
  border: 2px inset #888; font: bold 18px "Courier New", monospace;
}

/* ---------------------------------------------------------- revelação */
.reveal { text-align: center; }
.reveal-btn { background: none; border: 0; padding: 6px; }
.reveal-btn img { animation: shake 1.2s steps(4) infinite; }
@keyframes shake { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.match-name {
  margin: 8px 0; font: 400 clamp(34px, 8vw, 50px)/1.1 "Lalezar", Impact, "Arial Black", sans-serif;
  color: #e3242b; text-shadow: 2px 2px 0 #f2c230, 4px 4px 0 #0a6e33;
}
.match-avatar { width: 72px; height: 72px; border: 4px ridge #c98a12; object-fit: cover; }

/* ---------------------------------------------------------------- admin */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 13px; border: 2px outset #aaa; background: #d4d0c8; }
table.grid th { padding: 3px 6px; color: #fff; background: #000080; text-align: left; }
table.grid td { padding: 3px 6px; background: #fff; vertical-align: top; }
.checks { list-style: none; padding: 0; margin: 6px 0; }
.checks li { font-family: "Courier New", monospace; font-weight: bold; }
.checks .pass { color: #0f6e29; }
.checks .failed { color: #c81e26; }
.log { max-height: 260px; overflow: auto; border: 2px inset #999; background: #fff; }

/* --------------------------------------------------------------- rodapé */
footer { margin-top: 18px; text-align: center; color: #d6e6ff; font-size: 12.5px; }
footer p { margin: 4px 0; }
.badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.badge {
  display: inline-flex; align-items: center; justify-content: center; width: 88px; height: 31px;
  font: bold 10px/1.05 Verdana, sans-serif; text-align: center; border: 2px outset #fff; color: #fff;
}
.b1 { background: #c81e26; } .b2 { background: #0a6e33; }
.b3 { background: #fff; color: #c81e26; } .b4 { background: #c98a12; color: #000; }
.noscript { color: #fff; text-align: center; }

@media (max-width: 520px) {

  .banner-sprite img { width: 48px; height: auto; }
  .banner-top { font-size: 11px; }
  .banner-mid { padding: 6px; }
  .banner-ar { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .marquee-inner { padding-left: 0; white-space: normal; }
  .marquee { white-space: normal; padding: 4px 8px; }
  #snow { display: none; }
}
