/* =============================================================================
 * Aknakereső – style.css
 * Eredeti, kézzel írt CSS. Klasszikus Windows 95/98 aknakereső megjelenés.
 * Nincs külső betűtípus, kép, CDN vagy függőség.
 * ========================================================================== */

:root {
  --ezust: #c0c0c0;
  --ezust-arnyek: #808080;
  --ezust-vilagos: #dfdfdf;
  --feher: #ffffff;
  --fekete: #000000;
  --cim-1: #000080;
  --cim-2: #1084d0;
  --led-piros: #ff2b2b;
  --piros: #ff0000;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--ezust);
  color: var(--fekete);
  font-family: Tahoma, "Segoe UI", "MS Sans Serif", Geneva, Verdana, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

/* --------------------------------------------------------------------------- */
/* Lapelrendezés                                                               */
/* --------------------------------------------------------------------------- */

.lap {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 10px 40px;
}

.fo-cim {
  font-size: 20px;
  margin: 4px 0 12px;
  text-align: center;
  color: #000;
  text-shadow: 1px 1px 0 #fff;
}

/* --------------------------------------------------------------------------- */
/* Ablak                                                                       */
/* --------------------------------------------------------------------------- */

.jatek-ablak {
  background: var(--ezust);
  border-style: solid;
  border-width: 2px;
  border-color: var(--feher) var(--ezust-arnyek) var(--ezust-arnyek) var(--feher);
  outline: 1px solid #000;
  padding: 3px;
  margin: 0 auto;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
}

/* Címsáv */
.cim-sav {
  background: var(--cim-1);
  color: var(--feher);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 2px 4px;
  margin-bottom: 3px;
  user-select: none;
}

.cim-szoveg {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
}

.cim-ikon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #ffd000 13%, #b8860b 100%);
  border: 1px solid #000;
}

.ablak-gombok {
  display: flex;
  gap: 2px;
}

.ablak-gomb {
  width: 16px;
  height: 14px;
  background: var(--ezust);
  border-style: solid;
  border-width: 1px;
  border-color: var(--feher) var(--ezust-arnyek) var(--ezust-arnyek) var(--feher);
  position: relative;
  padding: 0;
}

.ablak-gomb::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border: 1px solid #000;
}

.ablak-gomb.kicsi::before {
  height: 0;
  border-width: 0 0 2px 0;
  border-color: #000;
  top: 70%;
}

