/* ============================================================
   MERGED STYLES — CrunchyPass inside CrunchySize shell
   Strategy:
     • Global resets, body, top-bar, branding, ad, footer,
       stickies, modals, visit-counter, gang-bar → from CrunchySize
       (identical in both; CrunchySize version is authoritative)
     • App-shell window chrome, sidebars → shared / identical
     • CrunchyPass-specific additions (terminal, history, password
       display, analyze section) → appended below
     • CrunchySize-specific app bits (drop-zone, batch-list,
       previewCanvas, layer-list, zoom-toolbar, atlas modal) → OMITTED
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* ==================== CHICAGOFLF ==================== */
@font-face {
  font-family: 'ChicagoFLF';
  src: url('fonts/ChicagoFLF.woff2') format('woff2'),
       url('fonts/ChicagoFLF.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ==================== GLOBAL RESET ==================== */
* { border-radius: 0 !important; }

/* ==================== BODY ==================== */
body {
  background-color: #bfbfbf;
  background-image: url('img/bg-tile2.png');
  background-repeat: repeat;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  font-family: 'ChicagoFLF', "Chicago", "Geneva", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: #111;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ==================== TOP BAR ==================== */
#top-bar {
  display: flex;
  align-items: center;
  background: #111;
  color: #e8e8e8;
  padding: 6px 16px;
  min-height: 32px;
  gap: 16px;
}

#gang-bar {
  text-align: center;
  padding: 10px;
  line-height: 0;
}
#gang-bar img {
  width: 342px;
  height: 100%;
  display: inline-block;
}

#fortune-marquee {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

#marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  padding-left: 4rem;
  animation: marquee 35s linear infinite;
  font-size: 11px;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

#fortune-marquee:hover #marquee-track {
  animation-play-state: paused;
}

#language-switcher {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

#language-switcher a {
  font-family: "Segoe UI Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
  line-height: 1;
  vertical-align: middle;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

#language-switcher a:hover { opacity: 1; }

#language-switcher img {
  border: 1px solid #808080;
  vertical-align: middle;
  width: 18px;
  height: 12px;
  opacity: 0.85;
  transition: opacity 0.15s ease-in-out;
}

/* ==================== BRANDING HEADER ==================== */


/* ==================== BRANDING HEADER ==================== */
#branding-header {
  background-image: url('img/black-tile.png');
  border-bottom: 3px solid #000;
  border-top: 3px solid #000;
  padding: 18px 0;        /* This is critical */
  width: 100%;
}

#branding-header .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 0 20px;
}

#branding-logo-area h1 {
  margin: 0;
  font-family: 'ChicagoFLF', "Chicago", "Geneva", sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.5px;
  text-shadow: 2px 2px 0 #000;
  line-height: 1;
}

#branding-logo-area h1 span { color: #c42b2c; }

#branding-tagline {
  color: #aaa;
  font-size: 11px;
  margin: 4px 0 0 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#branding-copy {
  flex: 1;
  padding-left: 20px;
  color: #ccc;
  font-size: 11px;
  line-height: 1.4;
}

#branding-copy strong { color: #fff; font-weight: 800; }

@media (max-width: 600px) {
  #branding-copy {
    flex-basis: 100%;
    border-top: 1px solid #333;
    padding-top: 12px;
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  #branding-header .content-wrapper { padding: 0 15px; }
}

/* #mascot-frame {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
} */



#mascot-img {
  object-fit: contain;
}

/* .mascot-placeholder {
  font-size: 40px;
  line-height: 1;
} */

/* ==================== CONTENT WIDTH CONTROL ==================== */
.content-wrapper {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  width: 100%;
}

@media (max-width: 900px) {
  .content-wrapper {
    max-width: 100%;
    padding: 0 15px;
  }
}

/* ==================== AD BANNERS ==================== */
.ad-banner {
  width: 728px;
  max-width: 98%;
  height: 90px;
  background: #c8c8c8;
  border: 1px dashed #888;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px auto !important;
  font-size: 11px;
  color: #777;
  letter-spacing: 0.05em;
  clear: both;
}

.ad-banner-small { height: 60px; }

