/* Klasyczny zestaw barw dla okien i paska */
:root {
  --color-titlebar: #0b6bd6;
  --color-taskbar: #1f1f1f;
  --color-task-button: #2a2a2a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  user-select: none;
  background: #0b5bd6 url('https://wallpapers.com/images/hd/blue-gradient-background-9q5l6yprlq4k5mab.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #fff;
  overflow: hidden;
}

/* Sekcja pulpitu */
.desktop {
  position: absolute;
  inset: 0 0 48px 0;
  padding: 12px;
}

/* Ikony na pulpicie */
.icon {
  position: absolute;
  width: 84px;
  text-align: center;
  cursor: default;
  padding: 6px 4px;
  border-radius: 10px;
  transition: background 0.12s ease;
}

.icon:hover {
  background: rgba(255, 255, 255, 0.15);
}

.icon.dragging {
  transition: none;
}

.icon.selected {
  outline: 2px solid var(--color-titlebar);
  background: rgba(11, 107, 214, 0.15);
}

.icon img {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto 4px auto;
  pointer-events: none;
}

.icon span {
  display: block;
  font-size: 13px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.icon input.rename {
  width: 100%;
  font-size: 13px;
  border: none;
  border-radius: 4px;
  padding: 2px 4px;
  outline: 2px solid var(--color-titlebar);
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  text-align: center;
}

/* Prostokąt do zaznaczania wielu ikon */
.marquee {
  position: absolute;
  border: 1px dashed #8ec1ff;
  background: rgba(142, 193, 255, 0.2);
  display: none;
  z-index: 9998;
}

/* Okna aplikacji */
.window {
  position: absolute;
  display: none;
  width: min(420px, calc(100vw - 32px));
  height: min(300px, calc(100vh - 120px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  min-width: 260px;
  min-height: 48px;
  background: #f0f0f0;
  color: #111;
  border: 2px solid #2b2b2b;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  resize: both;
}


@media (min-width: 900px) {
  .window {
    width: 420px;
    height: 300px;
  }
}

.window.active {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

.window-header {
  background: var(--color-titlebar);
  color: #fff;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  cursor: move;
}

.window-title {
  pointer-events: none;
}

.win-controls {
  display: flex;
  gap: 6px;
}

.btn {
  background: #e0e0e0;
  color: #111;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  height: 24px;
  width: 28px;
  font-weight: bold;
}

.btn:hover {
  filter: brightness(0.95);
}

.btn.close {
  background: #e53935;
  color: #fff;
}

.btn.min {
  background: #fbc02d;
}

/* Zawartość okna */
.window-content {
  background: #fff;
  height: calc(100% - 36px);
  padding: 10px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  overflow: auto;
}

/* Okno z grafiką (galeria) */
.window-image {
  height: auto;
  min-height: 0;
}

.window-image .window-content {
  display: block;
  padding: 0;
  overflow: auto;
  height: 100%;
}

.window-image .image-window {
  width: 100%;
  margin: 0;
}

.window-image .image-window img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  touch-action: pan-x pan-y;
}
/* Pasek zadań w dolnej części ekranu */
.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: var(--color-taskbar);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.start-btn {
  background: var(--color-titlebar);
  border: none;
  color: #fff;
  font-weight: bold;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}

.tasklist {
  display: flex;
  gap: 6px;
  overflow: auto;
  flex: 1 1 auto;
}

.cookie-toggle {
  background: transparent;
  margin: 0 8px;
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.cookie-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.cookie-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.cookie-toggle--disabled {
  opacity: 0.6;
}

.cookie-toggle--disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.08);
}

.cookie-toggle__icon {
  pointer-events: none;
}

/* Menu Start */
.start-menu {
  position: absolute;
  left: 12px;
  bottom: 60px;
  width: 260px;
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  padding: 16px 14px;
  z-index: 9980;
}

.start-menu__panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.start-menu__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.start-menu__item {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  border-radius: 8px;
  text-align: left;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.start-menu__item:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(2px);
}

.start-menu__item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}


.task-btn {
  background: var(--color-task-button);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.task-btn.active {
  outline: 2px solid var(--color-titlebar);
}

.clock {
  min-width: 140px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.clock-time {
  font-size: 14px;
  font-weight: 600;
}
.clock-date {
  font-size: 12px;
  opacity: 0.8;
}

/* Menu kontekstowe pulpitu */
.context-menu {
  position: absolute;
  display: none;
  min-width: 240px;
  background: #2b2b2b;
  color: #fff;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  z-index: 9999;
}

.ctx-item {
  padding: 8px 10px;
  cursor: pointer;
}

.ctx-item:hover {
  background: #3a3a3a;
}

/* Modal wyboru tapety */
.wallpaper-picker {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.wallpaper-modal {
  background: #1e1e1e;
  color: #fff;
  padding: 16px;
  border-radius: 12px;
  width: min(860px, 92vw);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
}

.wallpaper-modal h3 {
  margin: 0;
}

.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.wall-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  aspect-ratio: 16 / 9;
  background: #000 center / cover no-repeat;
}

.wall-thumb:hover {
  border-color: var(--color-titlebar);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.btn-secondary {
  background: #444;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

/* Eksplorator plików */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.crumb {
  background: #eef3ff;
  border: 1px solid #c8d9ff;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.file-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: background 0.16s ease;
}

.file-item:hover {
  background: #f0f7ff;
}

.file-ico {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
}

.file-ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.file-name {
  font-size: 14px;
  color: #1c1c1c;
  word-break: break-word;
}

@media (max-width: 640px) {
  .window {
    width: clamp(260px, 90vw, 420px);
    max-width: 90vw;
  }

  .taskbar {
    flex-wrap: wrap;
    height: auto;
    padding-bottom: 12px;
  }

  .clock {
    width: 100%;
    text-align: left;
  }
}
/* Terminal umiejętności */
.window-terminal .window-content {
  background: #0e1013;
  color: #d8f6ff;
  padding: 0;
  font-family: "Fira Code", "Source Code Pro", Consolas, monospace;
}

.terminal {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.terminal-output {
  flex: 1;
  padding: 12px 14px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.terminal-prompt {
  color: #5ee9ff;
  font-weight: 600;
}

.terminal-input {
  flex: 1;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  min-width: 0;
  caret-color: #5ee9ff;
}

.terminal-input::placeholder {
  color: rgba(216, 246, 255, 0.4);
}

.terminal-line {
  margin: 0;
  line-height: 1.45;
}

.terminal-line--input {
  color: #9ff3ff;
}

.terminal-line--output {
  color: #e3faff;
}

.terminal-line--intro {
  color: #9fb6ff;
}

.terminal-line--error {
  color: #ff7b92;
}

.terminal-hint {
  margin: 0;
  padding: 6px 14px 12px 14px;
  font-size: 12px;
  color: rgba(216, 246, 255, 0.65);
}

.terminal-hint kbd {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0 6px;
  font-size: 11px;
  color: inherit;
}
/* Sejf z certyfikatami */
.window-safe .window-content {
  background: #1a1d24;
  color: #f1f5ff;
  font-family: "Segoe UI", Arial, sans-serif;
  padding: 18px 20px;
}

.safe-locker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.safe-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.safe-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.safe-input {
  font-size: 18px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  letter-spacing: 4px;
  text-align: center;
}

.safe-input:focus {
  outline: 2px solid #5ee9ff;
  outline-offset: 2px;
}

.safe-submit {
  width: 100%;
  padding: 10px;
  background: #5f646f;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.safe-submit:hover {
  background: #6c717c;
}

.safe-submit:active {
  background: #4f535c;
}

.safe-message {
  min-height: 20px;
  margin: 0;
  font-size: 13px;
}

.safe-message[data-state="error"] {
  color: #ff7b92;
}

.safe-message[data-state="success"] {
  color: #5ee9ff;
}