.ablak-gomb.bezar::before {
  border: 0;
  width: 9px;
  height: 9px;
  background:
    linear-gradient(#000, #000) center / 100% 1px no-repeat,
    linear-gradient(#000, #000) center / 1px 100% no-repeat;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* Menüsor */
.menusor {
  display: flex;
  gap: 1px;
  margin-bottom: 3px;
  position: relative;
  user-select: none;
}

.menu {
  position: relative;
}

.menu-gomb {
  font: inherit;
  background: transparent;
  border: 0;
  padding: 2px 8px;
  cursor: pointer;
  color: #000;
}

.menu-gomb:hover,
.menu-gomb:focus,
.menu-gomb[aria-expanded="true"] {
  background: var(--cim-1);
  color: #fff;
  outline: none;
}

.menu-lista {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  list-style: none;
  margin: 0;
  padding: 2px;
  min-width: 190px;
  background: #fff;
  border-style: solid;
  border-width: 1px;
  border-color: var(--feher) #000 #000 var(--feher);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

.menu-lista[hidden] {
  display: none;
}

.menu-elem {
  position: relative;
  padding: 3px 22px 3px 26px;
  cursor: pointer;
  white-space: nowrap;
  color: #000;
}

.menu-elem:hover,
.menu-elem.billen {
  background: var(--cim-1);
  color: #fff;
}

.menu-elem[aria-checked="true"]::before {
  content: "•";
  position: absolute;
  left: 9px;
  top: 3px;
  font-weight: 700;
}

.menu-elem .gyorsbillentyu {
  float: right;
  margin-left: 24px;
  color: #808080;
}

.menu-elem:hover .gyorsbillentyu {
  color: #fff;
}

.menu-elvalaszto {
  height: 0;
  margin: 3px 2px;
  border-top: 1px solid var(--ezust-arnyek);
  border-bottom: 1px solid var(--feher);
}

/* --------------------------------------------------------------------------- */
/* Felső panel: számláló, smiley, idő                                          */
/* --------------------------------------------------------------------------- */

.fejlec-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  margin-bottom: 6px;
  border-style: solid;
  border-width: 2px;
  border-color: var(--ezust-arnyek) var(--feher) var(--feher) var(--ezust-arnyek);
  background: var(--ezust);
}

.mero-doboz {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* LED kijelző */
.led {
  display: flex;
  gap: 2px;
  background: radial-gradient(circle at 30% 15%, #4a0000 0%, #000 65%);
  border-style: solid;
  border-width: 1px;
  border-color: var(--ezust-arnyek) var(--feher) var(--feher) var(--ezust-arnyek);
  padding: 2px 3px;
  min-width: 44px;
  justify-content: center;
}

.szamjegy {
  position: relative;
  width: 12px;
  height: 22px;
  transform: skewX(-6deg);
}

.szamjegy i {
  position: absolute;
  background: var(--led-piros);
  border-radius: 1px;
  box-shadow: 0 0 3px rgba(255, 0, 0, 0.75);
}

.szamjegy i.a { left: 16%; top: 0;    width: 68%; height: 13%; }
.szamjegy i.g { left: 16%; top: 43.5%; width: 68%; height: 13%; }
.szamjegy i.d { left: 16%; top: 87%;   width: 68%; height: 13%; }
.szamjegy i.f { left: 0;   top: 9%;    width: 17%; height: 33%; }
.szamjegy i.b { right: 0;  top: 9%;    width: 17%; height: 33%; }
.szamjegy i.e { left: 0;   top: 58%;   width: 17%; height: 33%; }
.szamjegy i.c { right: 0;  top: 58%;   width: 17%; height: 33%; }

/* Smiley gomb */
.mosolygomb {
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ezust);
  border-style: solid;
  border-width: 3px;
  border-color: var(--feher) var(--ezust-arnyek) var(--ezust-arnyek) var(--feher);
  cursor: pointer;
  flex: 0 0 auto;
}

.mosolygomb:focus-visible {
  outline: 2px dotted #000;
  outline-offset: 2px;
}

.mosolygomb:active {
  border-color: var(--ezust-arnyek) var(--feher) var(--feher) var(--ezust-arnyek);
}

.arc {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6a8 0%, #ffe200 55%, #e0b800 100%);
  box-shadow: inset 0 0 0 1px #8a6d00;
  display: block;
}

.arc .szem {
  position: absolute;
  top: 7px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #000;
}

.arc .szem-bal  { left: 6px; }
.arc .szem-jobb { right: 6px; }

.arc .szaj {
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 10px;
  height: 6px;
  transform: translateX(-50%);
  border-bottom: 2px solid #000;
  border-radius: 0 0 10px 10px;
}

/* Nyomva tartás: meglepett arc */
.arc-nyomva .szaj {
  width: 5px;
  height: 5px;
  bottom: 4px;
  border: 2px solid #000;
  border-radius: 50%;
}

/* Győzelem: napszemüveg + mosoly */
.arc-gyozt .szem {
  width: 7px;
  height: 4px;
  border-radius: 1px;
  top: 8px;
}

.arc-gyozt .szem-bal  { left: 4px; }
.arc-gyozt .szem-jobb { right: 4px; }

.arc-gyozt .szem-bal::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 1px;
  width: 6px;
  height: 2px;
  background: #000;
}

/* Veszteség: X szemek + szomorú száj */
.arc-vesztett .szem {
  width: 5px;
  height: 5px;
  border-radius: 0;
  background: transparent;
  top: 6px;
}

.arc-vesztett .szem-bal  { left: 4px; }
.arc-vesztett .szem-jobb { right: 4px; }

.arc-vesztett .szem::before,
.arc-vesztett .szem::after {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 5px;
  height: 1.5px;
  background: #000;
}

.arc-vesztett .szem::before { transform: rotate(45deg); }
.arc-vesztett .szem::after  { transform: rotate(-45deg); }

.arc-vesztett .szaj {
  width: 10px;
  height: 5px;
  bottom: 4px;
  border-bottom: 0;
  border-top: 2px solid #000;
  border-radius: 10px 10px 0 0;
}

/* --------------------------------------------------------------------------- */
/* Játéktábla                                                                  */
/* --------------------------------------------------------------------------- */

.palya-keret {
  border-style: solid;
  border-width: 3px;
  border-color: var(--ezust-arnyek) var(--feher) var(--feher) var(--ezust-arnyek);
  background: var(--ezust-arnyek);
  display: inline-block;
  max-width: 100%;
}

#jatekter {
  --oszlopok: 9;
  --cella: clamp(14px, calc((100vw - 70px) / var(--oszlopok)), 24px);
}

#tabla {
  display: grid;
  grid-template-columns: repeat(var(--oszlopok), var(--cella));
  grid-auto-rows: var(--cella);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cella {
  width: var(--cella);
  height: var(--cella);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ezust);
  border-style: solid;
  border-width: 3px;
  border-color: var(--feher) var(--ezust-arnyek) var(--ezust-arnyek) var(--feher);
  font-family: Tahoma, "Segoe UI", "MS Sans Serif", Verdana, sans-serif;
  font-weight: 700;
  font-size: calc(var(--cella) * 0.58);
  line-height: 1;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  color: #000;
}

.cella:active:not(.felfedve):not(.zaszlo) {
  border-color: var(--ezust-arnyek) var(--feher) var(--feher) var(--ezust-arnyek);
}

.cella.felfedve {
  border-width: 1px;
  border-color: var(--ezust-arnyek) var(--feher) var(--feher) var(--ezust-arnyek);
  cursor: default;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.18);
}

.cella.zaszlo,
.cella.kerdes {
  cursor: pointer;
}

