@import url('https://fonts.googleapis.com/css2?family=MS+Sans+Serif:wght@400;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #008080;
  font-family: "MS Sans Serif", sans-serif;
  font-size: 11px;
  height: 100vh;
  overflow: hidden;
  image-rendering: pixelated;
}

#desktop { position: relative; width: 100vw; height: 100vh; }

/* TASKBAR */
#taskbar{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 28px;
  background: #C0C0C0;
  border-top: 2px outset #FFFFFF;
  box-shadow: inset 0 1px 0 #808080;
  display: flex;
  align-items: center;
  padding: 0 4px;
  z-index: 5000;
}

.start-button{
  height: 24px;
  padding: 0 10px;
  margin-right: 6px;
  background: #C0C0C0;
  border: 2px outset #FFFFFF;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.start-button:active{
  border: 2px inset #FFFFFF;
  box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #fff;
}

.taskbar-center { flex: 1; display: flex; justify-content: center; }
.taskbar-right { margin-left: auto; padding-right: 6px; }

#clock{
  background: #C0C0C0;
  border: 1px inset #808080;
  padding: 2px 6px;
  min-width: 66px;
  text-align: center;
}

/* FULLSCREEN MAIN WINDOW (Win98-window alap) */
.win98-window{
  border: 2px solid #000;
  background: #C0C0C0;
  box-shadow: 2px 2px 0 #000;
}

#main-window{
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: 28px; /* taskbar hely */
  width: auto; height: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

/* FELSŐ KÉK SÁV */
.title-bar{
  background: #000080;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 3px 6px;
  height: 24px;
  user-select: none;
}

.title-icon{
  width: 20px;
  height: 20px;
  margin-right: 6px;
  background: #00FFFF;
  border: 1px solid #fff;
}

.title-text{
  display: flex;
  flex-direction: column;
  font-size: 12px;
  line-height: 12px;
}

.title-buttons{
  margin-left: auto;
  display: flex;
  gap: 3px;
}

.title-buttons button{
  width: 18px;
  height: 18px;
  border: 1px solid #fff;
  background: #C0C0C0;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff;
  cursor: pointer;
  font-weight: bold;
  line-height: 16px;
}
.title-buttons button:active{
  box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #fff;
}
.title-buttons .btn-close{
  background: #C00000;
  color: #fff;
}

/* MENÜ */
.menu-bar{
  background: #C0C0C0;
  padding: 4px 6px;
  border-bottom: 2px solid #808080;
  display: flex;
  gap: 15px;
  font-size: 13px;
}

.menu-bar span{
  padding: 2px 6px;
  cursor: default;
}
.menu-bar span:hover{
  background: #000080;
  color: white;
  padding: 2px 4px;
}

/* CANVAS TERÜLET (a teljes ablakban) */
.content-area{
  position: relative;
  flex: 1;
  background: white;
  border: 2px inset #808080;
  margin: 6px;
  overflow: hidden;
}

#canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  image-rendering: pixelated;
}