/* ==================== APP SHELL ==================== */
.app-shell-wide {
  width: 90%;
  max-width: 1800px;
  margin: 18px auto;
}

/* ==================== PLATINUM WINDOW CHROME ==================== */
:root {
  --platinum-bg:    #c0c0c0;
  --platinum-light: #e8e8e8;
  --platinum-mid:   #a8a8a8;
  --platinum-dark:  #606060;
  --platinum-black: #000000;
  --platinum-white: #ffffff;
  --title-grad-1:   #888888;
  --title-grad-2:   #eeeeee;
  --inner-bg:       #d8d8d8;
  --status-text:    #000000;
}

.window {
  width: 100%;
  border-top:    1px solid var(--platinum-light);
  border-left:   1px solid var(--platinum-light);
  border-bottom: 1px solid var(--platinum-dark);
  border-right:  1px solid var(--platinum-dark);
  outline: 1px solid var(--platinum-black);
  background: var(--platinum-bg);
  padding: 2px;
  position: relative;
  box-shadow: 5px 5px 0 0 rgba(0,0,0,0.2);
  user-select: none;
}

.title-bar {
  height: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(#c0c0c0, #c0c0c0) top / 100% 2px no-repeat,
    linear-gradient(#c0c0c0, #c0c0c0) bottom / 100% 4px no-repeat,
    repeating-linear-gradient(
      to bottom,
      #b8b8b8 0px, #b8b8b8 1px,
      #d4d4d4 1px, #d4d4d4 2px
    ) right center / calc(97% - 8px) 100% no-repeat,
    linear-gradient(#a8a8a8, #a8a8a8) right top / 1px 100% no-repeat;
  border-bottom: 1px solid var(--platinum-black);
}

.title-bar.active {
  background:
    linear-gradient(#c0c0c0, #c0c0c0) top / 100% 2px no-repeat,
    linear-gradient(#c0c0c0, #c0c0c0) bottom / 100% 4px no-repeat,
    repeating-linear-gradient(
      to bottom,
      #888888 0px, #888888 1px,
      #dddddd 1px, #dddddd 2px
    ) right center / calc(97% - 8px) 100% no-repeat,
    linear-gradient(#a8a8a8, #a8a8a8) right top / 1px 100% no-repeat;
}

.title-bar .title-text {
  font-size: 12px;
  color: var(--platinum-black);
  letter-spacing: 0;
  padding: 0 6px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  background: var(--platinum-bg);
  line-height: 18px;
}

.close-box {
  position: absolute;
  left: 1px;
  top: 45%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  background: var(--platinum-bg);
  border-top:    1px solid var(--platinum-light);
  border-left:   1px solid var(--platinum-light);
  border-bottom: 1px solid var(--platinum-dark);
  border-right:  1px solid var(--platinum-dark);
  outline: 1px solid var(--platinum-black);
  z-index: 2;
  cursor: default;
}

.close-box:hover { background: #aaaaaa; }

.close-box:active::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto;
  background: var(--platinum-dark);
}

.zoom-box {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  background: var(--platinum-bg);
  border-top:    1px solid var(--platinum-light);
  border-left:   1px solid var(--platinum-light);
  border-bottom: 1px solid var(--platinum-dark);
  border-right:  1px solid var(--platinum-dark);
  outline: 1px solid var(--platinum-black);
  z-index: 2;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-box::before {
  content: '';
  width: 5px;
  height: 5px;
  border-top:   1px solid var(--platinum-black);
  border-right: 1px solid var(--platinum-black);
  background: transparent;
}

.zoom-box:hover { background: #aaaaaa; }

.content {
  width: 100%;
  background: var(--inner-bg);
  border-top:    2px solid var(--platinum-dark);
  border-left:   2px solid var(--platinum-dark);
  border-bottom: 2px solid var(--platinum-light);
  border-right:  2px solid var(--platinum-light);
  position: relative;
  overflow: hidden;
  height: auto;
  min-height: 600px;
}

/* ==================== APP LAYOUT ==================== */
#app-container {
  display: flex;
  height: 75vh;
  min-height: 600px;
}

/* ==================== SIDEBARS ==================== */
#sidebar-left {
  width: 250px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  background: #c0c0c0;
  border-right: 2px solid #808080;
}

#sidebar-right {
  width: 250px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  background: #dcd8d0;
  border-left: 2px solid #808080;
  overflow-y: auto;
}

/* ==================== SETTINGS BOX ==================== */
.settings-box {
  background: #b0b0b0;
  padding: 8px;
  border: 1px solid #000;
  font-size: 11px;
}

.settings-box label {
  font-size: 10px;
  margin-right: 10px;
  cursor: pointer;
}

/* ==================== BUTTONS ==================== */
button {
  background: #c0c0c0;
  border: 2px solid #000;
  border-radius: 6px !important;
  box-shadow: inset -2px -2px 0 #ffffff, inset 2px 2px 0 #808080;
  padding: 8px;
  cursor: pointer;
  font-family: 'ChicagoFLF', "Chicago", "Geneva", sans-serif;
  font-size: 12px;
}

button:active {
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
  border-radius: 6px !important;
  transform: translate(1px, 1px);
}

button:disabled { color: black; }
button.btn-green { background: #90ee90; }

/* ==================== INPUTS ==================== */
input[type="range"]  { width: 100%; }
input[type="number"] { width: 55px; border: 1px solid #000; }

hr {
  border: 0;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
  margin: 10px 0;
}



/* ==================== REMOVE BUTTON (shared) ==================== */
.btn-remove {
  width: 18px;
  height: 18px;
  background: #e0e0e0;
  border: 1px solid #000;
  color: #c42b2c;
  font-weight: bold;
  line-height: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: inset 1px 1px #fff;
}
.btn-remove:hover { background: #c42b2c; color: #fff; }

/* ==================== PREVIEW HEADER ==================== */
.preview-header {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  color: #333;
}

/* ==================== MAIN VIEW (password area) ==================== */
#main-view {
  flex: 1;
  background: #c0c0c0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ==================== PASSWORD DISPLAY ==================== */
#password-area {
  padding: 8px;
  text-align: center;
  flex-shrink: 0;
}

#password-display {
  font-family: monospace;
  font-size: 28px;
  letter-spacing: 3px;
  background: #fff;
  border: 3px solid #000;
  padding: 18px 12px;
  min-height: 68px;
  line-height: 1.2;
  word-break: break-all;
  cursor: pointer;
  user-select: all;
  box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #808080;
}

/* ==================== HISTORY LIST ==================== */
#history-list {
  overflow-x: hidden !important;
  background: #fff;
  border: 2px solid #727272;
  padding: 4px 0;
  box-sizing: border-box;
  display: block;
  width: 100%;
}

.history-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
  background: #fff;
  cursor: default;
  transition: background 0.15s;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.history-item:hover { background: #f4f4f4; }
.history-item:last-child { border-bottom: none; }

.btn-copy-row {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  background: #d4d0c8;
  border-top:    1px solid #ffffff;
  border-left:   1px solid #ffffff;
  border-bottom: 1px solid #808080;
  border-right:  1px solid #808080;
  outline: 1px solid #000;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-copy-row:hover  { background: #b8d4f8; }
.btn-copy-row:active {
  border-top:    1px solid #808080;
  border-left:   1px solid #808080;
  border-bottom: 1px solid #ffffff;
  border-right:  1px solid #ffffff;
}

.history-password {
  flex: 1 1 0%;
  min-width: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: normal;
  color: #111;
  overflow: hidden;
  user-select: text;
  cursor: text;
}

.history-meta {
  flex: 0 0 68px;
  font-size: 10px;
  color: #666;
  text-align: right;
  line-height: 1.3;
}

.history-meta .strength {
  font-weight: bold;
  display: block;
}

.history-item button.btn-remove {
  flex: 0 0 auto;
  align-self: center;
  margin-left: 0;
}

/* ==================== ANALYZE SECTION ==================== */
#analyze-section {
  padding: 12px;
  background: #e0e0e0;
  border-top: 2px solid #808080;
  flex-shrink: 0;
}

/* ==================== TERMINAL STRENGTH WINDOW ==================== */
.terminal-window {
  width: 100%;
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: inset -2px -2px 0 #808080, inset 2px 2px 0 #ffffff, 4px 4px 0 rgba(0,0,0,0.3);
  overflow: hidden;
  margin-bottom: 12px;
}

.terminal-title-bar {
  height: 22px !important;
  padding: 0 8px !important;
  margin: 0 !important;
}

.terminal-close-box {
  width: 13px;
  height: 13px;
  left: 4px !important;
}

.terminal-body {
  background: #000000;
  color: #00ff00;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.4;
  padding: 14px 12px;
  min-height: 260px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.1);
}

.terminal-body .header { color: #00ffff; font-weight: bold; }
.terminal-body .good   { color: #00ff00; }
.terminal-body .warn   { color: #ffff00; }
.terminal-body .bad    { color: #ff4444; }
.terminal-body .info   { color: #88ccff; }

.terminal-progress {
  height: 14px;
  background: #111;
  border: 1px solid #00ff00;
  margin: 10px 0 8px 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 4px #000;
}

.terminal-progress-bar {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== TERMINAL CURSOR ==================== */
.terminal-prompt-line {
  margin-top: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  display: flex;
  align-items: center;
}

.terminal-prompt-text {
  color: #ffffff;
  letter-spacing: 0.05em;
  margin-right: 3px;
}

.terminal-cursor {
  display: inline-block;
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
  animation: termBlink 1.05s step-start infinite;
  vertical-align: middle;
}

@keyframes termBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ==================== STICKIES ==================== */
.content-wrapper-wide {
  max-width: 1400px;
  margin: 0 auto;
  width: 95%;
}

.note-rotate-left         { transform: rotate(-2deg); }
.note-rotate-right        { transform: rotate(2.5deg); }
.note-rotate-slight-left  { transform: rotate(-1deg); }
.note-rotate-slight-right { transform: rotate(1.2deg); }
.note-offset-up   { margin-top: -15px; }
.note-offset-down { margin-top: 15px; }

#stickies-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 30px 20px;
  width: 100%;
}

.sticky-note {
  width: 200px;
  min-height: 200px;
  padding: 15px;
  position: relative;
  box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.1);
  color: #111;
  transition: transform 0.2s ease-out;
}

.sticky-note:hover {
  transform: rotate(0deg) scale(1.1) !important;
  z-index: 1000;
  box-shadow: 10px 10px 20px rgba(0,0,0,0.3);
}

.sticky-handle {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 12px;
  background: rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.sticky-note h3 {
  margin: 10px 0 8px 0;
  font-size: 13px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 4px;
}

.sticky-note p strong { color: #000; font-weight: 800; }
.sticky-note p { font-size: 11px; line-height: 1.6; }

.note-yellow { background: #ffffa5; }
.note-blue   { background: #a5ffff; }
.note-pink   { background: #e66cb5; }
.note-green  { background: #caffca; }
.note-cyan   { background: #30b4f1; }
.note-orange { background: #f78e2d; }
.note-purple { background: #e2caff; }
.note-lime   { background: #f5d833; }

/* ==================== RETRO CONTACT LINK ==================== */
.retro-contact-link {
  display: inline-block;
  text-decoration: none;
  padding: 4px;
  transition: transform 0.1s ease;
}
.retro-contact-link:hover  { transform: scale(1.1); }
.retro-contact-link:active { transform: scale(0.95); }

/* ==================== FOOTER ==================== */
#site-footer {
  background-image: url('img/black-tile.png');
  color: #888;
  font-size: 10px;
  padding: 18px 24px;
  margin-top: 16px;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  text-align: center;
  line-height: 1.8;
}

#site-footer a { color: #aaa; text-decoration: none; }
#site-footer a:hover { text-decoration: underline; color: #ccc; }
#site-footer .footer-links { margin-bottom: 6px; }
#site-footer .footer-links span { margin: 0 6px; color: #444; }

/* ==================== VISITOR COUNTER ==================== */
#visit-counter {
  text-align: center;
  padding: 10px 0 4px;
}

#visit-counter div {
  font-size: 11px;
  color: #fff;
  margin-bottom: 4px;
}

#visit-counter img {
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
  background: #c0c0c0;
  padding: 4px;
  image-rendering: pixelated;
}

/* ==================== TOS MODAL ==================== */
#tos-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#tos-modal-overlay.tos-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#tos-modal {
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: inset -2px -2px 0 #808080, inset 2px 2px 0 #ffffff, 4px 4px 0 #000;
  width: 480px;
  max-width: 94vw;
  font-size: 11px;
}

#tos-modal .modal-titlebar {
  height: 26px;
  background-image: url('img/hazard-tile.png');
  background-color: #000080;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #fff;
  text-shadow: 2px 2px #101010;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.03em;
}

#tos-modal .modal-body {
  padding: 16px 18px;
  line-height: 1.7;
  color: #111;
  max-height: 52vh;
  overflow-y: auto;
}

#tos-modal .modal-body h3 {
  font-size: 12px;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  letter-spacing: 0.05em;
}

#tos-modal .modal-body p { margin: 0 0 8px 0; }

#tos-modal .modal-footer {
  padding: 10px 18px 14px;
  text-align: right;
  border-top: 1px solid #808080;
}

/* ==================== GENERAL MODAL OVERLAY ==================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal-window {
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: inset -2px -2px 0 #808080, inset 2px 2px 0 #ffffff, 4px 4px 0 #00000042;
  width: 460px;
  max-width: 94vw;
  font-family: 'ChicagoFLF', "Chicago", "Geneva", sans-serif;
  font-size: 12px;
}

.modal-titlebar {
  height: 24px;
  background: repeating-linear-gradient(to bottom, #dcdcdc 0px, #dcdcdc 1px, #c0c0c0 1px, #c0c0c0 2px);
  border-bottom: 1px solid #7f7f7f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  padding: 0 8px;
  white-space: nowrap;
}

.modal-body {
  padding: 20px 24px 16px;
  line-height: 1.55;
  color: #111;
  max-height: 58vh;
  overflow-y: auto;
}

.modal-body h3 {
  font-size: 12px;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  letter-spacing: 0.05em;
}

.modal-body p { margin: 0 0 10px 0; }

.modal-footer {
  padding: 12px 18px 14px;
  text-align: right;
  border-top: 1px solid #808080;
}

.modal-footer button {
  min-width: 80px;
  border: 2px solid #000;
  border-radius: 4px !important;
  box-shadow: inset -2px -2px 0 #ffffff, inset 2px 2px 0 #808080;
}

.about-window { width: 400px; }

.about-body {
  padding: 20px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  line-height: 1.45;
}

.about-text { flex: 1; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 980px) {
  #app-container {
    flex-direction: column !important;
    height: auto !important;
    min-height: 620px;
    gap: 12px;
  }

  #sidebar-left,
  #sidebar-right {
    width: 100% !important;
    border-right: none !important;
    border-left: none !important;
    border-bottom: 3px solid #808080;
    padding: 14px;
  }

  #sidebar-right {
    border-bottom: none !important;
    border-top: 3px solid #808080;
  }

  #main-view {
    height: 420px;
    min-height: 420px;
    border: 2px solid #808080;
  }

  .terminal-window { height: 360px; }
  .terminal-body   { min-height: 290px; }

  #password-display {
    font-size: 24px;
    padding: 16px 10px;
    min-height: 72px;
  }

  #password-area { padding: 16px; }

  #sidebar-right > div:last-child { margin-top: 12px; }
}

@media (max-width: 600px) {
  #app-container  { min-height: 520px; }
  #main-view      { height: 380px; min-height: 380px; }
  .terminal-window { height: 320px; }
}

@media (max-width: 480px) {
  #password-display {
    font-size: 21px;
    letter-spacing: 2px;
  }
}

/* ============================================================
   QR-STYLES.CSS — CrunchyQR Web
   QR-specific additions on top of base styles.css
   ============================================================ */

/* ==================== TAB BUTTONS ==================== */
.tab-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: 10px;
  border: none;
  border-right: 1px solid #000;
  background: #b0b0b0;
  cursor: pointer;
  font-family: 'ChicagoFLF', "Chicago", "Geneva", sans-serif;
  border-radius: 0 !important;
  box-shadow: none;
  letter-spacing: 0;
}

.tab-btn:last-child { border-right: none; }

.tab-btn.tab-active {
  background: #d0d0d0;
  font-weight: bold;
  box-shadow: inset 0 -2px 0 #c0c0c0;
}

.tab-btn:hover:not(.tab-active) { background: #c4c4c4; }
.tab-btn:active { transform: none; }

/* ==================== QR INPUT GROUPS ==================== */
.qr-input-group input,
.qr-input-group textarea,
.qr-input-group select {
  font-family: 'ChicagoFLF', "Chicago", "Geneva", sans-serif;
  font-size: 11px;
}

/* ==================== SIDEBAR OVERRIDES FOR QR ==================== */
#sidebar-left {
  gap: 8px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#panel-generate,
#panel-read,
#panel-batch {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* ==================== QR CANVAS / OUTPUT ==================== */
#qr-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ==================== CAMERA SCAN LINE ANIMATION ==================== */
@keyframes scanLine {
  0%   { top: 0; }
  100% { top: calc(100% - 2px); }
}

/* ==================== QR HISTORY ITEMS ==================== */
.qr-history-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-bottom: 1px solid #ddd;
  background: #fff;
  cursor: default;
  transition: background 0.15s;
}

.qr-history-item:hover { background: #f0f4ff; }
.qr-history-item:last-child { border-bottom: none; }

.qr-history-thumb {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid #aaa;
  image-rendering: pixelated;
  cursor: pointer;
  background: #fff;
}

.qr-history-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.qr-history-label {
  font-size: 10px;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.qr-history-content {
  font-size: 9px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Courier New', monospace;
  margin-top: 2px;
}

/* ==================== BATCH RESULT CARDS ==================== */
.batch-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #d8d8d8;
  border: 1px solid #000;
  padding: 8px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
  width: 140px;
  flex-shrink: 0;
  position: relative;
}

.batch-card canvas {
  max-width: 120px;
  max-height: 120px;
  image-rendering: pixelated;
  border: 1px solid #aaa;
  cursor: pointer;
}

.batch-card-label {
  font-size: 9px;
  color: #333;
  margin-top: 5px;
  text-align: center;
  word-break: break-all;
  max-width: 130px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-family: monospace;
}

.batch-card-dl {
  margin-top: 4px;
  font-size: 9px;
  padding: 2px 6px;
  width: 100%;
}

/* ==================== SCAN HISTORY ==================== */
.scan-item {
  padding: 5px 6px;
  border-bottom: 1px solid #ddd;
  font-size: 10px;
  cursor: pointer;
}

.scan-item:hover { background: #f0f4ff; }

.scan-item-type {
  font-weight: bold;
  color: #333;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.scan-item-content {
  color: #555;
  font-family: monospace;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* ==================== FILE BUTTON HOVER ==================== */
.file-btn:hover {
  background: #c4c4c4 !important;
}

/* ==================== QR ACTIONS DISPLAY ==================== */
#qr-content-display {
  font-family: monospace;
  font-size: 10px;
  word-break: break-all;
}

/* ==================== RESPONSIVE OVERRIDES ==================== */
@media (max-width: 980px) {
  #sidebar-left,
  #sidebar-right {
    overflow-y: visible;
  }
  .batch-card { width: 130px; }
}

/* ==================== PROGRESS BAR FOR BATCH ==================== */
#batch-progress-bar {
  height: 6px;
  background: #90ee90;
  border: 1px solid #000;
  transition: width 0.2s;
}

#batch-progress-wrap {
  background: #fff;
  border: 1px solid #000;
  margin-top: 4px;
  height: 8px;
  overflow: hidden;
  display: none;
}

/* ==================== COLOR SYNC INPUT ==================== */
input[type="color"] {
  -webkit-appearance: none;
  cursor: pointer;
  padding: 0;
}

/* ==================== DECODE TEXT STYLING ==================== */
#decode-text.has-result {
  color: #000;
  font-weight: bold;
  border-color: #000;
}

#decode-text.has-url {
  color: #00008b;
  text-decoration: underline;
  cursor: pointer;
}

/* ==================== CAMERA ACTIVE STATE ==================== */
#camera-area.camera-active {
  border-color: #00aa00;
  box-shadow: 0 0 0 2px #00aa00;
}

/* ==================== INFO PANEL OVERRIDES ==================== */
#qr-info-body {
  padding: 10px 12px;
}