.cella.zaszlo {
  font-size: calc(var(--cella) * 0.72);
}

.cella.kerdes {
  font-size: calc(var(--cella) * 0.72);
  color: #000;
}

/* Számok klasszikus színei */
.cella.n1 { color: #0000ff; }
.cella.n2 { color: #008000; }
.cella.n3 { color: #ff0000; }
.cella.n4 { color: #000080; }
.cella.n5 { color: #800000; }
.cella.n6 { color: #008080; }
.cella.n7 { color: #000000; }
.cella.n8 { color: #808080; }

/* Akna rajz (saját CSS, nem kép) */
.cella.akna {
  padding: 0;
}

.bomba {
  position: relative;
  display: block;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #fff 0 7%, rgba(255, 255, 255, 0) 8%),
    #000;
}

.bomba::before,
.bomba::after {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    linear-gradient(#000, #000) center / 100% 11% no-repeat,
    linear-gradient(#000, #000) center / 11% 100% no-repeat;
}

.bomba::after {
  transform: rotate(45deg);
}

.kereszt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff0000;
  font-weight: 700;
  font-size: calc(var(--cella) * 0.95);
  line-height: 1;
  z-index: 3;
  pointer-events: none;
  text-shadow: 0 0 1px #fff;
}

/* Állapotsor */
.allapotsor {
  margin-top: 6px;
  padding: 3px 6px;
  min-height: 20px;
  border-style: solid;
  border-width: 1px;
  border-color: var(--ezust-arnyek) var(--feher) var(--feher) var(--ezust-arnyek);
  background: var(--ezust);
  text-align: center;
  font-weight: 700;
}

/* --------------------------------------------------------------------------- */
/* Vezérlők                                                                    */
/* --------------------------------------------------------------------------- */

.vezerlok {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}

.gomb {
  font: inherit;
  font-weight: 700;
  padding: 5px 12px;
  background: var(--ezust);
  color: #000;
  border-style: solid;
  border-width: 3px;
  border-color: var(--feher) var(--ezust-arnyek) var(--ezust-arnyek) var(--feher);
  cursor: pointer;
  min-height: 34px;
}

.gomb:active {
  border-color: var(--ezust-arnyek) var(--feher) var(--feher) var(--ezust-arnyek);
  padding: 6px 11px 4px 13px;
}

.gomb[aria-pressed="true"] {
  background: #d8d8d8;
  border-color: var(--ezust-arnyek) var(--feher) var(--feher) var(--ezust-arnyek);
}

.gomb:focus-visible {
  outline: 2px dotted #000;
  outline-offset: 2px;
}

.sugo {
  max-width: 560px;
  margin: 12px auto 0;
  text-align: center;
  color: #303030;
}

/* --------------------------------------------------------------------------- */
/* Súgó / modális ablak                                                        */
/* --------------------------------------------------------------------------- */

.modal-hatter {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}

.modal-hatter[hidden] {
  display: none;
}

.modal-ablak {
  background: var(--ezust);
  border-style: solid;
  border-width: 2px;
  border-color: var(--feher) var(--ezust-arnyek) var(--ezust-arnyek) var(--feher);
  outline: 1px solid #000;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  padding: 0 0 12px;
}

.modal-fej {
  background: linear-gradient(90deg, var(--cim-1), var(--cim-2));
  color: #fff;
  font-weight: 700;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-belso {
  padding: 10px 14px;
}

.modal-belso h3 {
  margin: 12px 0 4px;
  font-size: 13px;
}

.modal-belso ul {
  margin: 4px 0;
  padding-left: 20px;
}

.modal-belso li {
  margin-bottom: 3px;
}

.modal-vege {
  text-align: right;
  padding: 0 14px;
}

/* --------------------------------------------------------------------------- */
/* Tartalom szekció (később feltöltendő)                                       */
/* --------------------------------------------------------------------------- */

.tartalom {
  max-width: 700px;
  margin: 34px auto 0;
  padding: 0 4px;
}

.tartalom h2 {
  font-size: 17px;
  margin: 22px 0 8px;
  border-bottom: 2px solid var(--ezust-arnyek);
  padding-bottom: 4px;
}

.tartalom .helyorzo {
  color: #555;
  font-style: italic;
  background: #d4d4d4;
  border: 1px dashed var(--ezust-arnyek);
  padding: 10px 12px;
  margin: 6px 0;
}

.lablec {
  max-width: 700px;
  margin: 30px auto 0;
  padding: 10px 4px;
  border-top: 2px solid var(--ezust-arnyek);
  text-align: center;
  color: #444;
  font-size: 12px;
}

/* --------------------------------------------------------------------------- */
/* Reszponzív finomítás                                                        */
/* --------------------------------------------------------------------------- */

@media (max-width: 420px) {
  .lap {
    padding: 8px 6px 30px;
  }

  .fo-cim {
    font-size: 17px;
  }

  .mero-doboz {
    gap: 3px;
  }

  .mosolygomb {
    width: 30px;
    height: 30px;
  }

  .arc {
    width: 21px;
    height: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