/* ALSÓ STATUS BAR */
.status-bar{
  background: #C0C0C0;
  border-top: 2px solid #808080;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

/* KIS VÍZSZINTES PANEL (jobb alsó) */
.control-panel{
  position: absolute;
  right: 12px;
  bottom: 44px; /* taskbar fölé */
  width: 360px;
  background: #C0C0C0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  z-index: 3000;
}

.control-panel .panel-title{
  background: #000080;
  color: #fff;
  padding: 3px 6px;
  font-weight: bold;
  border-bottom: 2px solid #808080;
}

.control-panel .panel-tiles{
  display: flex;
  gap: 6px;
  padding: 6px;
  background: #C0C0C0;
  border-bottom: 2px solid #808080;
}

.tile{
  width: 80px;
  height: 60px;
  background: #E0E0E0;
  border: 2px solid #808080;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}
.tile:active{
  border: 2px inset #808080;
}
.tile.selected{
  outline: 2px dotted #000;
  outline-offset: -4px;
  background: #fff;
}

.tile.small{
  width: 78px;
  height: 42px;
  font-size: 16px;
}

.control-panel .panel-status{
  background: #C0C0C0;
  padding: 4px 6px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

/* GAME OVER MODAL */
#gameOver{
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  display: none;
  z-index: 9000;
}

#gameOver .content-area{
  height: 200px;
}

.win-btn-big{
  width: 140px;
  height: 28px;
  background: #C0C0C0;
  border: 2px outset #FFFFFF;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff;
  font-weight: bold;
  cursor: pointer;
}
.win-btn-big:active{
  border: 2px inset #FFFFFF;
  box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #fff;
}


/* ---- ICONS (from icons.html) ---- */
.icon-rj45 {
    width: 64px;
    height: 64px;
    background: #d0d0d0;
    border: 3px solid #808080;
    position: relative;
    box-sizing: border-box;
    font-family: "MS Sans Serif";
}

/* PIN-ek */
.rj45-pin {
    width: 3px;
    height: 16px;
    background: #d4a017;
    border: 2px solid #8a6b00;
    position: absolute;
    top: 6px;
}

/* Egyenként pozicionálható */
.p1 { left: 6px; }
.p2 { left: 12px; }
.p3 { left: 18px; }
.p4 { left: 24px; }
.p5 { left: 30px; }
.p6 { left: 36px; }
.p7 { left: 42px; }
.p8 { left: 48px; }

/* Felirat */
.rj45-label {
    position: absolute;
    bottom: 5px;
    width: 100%;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}
.rj-connector {
    width: 40px;
    height: 20px;
    background: #b0b0b0;
    border: 3px solid #707070;
    position: absolute;
    top: 32px;
    left: 6px;
}

.icon-opt {
    width: 64px;
    height: 64px;
    background: #d0d0d0;
    border: 3px solid #808080;
    position: relative;
    box-sizing: border-box;
    font-family: "MS Sans Serif";
}

/* Fénycsóvák */
.opt-beam {
    width: 8px;
    height: 20px;
    background: #4aa3ff;
    border: 2px solid #003c80;
    position: absolute;
    top: 6px;
}

.b1 { left: 10px; }
.b2 { left: 24px; }
.b3 { left: 38px; }

/* Csatlakozó */
.opt-connector {
    width: 40px;
    height: 20px;
    background: #b0b0b0;
    border: 3px solid #707070;
    position: absolute;
    top: 32px;
    left: 6px;
}

/* Felirat */
.opt-label {
    position: absolute;
    bottom: 6px;
    width: 100%;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.icon-router {
    width: 64px;
    height: 64px;
    background: #d0d0d0;
    border: 3px solid #808080;
    position: relative;
    box-sizing: border-box;
    font-family: "MS Sans Serif";
}

/* Antennák */
.router-ant {
    width: 5px;
    height: 16px;
    background: #505050;
    position: absolute;
    top: 4px;
}

.a1 { left: 12px; }
.a2 { left: 42px; }

/* Router ház */
.router-body {
    width: 40px;
    height: 10px;
    background: #b0b0b0;
    border: 3px solid #707070;
    position: absolute;
    top: 17px;
    left: 6px;
}

/* LED-ek */
.router-led {
    width: 2px;
    height: 2px;
    background: #004000;
    border: 2px solid #002000;
    position: absolute;
    top: 22px;
}

.l1 { left: 12px; }
.l2 { left: 22px; }
.l3 { left: 32px; }
.l4 { left: 42px; }

.on { background: #00ff00; }

/* Felirat */
.router-label {
    position: absolute;
    bottom: 6px;
    width: 100%;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.icon-pc {
    width: 64px;
    height: 64px;
    background: #d0d0d0;
    border: 3px solid #808080;
    position: relative;
    box-sizing: border-box;
    font-family: "MS Sans Serif";
}

/* MONITOR KERET */
.pc-monitor {
    width: 30px;
    height: 20px;
    background: #b0b0b0;
    border: 3px solid #707070;
    position: absolute;

    /* középponttól */
    top: 19px;
    left: 32px;
    transform: translate(-50%, -60%);
}

/* KÉK KÉPERNYŐ */
.pc-screen {
    width: 26px;
    height: 18px;
    background: #4aa3ff;
    border: 2px solid #003c80;
    position: absolute;

    /* középponttól */
    top: 19px;
    left: 32px;
    transform: translate(-50%, -60%);
}

/* TALP */
.pc-stand {
    width: 16px;
    height: 3px;
    background: #909090;
    border: 3px solid #707070;
    position: absolute;

    /* középponttól */
    top: 30px;
    left: 32px;
    transform: translate(-50%, 0);
}

/* FELIRAT */
.pc-label {
    position: absolute;
    top: 40px;
    left: 32px;
    transform: translate(-50%, 0);
    font-size: 16px;
    font-weight: bold;
}

.icon-dns {
    width: 64px;
    height: 64px;
    background: #d0d0d0;
    border: 3px solid #808080;
    position: relative;
    box-sizing: border-box;
    font-family: "MS Sans Serif";
}

/* Kék gömb */
.dns-globe {
    width: 22px;
    height: 22px;
    background: #4aa3ff;
    border: 3px solid #003c80;
    border-radius: 50%;
    position: absolute;

    /* középponttól */
    top: 20px;
    left: 29px;
    transform: translate(-50%, -50%);
}

/* Szerver doboz */
.dns-box {
    width: 40px;
    height: 18px;
    background: #b0b0b0;
    border: 3px solid #707070;
    position: absolute;

    /* középponttól */
    top: 47px;
    left: 29.3px;
    transform: translate(-50%, -50%);
}

/* Felirat */
.dns-label {
    position: absolute;
    top: 38px;
    left: 30px;
    transform: translate(-50%, 0);
    font-size: 16px;
    font-weight: bold;
}

.icon-dhcp {
    width: 64px;
    height: 64px;
    background: #d0d0d0;
    border: 3px solid #808080;
    position: relative;
    box-sizing: border-box;
    font-family: "MS Sans Serif";
}

/* Hullámok */
.dhcp-wave {
    width: 8px;
    height: 16px;
    background: #00ff00;
    border: 2px solid #006600;
    position: absolute;

    /* alap pozíció */
    top: 8px;
}

.w1 { left: 6px; }
.w2 { left: 20px; }
.w3 { left: 34px; }

/* Doboz */
.dhcp-box {
    width: 48px;
    height: 18px;
    background: #b0b0b0;
    border: 3px solid #707070;
    position: absolute;

    /* középponttól */
    top: 46px;
    left: 30px;
    transform: translate(-50%, -50%);
}

/* Felirat */
.dhcp-label {
    position: absolute;
    top: 37px;
    left: 30px;
    transform: translate(-50%, 0);
    font-size: 16px;
    font-weight: bold;
}

.icon-switch {
    width: 64px;
    height: 64px;
    background: #d0d0d0;
    border: 3px solid #808080;
    position: relative;
    box-sizing: border-box;
    font-family: "MS Sans Serif";
}

/* Portok */
.sw-port {
    width: 2px;
    height: 5px;
    background: #303030;
    border: 2px solid #000;
    position: absolute;

    /* port sor magassága */
    top: 18px;
}

/* Egyenként pozicionálható */

/* Switch ház */
.sw-box {
    width: 48px;
    height: 10px;
    background: #b0b0b0;
    border: 3px solid #707070;
    position: absolute;

    /* középponttól */
    top: 22px;
    left: 29px;
    transform: translate(-50%, -50%);
}

/* Felirat */
.sw-label {
    position: absolute;
    top: 40px;
    left: 32px;
    transform: translate(-50%, 0);
    font-size: 16px;
    font-weight: bold;
}

.icon-packet {
    width: 64px;
    height: 32px;
    position: relative;
    box-sizing: border-box;
    font-family: "MS Sans Serif";
}

/* Boríték test */
.packet-envelope {
    width: 36px;
    height: 20px;
    background: #ffffff;
    border: 2px solid #707070;
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
}

/* Boríték „X” / hajtás */
.packet-flap {
    width: 33px;
    height: 16px;
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
    border-left: 2px solid #707070;
    border-right: 2px solid #707070;
    border-bottom: 2px solid #707070;
    clip-path: polygon(0 0, 50% 80%, 100% 0, 100% 100%, 0 100%);
}

/* Felirat: PACKET -> rövidítve */
.packet-label {
    position: absolute;
    bottom: 0px;
    width: 100%;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
}
