/* 
 * subRobots.com - Main Stylesheet
 * Retro 80s Gaming Aesthetic with Robotic Theme
 * Color Palette: Blue, White, Yellow
 */

/* ===== Base Styles ===== */
:root {
  /* Color Palette */
  --primary-blue: #3a79ff;
  --dark-blue: #050b24;
  --light-blue: #7be5ff;
  --neon-blue: #39f6ff;
  --primary-yellow: #ffd500;
  --light-yellow: #fff47e;
  --neon-pink: #ff39b6;
  --neon-purple: #b63eff;
  --neon-green: #54ffae;
  --neon-yellow: #ffd500;
  --white: #ffffff;
  --off-white: #f0f0f0;
  --black: #000000;
  --dark-gray: #222222;
  --medium-gray: #555555;
  --light-gray: #aaaaaa;
  
  /* Typography */
  --font-heading: 'Orbitron', 'Press Start 2P', sans-serif;
  --font-body: 'Roboto', 'Arial', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Border Radius */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--white);
  background-color: var(--dark-blue);
  background-image: 
    linear-gradient(0deg, rgba(0, 51, 102, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%),
    url('../images/grid-bg.png');
  background-attachment: fixed;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--primary-yellow);
  text-transform: uppercase;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary-yellow);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--light-yellow);
  text-decoration: none;
}

/* Section Styles */
section {
  padding: var(--spacing-xl) 0;
  scroll-margin-top: 120px;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-yellow);
  box-shadow: 0 0 10px var(--primary-yellow), 0 0 20px var(--primary-yellow);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 2px solid transparent;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn-primary {
  background-color: var(--neon-blue);
  color: var(--dark-blue);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 18px rgba(57, 246, 255, 0.55);
}

.btn-primary:hover {
  background-color: rgba(57, 246, 255, 0.95);
  box-shadow: 0 0 22px rgba(57, 246, 255, 0.95);
}

.btn-secondary {
  background-color: var(--neon-pink);
  color: var(--dark-blue);
  border-color: rgba(255, 57, 182, 0.9);
  box-shadow: 0 0 16px rgba(255, 57, 182, 0.4);
}

.btn-secondary:hover {
  background-color: rgba(255, 57, 182, 0.92);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-yellow);
  border-color: var(--primary-yellow);
}

.btn-outline:hover {
  background-color: var(--primary-yellow);
  color: var(--dark-blue);
}

.btn-download {
  background-color: var(--primary-blue);
  color: var(--white);
  border-color: var(--neon-blue);
  padding-left: var(--spacing-xl);
  position: relative;
}

.btn-download::before {
  content: '↓';
  position: absolute;
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

.btn-download:hover {
  background-color: var(--dark-blue);
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(0, 51, 102, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary-yellow);
  padding: var(--spacing-sm) 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* OS Desktop Styles */
.desktop {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(0, 128, 255, 0.12), rgba(0, 0, 0, 0.92) 55%);
}

.desktop-wallpaper {
  position: fixed;
  inset: 0;
  background-image: url('../images/subRobots.png'), radial-gradient(circle at 20% 20%, rgba(57, 246, 255, 0.16), transparent 22%), radial-gradient(circle at 80% 10%, rgba(255, 57, 182, 0.12), transparent 18%), linear-gradient(180deg, rgba(5, 8, 35, 0.88), rgba(0, 0, 0, 1));
  background-position: center center, 20% 20%, 80% 10%;
  background-size: 100% auto, auto, cover;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-blend-mode: screen, screen, normal;
  z-index: 0;
}

.desktop.neon-wallpaper::before,
.desktop.neon-wallpaper::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.desktop.neon-wallpaper::before {
  background-image:
    linear-gradient(90deg, rgba(57, 246, 255, 0.10) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 57, 182, 0.10) 1px, transparent 1px);
  background-size: 140px 140px, 140px 140px;
  opacity: 0.55;
  animation: neon-grid-scroll 8s linear infinite;
}

.desktop.neon-wallpaper::after {
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.15), transparent 13%),
    radial-gradient(circle at 80% 20%, rgba(255, 57, 182, 0.18), transparent 16%),
    radial-gradient(circle at 55% 75%, rgba(57, 246, 255, 0.14), transparent 20%);
  opacity: 0.65;
  mix-blend-mode: screen;
  animation: neon-pulse 4.5s ease-in-out infinite alternate;
}

@keyframes neon-grid-scroll {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: -140px 0, 0 -140px; }
}

@keyframes neon-pulse {
  0% { opacity: 0.45; filter: blur(0); }
  100% { opacity: 0.7; filter: blur(1px); }
}

.desktop-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.55));
  z-index: 1;
}

.desktop-icons {
  position: absolute;
  top: 2rem;
  left: 2rem;
  right: 2rem;
  bottom: 5rem;
  z-index: 2;
  overflow-x: hidden;
  overflow-y: auto;
}

.desktop-icon {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  width: 116px;
  height: 152px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, var(--desktop-icon-opacity, 1));
  color: var(--white);
  opacity: var(--desktop-icon-opacity, 1);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.12s ease;
  text-align: center;
  touch-action: none;
  user-select: none;
}

.desktop-icon.dragging {
  z-index: 1;
  cursor: grabbing;
  transition: none;
}

.desktop-icon:hover {
  transform: translateY(-4px);
  background: rgba(255, 57, 182, 0.18);
  box-shadow: 0 0 22px rgba(255, 57, 182, 0.28);
}

.desktop-icon-graphic {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.6rem;
}

.desktop-icon-graphic img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
}

.desktop-icon-label {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--white);
}

.desktop-icon-menu {
  position: absolute;
  z-index: 10;
  width: 190px;
  padding: 0.35rem;
  border: 1px solid rgba(57, 246, 255, 0.38);
  background: rgba(2, 19, 44, 0.98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.desktop-icon-menu button {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.desktop-icon-menu button:hover,
.desktop-icon-menu button:focus-visible {
  outline: none;
  background: rgba(57, 246, 255, 0.14);
  color: var(--light-blue);
}

.taskbar-context-menu {
  position: fixed;
  z-index: 1200;
  width: 180px;
  padding: 0.35rem;
  border: 1px solid rgba(57, 246, 255, 0.38);
  background: rgba(2, 19, 44, 0.98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.taskbar-context-menu button {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.taskbar-context-menu button:hover:not(:disabled),
.taskbar-context-menu button:focus-visible:not(:disabled) {
  outline: none;
  background: rgba(57, 246, 255, 0.14);
  color: var(--light-blue);
}

.taskbar-context-menu button:disabled {
  color: rgba(255, 255, 255, 0.4);
  cursor: default;
}

.windows {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.reset-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 5, 18, 0.72);
  backdrop-filter: blur(5px);
}

.reset-dialog-window {
  width: min(440px, 100%);
  overflow: hidden;
  border: 1px solid rgba(0, 204, 255, 0.38);
  border-radius: 14px;
  background: rgba(5, 12, 22, 0.98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.7), 0 0 28px rgba(0, 204, 255, 0.18);
}

.reset-dialog-content {
  display: grid;
  gap: 1.5rem;
  padding: 1.4rem;
  color: #e8f7ff;
}

.reset-dialog-content p {
  margin: 0;
  line-height: 1.55;
}

.reset-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.os-window {
  position: absolute;
  min-width: 340px;
  min-height: 260px;
  border-radius: 18px;
  background: rgba(5, 12, 22, 0.96);
  border: 1px solid rgba(0, 204, 255, 0.22);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  opacity: 1;
  transform: scale(1);
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, top 0.18s ease, left 0.18s ease, width 0.18s ease, height 0.18s ease, right 0.18s ease, bottom 0.18s ease;
  will-change: transform, opacity, top, left, width, height, right, bottom;
}

.os-window.hidden {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  visibility: hidden;
}

.os-window.maximized {
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, top 0.18s ease, left 0.18s ease, width 0.18s ease, height 0.18s ease, right 0.18s ease, bottom 0.18s ease;
}

.os-window.maximized {
  top: 20px !important;
  left: 20px !important;
  right: 20px !important;
  bottom: 84px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 18px;
}

.window-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  min-height: 52px;
  background: rgba(4, 8, 20, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  user-select: none;
}

.window-titlebar:active {
  cursor: grabbing;
}

.window-title {
  color: var(--neon-pink);
  font-family: var(--font-heading);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.95rem;
  text-shadow: 0 0 8px rgba(255, 57, 182, 0.65);
}

.window-controls {
  display: flex;
  gap: 0.4rem;
}

.window-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.window-btn:hover {
  background: rgba(0, 204, 255, 0.15);
}

.window-content {
  padding: 1.15rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #e8f7ff;
}

.window-content h2 {
  font-size: 1.8rem;
  margin-bottom: 0.45rem;
  color: var(--primary-yellow);
}

.window-content p,
.window-content li,
.window-content a,
.window-content span {
  color: #d7e8ff;
}

.window-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.os-launch-btn {
  border: 1px solid rgba(0, 204, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.os-launch-btn:hover {
  transform: translateY(-1px);
  background: rgba(0, 204, 255, 0.14);
}

.window-content .app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.window-content .app-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  min-height: 380px;
}

.window-content .app-icon img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.os-window[data-window="site-apps"] .app-icon img {
  object-fit: contain;
}

.window-content .app-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.window-content .app-title {
  font-size: 1.05rem;
  margin: 0;
  color: var(--neon-blue);
}

.site-app-panels {
  margin-top: 1.5rem;
}

.site-app-panel {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 204, 255, 0.2);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-app-panel.hidden {
  display: none;
}

.conversion-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1rem;
}

.conversion-card h4 {
  margin: 0 0 0.75rem;
  color: var(--neon-blue);
}

.conversion-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 0.5rem 1rem;
  color: #d7e8ff;
  font-family: 'Courier New', Courier, monospace;
}

.ping-summary {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #a6e6ff;
}

.app-header h3 {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
  color: var(--primary-yellow);
}

.app-header p {
  margin: 0;
  color: #d7e8ff;
}

.calc-display {
  min-height: 60px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  color: var(--white);
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.calc-key {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  padding: 1rem 0;
  border-radius: 14px;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.calc-key:hover {
  background: rgba(0, 204, 255, 0.16);
  transform: translateY(-1px);
}

.calc-key.operator {
  background: rgba(0, 204, 255, 0.12);
}

.calc-key.clear,
.calc-key.equals {
  grid-column: span 2;
}

.timer-display {
  min-height: 76px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 1rem 1.2rem;
  color: var(--white);
  font-family: 'Courier New', Courier, monospace;
  font-size: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-progress-bar {
  width: 100%;
  height: 10px;
  margin: 0.85rem 0 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.countdown-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(57, 246, 255, 0.9), rgba(0, 145, 255, 0.9));
  transition: width 0.25s ease;
}

.timer-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.timer-controls .btn {
  min-width: 110px;
}

.form-row {
  display: grid;
  gap: 0.5rem;
}

.form-row.small {
  grid-template-columns: 1fr 100px;
  align-items: end;
}

.form-row label {
  color: #d7e8ff;
  font-size: 0.92rem;
}

.form-row input[type="text"],
.form-row input[type="number"] {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  width: 100%;
}

.ping-results {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1rem;
  min-height: 120px;
  overflow: auto;
  color: #d7e8ff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
}

.window-content .btn {
  width: auto;
  min-width: 220px;
  align-self: center;
}

.window-content .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 204, 255, 0.16);
}

textarea#notesArea {
  width: 100%;
  min-height: 220px;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-family: var(--font-body);
  resize: vertical;
}

.notes-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .form-row.small {
    grid-template-columns: 1fr;
  }
}

.window-content .app-description {
  font-size: 0.94rem;
  line-height: 1.6;
}

.window-content .btn.btn-outline {
  align-self: flex-start;
  margin-top: auto;
}

.window-content .contact-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.window-content .contact-link {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.window-content .contact-link:hover {
  background: rgba(0, 204, 255, 0.1);
}

.window-content .contact-link img {
  width: 72px;
  border-radius: 16px;
  object-fit: cover;
}

.about-photo {
  width: clamp(220px, 28vw, 320px);
  display: block;
  margin: 0.75rem auto 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  object-fit: contain;
}

.subamp-window-content {
  padding: 0.85rem;
  gap: 0;
  background: linear-gradient(145deg, #07132c, #0a0d20);
}

.subamp-player {
  --amp-cyan: var(--neon-blue);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid var(--neon-blue);
  outline: 1px solid rgba(255, 57, 182, 0.65);
  background: linear-gradient(135deg, rgba(57, 246, 255, 0.08), transparent 38%), linear-gradient(160deg, #101c3d, #090d20 68%, #11162d);
  color: var(--white);
  font-family: var(--font-body);
  box-shadow: 0 0 20px rgba(57, 246, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.subamp-brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.1rem 0.2rem 0.55rem;
  border-bottom: 1px solid rgba(57, 246, 255, 0.35);
}

.subamp-wordmark {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(57, 246, 255, 0.5);
}

.subamp-wordmark span {
  color: var(--primary-yellow);
}

.subamp-version,
.subamp-track-heading {
  color: var(--light-blue);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.subamp-display {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  min-height: 112px;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(57, 246, 255, 0.7);
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(57, 246, 255, 0.035) 4px), linear-gradient(135deg, #071426, #030713 70%);
  color: var(--neon-blue);
  font-family: 'Courier New', Courier, monospace;
  box-shadow: inset 0 0 22px rgba(57, 246, 255, 0.1), 0 0 12px rgba(57, 246, 255, 0.08);
}

.subamp-track-heading,
.subamp-track-name,
.subamp-status {
  grid-column: 1;
}

.subamp-track-heading {
  color: var(--primary-yellow);
}

.subamp-track-name {
  overflow: hidden;
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(57, 246, 255, 0.35);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subamp-status {
  color: var(--light-blue);
  font-size: 0.75rem;
}

.subamp-spectrum {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  align-items: end;
  gap: 3px;
  width: 94px;
  height: 70px;
  padding: 4px;
  border: 1px solid rgba(255, 57, 182, 0.5);
}

.subamp-spectrum span {
  flex: 1;
  height: 18%;
  background: var(--neon-blue);
  box-shadow: 0 0 6px rgba(57, 246, 255, 0.55);
}

.subamp-spectrum span:nth-child(3n) { height: 55%; background: var(--primary-yellow); }
.subamp-spectrum span:nth-child(4n) { height: 82%; }
.subamp-spectrum span:nth-child(5n) { height: 38%; background: var(--neon-pink); }

.subamp-player.is-playing .subamp-spectrum span {
  animation: subamp-meter 0.55s ease-in-out infinite alternate;
}

.subamp-player.is-playing .subamp-spectrum span:nth-child(2n) {
  animation-delay: 0.18s;
}

.subamp-transport {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.subamp-transport > button,
.subamp-open {
  min-width: 42px;
  min-height: 36px;
  border: 1px solid var(--neon-blue);
  border-radius: 4px;
  background: linear-gradient(180deg, #14254a, #0a1228);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 0 #040916, 0 0 8px rgba(57, 246, 255, 0.12);
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.subamp-transport > button:not(:disabled):hover,
.subamp-open:not(:disabled):hover {
  background: var(--neon-blue);
  color: var(--dark-blue);
  box-shadow: 0 0 14px rgba(57, 246, 255, 0.45);
}

.subamp-transport > button:disabled,
.subamp-open:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.subamp-transport > button:not(:disabled):active,
.subamp-open:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #040916;
}

.subamp-volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  color: var(--light-blue);
  font-size: 0.72rem;
  font-weight: 700;
}

.subamp-volume input {
  width: clamp(90px, 22vw, 150px);
  accent-color: var(--primary-yellow);
}

.subamp-station-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(57, 246, 255, 0.32);
}

.subamp-station-row label {
  color: var(--primary-yellow);
  font-size: 0.72rem;
  font-weight: 700;
}

.subamp-station-row select {
  min-width: 0;
  height: 36px;
  padding: 0 0.55rem;
  border: 1px solid rgba(123, 229, 255, 0.7);
  border-radius: 3px;
  background: #08152e;
  color: var(--white);
  font: inherit;
}

.subamp-station-row select:focus-visible,
.subamp-load:focus-visible,
.subamp-transport > button:focus-visible,
.subamp-open:focus-visible {
  outline: 2px solid var(--neon-pink);
  outline-offset: 2px;
}

.subamp-open {
  min-width: 70px;
}

.subamp-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--light-blue);
  font-size: 0.7rem;
}

.subamp-load {
  min-height: 32px;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--primary-yellow);
  border-radius: 4px;
  background: var(--primary-yellow);
  color: var(--dark-blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.subamp-load:hover {
  background: var(--light-yellow);
  box-shadow: 0 0 12px rgba(255, 213, 0, 0.4);
}

.subamp-player audio {
  display: none;
}

@keyframes subamp-meter {
  from { height: 15%; }
  to { height: 95%; }
}

@media (max-width: 520px) {
  .subamp-display {
    grid-template-columns: minmax(0, 1fr);
  }

  .subamp-spectrum {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    height: 38px;
  }

  .subamp-station-row {
    grid-template-columns: 1fr auto;
  }

  .subamp-station-row label {
    grid-column: 1 / -1;
  }
}

.about-profile-links {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(180px, 1fr);
  align-items: center;
  gap: 1.25rem;
  width: min(100%, 560px);
  margin: 0 auto;
}

.about-profile-links .about-photo {
  width: 100%;
  margin: 0;
}

.about-profile-links .social-links {
  align-items: stretch;
  margin: 0;
}

.about-profile-links .social-links a {
  min-width: 0;
  width: 100%;
}

.about-support {
  margin: 1.25rem 0 0;
  scroll-margin-block: 1rem;
}

@media (max-width: 767px) {
  .about-profile-links {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 320px);
  }

  .about-profile-links .about-photo {
    max-width: 220px;
    justify-self: center;
  }
}

.window-content .contact-link-text h3 {
  margin: 0 0 0.5rem;
  color: var(--primary-yellow);
}

.window-content .contact-link-text p {
  margin: 0;
}

.boot-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #061525 0%, #000 78%);
  z-index: 2000;
}

.boot-panel {
  width: min(860px, calc(100% - 2rem));
  position: relative;
}

.boot-image {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 16px rgba(0, 204, 255, 0.5)) drop-shadow(0 0 34px rgba(190, 70, 255, 0.38));
}

.boot-status {
  position: absolute;
  top: 51.5%;
  left: 10%;
  right: 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #c4f5ff;
  font-size: clamp(0.55rem, 1.25vw, 0.8rem);
  line-height: 1.1;
  text-shadow: 0 0 5px #06111b, 0 0 8px #06111b;
}

.boot-status-line {
  min-width: 0;
  color: #a2f0ff;
}

.boot-progress-bar {
  position: absolute;
  top: calc(57.7% - 11.5px);
  left: 10%;
  right: 10%;
  height: calc(1.6% + 5px);
  overflow: hidden;
  border-radius: 999px;
}

.boot-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #21eaff, #42baff 58%, #f24fe5);
  transition: width 0.2s ease;
}

.boot-progress-label {
  flex: 0 0 auto;
  letter-spacing: 0.04em;
}

.boot-version {
  position: absolute;
  right: 4%;
  bottom: 3%;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(0, 204, 255, 0.28);
  border-radius: 999px;
  background: rgba(2, 9, 26, 0.78);
  color: #a2f0ff;
  font-size: clamp(0.5rem, 0.9vw, 0.68rem);
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 0 6px rgba(0, 204, 255, 0.75);
}

@media (max-width: 767px), (max-height: 500px) and (max-width: 991px) {
  .boot-screen {
    padding: 0.5rem;
  }

  .boot-panel {
    width: min(860px, calc(100vw - 1rem), calc((100vh - 1rem) * 1.966));
  }

  .boot-status {
    top: 50%;
    gap: 0.25rem;
    font-size: clamp(0.48rem, 2.3vw, 0.72rem);
  }

  .boot-progress-bar {
    top: calc(56.2% - 3px);
    height: 4.5%;
  }

  .boot-version {
    padding: 0.16rem 0.35rem;
    font-size: clamp(0.45rem, 1.8vw, 0.68rem);
  }
}

@supports (height: 100dvh) {
  @media (max-width: 767px), (max-height: 500px) and (max-width: 991px) {
    .boot-panel {
      width: min(860px, calc(100vw - 1rem), calc((100dvh - 1rem) * 1.966));
    }
  }
}

.boot-screen.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, rgba(2, 24, 56, 0.96), rgba(0, 63, 118, 0.96));
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(0, 102, 170, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.taskbar-left {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 204, 255, 0.18);
  background: rgba(0, 38, 84, 0.95);
  color: var(--primary-yellow);
  font-family: var(--font-heading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 204, 255, 0.12);
}

.start-button:hover,
.start-button[aria-expanded="true"] {
  background: rgba(0, 204, 255, 0.14);
}

.start-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.85rem);
  width: 320px;
  padding: 1rem;
  background: rgba(1, 13, 35, 0.98);
  border: 1px solid rgba(0, 204, 255, 0.16);
  border-radius: 22px;
  box-shadow: 0 22px 72px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  z-index: 1002;
}

.start-menu.hidden {
  display: none;
}

.start-menu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.power-button {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 82, 82, 0.45);
  background: rgba(255, 82, 82, 0.1);
  color: #ff8a8a;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.power-button:hover {
  background: rgba(255, 82, 82, 0.28);
  box-shadow: 0 0 14px rgba(255, 82, 82, 0.4);
}

.desktop-icon.selected {
  border-color: rgba(57, 246, 255, 0.8);
  background: rgba(57, 246, 255, 0.2);
  box-shadow: 0 0 16px rgba(57, 246, 255, 0.4);
}

.selection-box {
  position: fixed;
  z-index: 900;
  pointer-events: none;
  border: 1px solid rgba(57, 246, 255, 0.9);
  background: rgba(57, 246, 255, 0.14);
}

.resize-handle {
  position: absolute;
  z-index: 5;
  touch-action: none;
}

.resize-handle[data-edge="n"] { top: 0; left: 14px; right: 14px; height: 6px; cursor: ns-resize; }
.resize-handle[data-edge="s"] { bottom: 0; left: 14px; right: 14px; height: 6px; cursor: ns-resize; }
.resize-handle[data-edge="e"] { right: 0; top: 14px; bottom: 14px; width: 6px; cursor: ew-resize; }
.resize-handle[data-edge="w"] { left: 0; top: 14px; bottom: 14px; width: 6px; cursor: ew-resize; }
.resize-handle[data-edge="ne"] { top: 0; right: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.resize-handle[data-edge="sw"] { bottom: 0; left: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.resize-handle[data-edge="nw"] { top: 0; left: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.resize-handle[data-edge="se"] { bottom: 0; right: 0; width: 18px; height: 18px; cursor: nwse-resize; }

.os-window.maximized .resize-handle {
  display: none;
}

.start-menu-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon-yellow, var(--primary-yellow));
  text-shadow: 0 0 14px rgba(255, 213, 0, 0.45);
}

.start-menu-subtitle {
  margin-top: 0.25rem;
  font-size: 0.77rem;
  color: #9bdcff;
}

.launcher-search-label {
  display: block;
  margin: 0.8rem 0 0.35rem;
  color: #9bdcff;
  font-size: 0.75rem;
}

.launcher-search {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(57, 246, 255, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--white);
  font: inherit;
}

.launcher-search:focus-visible {
  outline: 2px solid var(--neon-yellow);
  outline-offset: 2px;
}

.launcher-search-results {
  display: grid;
  gap: 0.35rem;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 0.6rem;
}

.launcher-search-results.hidden {
  display: none;
}

.launcher-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.launcher-search-result:hover,
.launcher-search-result:focus-visible {
  outline: none;
  border-color: rgba(57, 246, 255, 0.45);
  background: rgba(57, 246, 255, 0.12);
}

.launcher-result-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
}

.launcher-search-result > span:first-of-type {
  margin-right: auto;
}

.launcher-result-type,
.launcher-search-empty {
  color: #9bdcff;
  font-size: 0.75rem;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--neon-yellow);
  outline-offset: 3px;
}

.start-menu-section {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.start-menu-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.start-menu-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7fdcff;
  margin-bottom: 0.55rem;
}

.start-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  margin-bottom: 0.45rem;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eaf8ff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.start-menu-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
}

.start-menu-item:hover {
  transform: translateX(2px);
  background: rgba(255, 57, 182, 0.14);
  border-color: rgba(255, 57, 182, 0.3);
}

.start-menu-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.start-menu.searching .start-menu-body {
  display: none;
}

.start-menu.open-submenu {
  width: 560px;
}

.start-menu.open-submenu .start-menu-body {
  grid-template-columns: 1fr 1fr;
}

.start-menu-panel {
  min-width: 0;
}

.start-menu-submenu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(0, 12, 30, 0.95);
  border: 1px solid rgba(0, 204, 255, 0.18);
  color: #eaf8ff;
}

.start-menu-submenu.hidden {
  display: none;
}

.submenu-back {
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s ease, transform 0.15s ease;
}

.submenu-back:hover {
  background: rgba(0, 204, 255, 0.12);
  transform: translateX(2px);
}

.submenu-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary-yellow);
}

.submenu-items {
  display: grid;
  gap: 0.6rem;
}

.start-menu-item.start-menu-parent::after {
  content: '›';
  margin-left: auto;
  color: #9bdcff;
}

.timer-display.timer-alert {
  border-color: #ffb347;
  animation: timer-alert 0.2s ease-in-out alternate 6;
}

@keyframes timer-alert {
  from { box-shadow: 0 0 0 rgba(255, 179, 71, 0); }
  to { box-shadow: 0 0 24px rgba(255, 179, 71, 0.6); }
}

.os-window.countdown-alert {
  animation: countdown-blink 0.18s ease-in-out alternate 8;
}

@keyframes countdown-blink {
  from {
    box-shadow: 0 22px 60px rgba(255, 179, 71, 0.75);
    border-color: rgba(255, 179, 71, 0.9);
  }
  to {
    box-shadow: 0 22px 60px rgba(255, 179, 71, 0.05);
    border-color: rgba(255, 179, 71, 0.2);
  }
}

.taskbar-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.taskbar-volume {
  position: relative;
  display: none;
}

@media (min-width: 680px) {
  .taskbar-volume {
    display: inline-flex;
  }
}

.taskbar-settings {
  position: relative;
  display: inline-flex;
}

.settings-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.settings-button:hover,
.settings-button[aria-expanded="true"] {
  background: rgba(0, 204, 255, 0.12);
}

.settings-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: 260px;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(3, 18, 36, 0.98);
  border: 1px solid rgba(0, 204, 255, 0.16);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  z-index: 1002;
}

.settings-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary-yellow);
  margin-bottom: 0.85rem;
}

.settings-option {
  margin-bottom: 0.8rem;
}

.settings-option label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #d9f6ff;
  font-size: 0.96rem;
}

.settings-option input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #00d0ff;
}

.settings-option input[type="range"] {
  width: 100%;
  accent-color: #00d0ff;
}

.settings-option output {
  margin-left: auto;
  color: var(--light-blue);
  font-variant-numeric: tabular-nums;
}

.settings-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  line-height: 1.4;
}

.settings-panel.hidden {
  display: none;
}

.volume-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.84rem;
}

.volume-button:hover,
.volume-button.open {
  background: rgba(0, 204, 255, 0.12);
}

.volume-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.5rem);
  width: 180px;
  padding: 0.85rem 0.9rem;
  background: rgba(2, 19, 44, 0.96);
  border: 1px solid rgba(0, 204, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1001;
}

.volume-panel.open {
  display: flex;
}

.volume-panel label {
  font-size: 0.82rem;
  color: #cbe9ff;
}

.volume-panel input[type="range"] {
  width: 100%;
}

.taskbar-items {
  display: flex;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  overflow: visible;
  flex: 1 1 150px;
  min-width: 0;
}

.taskbar-windows-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
}

.taskbar-window-list {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.8rem);
  width: 280px;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.9rem;
  background: rgba(2, 19, 44, 0.98);
  border-radius: 18px;
  border: 1px solid rgba(0, 204, 255, 0.16);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  z-index: 1003;
}

.taskbar-window-list.hidden {
  display: none;
}

.taskbar-notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notifications-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.notifications-button:hover,
.notifications-button[aria-expanded="true"] {
  background: rgba(0, 204, 255, 0.14);
}

.notifications-button.has-notifications {
  position: relative;
}

.notifications-button.has-notifications::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5f7a;
  box-shadow: 0 0 0 2px rgba(255, 95, 122, 0.2);
}

.notifications-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.8rem);
  width: 300px;
  max-height: 360px;
  overflow-y: auto;
  padding: 0.9rem;
  background: rgba(2, 19, 44, 0.98);
  border-radius: 18px;
  border: 1px solid rgba(0, 204, 255, 0.16);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  z-index: 1004;
}

.notifications-panel.hidden {
  display: none;
}

.notification-panel-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary-yellow);
  margin-bottom: 0.75rem;
}

.notification-items {
  display: grid;
  gap: 0.55rem;
}

.notification-item {
  position: relative;
  padding: 0.75rem 1.2rem 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #eaf8ff;
  font-size: 0.92rem;
  line-height: 1.35;
}

.notification-item .notification-close {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  width: 1.2rem;
  height: 1.2rem;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.notification-item .notification-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

.notification-empty {
  color: #9bdcff;
  font-size: 0.92rem;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
}

.window-list-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary-yellow);
  margin-bottom: 0.75rem;
}

.window-list-items {
  display: grid;
  gap: 0.55rem;
}

.window-list-item {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #eaf8ff;
  text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.window-list-item:hover {
  background: rgba(0, 204, 255, 0.12);
  transform: translateX(2px);
}

.window-list-item.active {
  background: rgba(0, 204, 255, 0.18);
  border-color: rgba(0, 204, 255, 0.24);
}

.window-list-empty {
  color: #9bdcff;
  font-size: 0.92rem;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
}

.taskbar-item {
  position: relative;
  z-index: 1;
  flex: 1 1 88px;
  min-width: 0;
  max-width: 140px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  padding: 0.65rem 0.9rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-item:hover {
  z-index: 2;
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 0 18px rgba(0, 204, 255, 0.24);
  background: rgba(0, 204, 255, 0.12);
}

.taskbar-item.active {
  background: rgba(0, 204, 255, 0.18);
  box-shadow: 0 0 18px rgba(0, 204, 255, 0.28);
}

.taskbar-pinned {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-left: 0.75rem;
}

.taskbar-pin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  color: var(--white);
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.taskbar-pin:hover {
  background: rgba(0, 204, 255, 0.12);
  transform: translateY(-1px);
}

.pin-icon {
  font-size: 1rem;
}

.taskbar-clock {
  position: relative;
}

.calendar-popup {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  width: 240px;
  padding: 1rem;
  background: rgba(5, 11, 36, 0.96);
  border: 1px solid rgba(57, 246, 255, 0.18);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  border-radius: 18px;
  z-index: 2000;
}

.calendar-header {
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.calendar-day-label,
.calendar-day,
.calendar-day.blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

.calendar-day-label {
  color: var(--light-gray);
}

.calendar-day {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.calendar-day.today {
  background: rgba(57, 246, 255, 0.18);
  border-color: rgba(57, 246, 255, 0.28);
}

.calendar-day.selected {
  background: rgba(0, 204, 255, 0.18);
  border-color: rgba(0, 204, 255, 0.32);
}

.calendar-day.blank {
  background: transparent;
  border-color: transparent;
}

.taskbar-volume {
  display: none;
}

@media (min-width: 680px) {
  .taskbar-volume {
    display: inline-flex;
  }
}

.taskbar-clock {
  color: var(--white);
  font-family: var(--font-body);
  letter-spacing: 0.08em;
}

.taskbar-clock .clock-button {
  background: transparent;
  color: var(--white);
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.taskbar-clock .clock-button:hover {
  text-decoration: underline;
}

.taskbar-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--white);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.84rem;
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(0, 204, 255, 0.16);
}

@media (max-width: 767px) {
  .start-menu,
  .start-menu.open-submenu {
    width: min(320px, calc(100vw - 1.5rem));
    max-height: var(--start-menu-max-height, 70vh);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .launcher-search {
    font-size: 16px;
  }

  .resize-handle {
    display: none;
  }

  .start-menu.open-submenu .start-menu-body {
    grid-template-columns: 1fr;
  }

  .desktop-icons {
    left: 0.75rem;
    right: 0.75rem;
    bottom: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(100px, 1fr));
    gap: 1rem;
  }

  .desktop-icon {
    position: static;
    width: auto;
    height: auto;
    touch-action: auto;
    user-select: auto;
  }

  .desktop-icon-menu {
    display: none;
  }

  .os-window {
    width: calc(100% - 2rem) !important;
    min-width: auto;
    height: calc(100vh - 160px) !important;
    left: 1rem !important;
    top: 1rem !important;
  }

  .window-content {
    padding: 0.9rem;
  }

  .taskbar {
    flex-wrap: wrap;
    align-items: stretch;
    padding: 0.65rem 0.9rem;
  }

  .taskbar-windows-toggle {
    display: inline-flex;
  }

  .taskbar-window-list {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    margin: 0.65rem 0 0;
  }

  .taskbar-items {
    display: none;
  }

  .taskbar-tools {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .notifications-panel {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 0.65rem;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .taskbar {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem 0.75rem;
  }

  .taskbar-tools {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .taskbar-items {
    order: 2;
    flex: 1 1 100%;
    width: 100%;
  }
}

.hero-logo img {
  width: 70%;
  max-width: 360px;
  height: auto;
  display: block;
  margin: 0 auto;
  margin-top: 30%;
}

@media (min-width: 768px) {
  .hero-logo img {
    max-width: 760px;
  }
}

@media (min-width: 1200px) {
  .hero-logo img {
    max-width: 920px;
  }
}

/* Navigation */
.main-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
}

.menu-toggle {
  display: none;
  background: rgba(0, 51, 102, 0.95);
  border: 2px solid var(--primary-yellow);
  border-radius: 14px;
  cursor: pointer;
  padding: var(--spacing-sm);
  width: 46px;
  height: 46px;

  height: 3px;
  background-color: var(--primary-yellow);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0 var(--spacing-md);
}

.nav-links a {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1rem;
  text-transform: uppercase;
  padding: var(--spacing-sm) 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-yellow);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary-yellow);
}

/* Social Links */
.social-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  min-width: 180px;
  border-radius: 4px;
  background-color: var(--dark-blue);
  color: var(--primary-yellow);
  transition: all 0.3s ease;
  margin-left: 0;
}

.social-links a:hover {
  background-color: var(--primary-yellow);
  color: var(--dark-blue);
  transform: translateY(-3px);
}

.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Hero Section */
.hero-section {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 120px; /* Account for fixed header */
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(0deg, rgba(0, 51, 102, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%),
    url('../images/grid-bg.png');
  background-size: cover;
  z-index: 1;
}

.glitch-text {
  font-size: 5rem;
  text-shadow: 
    0 0 5px var(--primary-blue),
    0 0 10px var(--neon-blue),
    0 0 15px var(--neon-blue),
    0 0 20px var(--neon-blue);
  animation: glitch 2s infinite alternate-reverse;
}

@keyframes glitch {
  0%, 100% {
    text-shadow: 
      0 0 5px var(--primary-blue),
      0 0 10px var(--neon-blue),
      0 0 15px var(--neon-blue),
      0 0 20px var(--neon-blue);
    transform: translateX(0);
  }
  5%, 15% {
    text-shadow: none;
    transform: translateX(-2px);
  }
  10%, 20% {
    text-shadow: 
      0 0 5px var(--primary-yellow),
      0 0 10px var(--primary-yellow),
      0 0 15px var(--primary-yellow),
      0 0 20px var(--primary-yellow);
    transform: translateX(2px);
  }
}

.tagline {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: var(--spacing-lg);
  text-transform: lowercase;
  letter-spacing: 2px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
}

/* About Section */
.about-section {
  background-color: rgba(0, 51, 102, 0.7);
  position: relative;
}

.about-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.about-text {
  flex: 1;
}

.about-image {
  flex: 1;
  border: 2px solid var(--primary-yellow);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.3);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Downloads Section */
.downloads-section {
  background-color: rgba(0, 51, 102, 0.7);
  position: relative;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.download-card {
  background-color: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--primary-blue);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-lg);
  text-align: center;
  transition: all 0.3s ease;
}

.download-card:hover {
  border-color: var(--primary-yellow);
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
  transform: translateY(-5px);
}

.download-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--spacing-md);
  background-color: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-icon .icon {
  width: 30px;
  height: 30px;
  fill: var(--white);
}

.download-card h3 {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-sm);
}

.download-card p {
  color: var(--light-gray);
  margin-bottom: var(--spacing-lg);
  font-size: 0.9rem;
}

/* Contact Section */
.contact-section {
  position: relative;
}

.contact-content {
  display: flex;
  gap: var(--spacing-xl);
}

.contact-info {
  flex: 1;
  padding: var(--spacing-lg);
  background-color: rgba(0, 51, 102, 0.7);
  border-radius: var(--border-radius-md);
  border: 2px solid var(--primary-blue);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.contact-item .icon {
  width: 24px;
  height: 24px;
  margin-right: var(--spacing-md);
  fill: var(--primary-yellow);
}

.contact-card {
  flex: 2;
  padding: var(--spacing-lg);
  background-color: rgba(0, 51, 102, 0.7);
  border-radius: var(--border-radius-md);
  border: 2px solid var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  width: 100%;
  text-decoration: none;
  color: inherit;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-sm);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  border: 2px solid transparent;
}

.contact-link:hover {
  transform: translateY(-4px);
  border-color: var(--primary-yellow);
  box-shadow: 0 12px 24px rgba(255, 204, 0, 0.2);
  background-color: rgba(255, 255, 255, 0.05);
}

.contact-link img {
  width: 120px;
  height: auto;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
}

.contact-link-text h3 {
  margin: 0 0 var(--spacing-sm);
}

.contact-link-text p {
  margin: 0;
  color: var(--light-gray);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  color: var(--primary-yellow);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--spacing-sm);
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--primary-blue);
  border-radius: var(--border-radius-sm);
  color: var(--white);
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-yellow);
  box-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}

/* Footer */
.site-footer {
  background-color: rgba(0, 0, 0, 0.8);
  border-top: 2px solid var(--primary-yellow);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-links ul {
  display: flex;
  list-style: none;
}

.footer-links li {
  margin-right: var(--spacing-md);
}

.footer-links a {
  color: var(--light-gray);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-yellow);
}

.footer-social {
  display: flex;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: var(--spacing-sm);
  border-radius: 50%;
  background-color: var(--dark-blue);
  color: var(--primary-yellow);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background-color: var(--primary-yellow);
  color: var(--dark-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--medium-gray);
  color: var(--light-gray);
  font-size: 0.8rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: var(--spacing-sm);
}

.mb-2 {
  margin-bottom: var(--spacing-md);
}

.mb-3 {
  margin-bottom: var(--spacing-lg);
}

.mb-4 {
  margin-bottom: var(--spacing-xl);
}

.pdf-editor {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  gap: 0.55rem;
}

.pdf-editor-filebar,
.pdf-editor-toolbar,
.pdf-editor-actions,
.pdf-editor-modes,
.pdf-editor-navigation,
.pdf-signature-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pdf-editor-filebar,
.pdf-editor-toolbar,
.pdf-editor-actions {
  flex: 0 0 auto;
}

.pdf-file-input {
  display: none;
}

.pdf-file-name {
  flex: 1 1 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d7e8ff;
}

.pdf-local-note {
  color: #83dfff;
  font-size: 0.78rem;
}

.pdf-editor-toolbar {
  padding: 0.5rem;
  border: 1px solid rgba(0, 204, 255, 0.18);
  border-radius: 10px;
  background: rgba(0, 16, 36, 0.65);
}

.pdf-editor-modes {
  margin-right: auto;
}

.pdf-setting {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #bfeeff;
  font-size: 0.85rem;
}

.pdf-setting select,
.pdf-setting input {
  min-height: 34px;
  padding: 0.3rem 0.45rem;
  border: 1px solid rgba(0, 204, 255, 0.35);
  border-radius: 6px;
  background: #07172a;
  color: #eefaff;
  font: inherit;
}

.pdf-setting input {
  width: 64px;
}

.pdf-editor-navigation {
  margin-left: auto;
  color: #d7e8ff;
  font-size: 0.85rem;
}

.pdf-editor .btn {
  padding: 0.45rem 0.7rem;
  font-size: 0.78rem;
  min-width: 0;
}

.pdf-editor .pdf-icon-button {
  display: inline-flex;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.pdf-icon-button svg {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.pdf-editor .pdf-editor-filebar .btn,
.pdf-editor .pdf-editor-toolbar .btn,
.pdf-editor .pdf-editor-actions .btn {
  align-self: center;
  margin-top: 0;
}

.pdf-editor .btn[aria-pressed="true"],
.pdf-editor .btn.is-active {
  border-color: #46eaff;
  background: rgba(0, 204, 255, 0.18);
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.2);
}

.pdf-editor .btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.pdf-editor-status {
  flex: 0 0 auto;
  min-height: 1.35em;
  color: #a6eaff;
  font-size: 0.82rem;
}

.pdf-editor-status.error {
  color: #ffaaa9;
}

.pdf-save-dialog-content {
  gap: 0.75rem;
}

.pdf-save-label {
  color: #bfeeff;
  font-size: 0.9rem;
}

.pdf-save-filename {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(0, 204, 255, 0.4);
  border-radius: 7px;
  background: #07172a;
  color: #eefaff;
  font: inherit;
}

.pdf-save-filename:focus-visible {
  outline: 2px solid #46eaff;
  outline-offset: 2px;
}

.pdf-save-dialog-content .pdf-save-error {
  color: #ffaaa9;
}

.pdf-viewer {
  position: relative;
  flex: 1 1 auto;
  min-height: 180px;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.75rem;
  border: 1px solid rgba(0, 204, 255, 0.24);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.42);
}

.pdf-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin: auto;
  padding: 2rem;
  color: #d7e8ff;
  text-align: center;
}

.pdf-empty-icon {
  color: #50e7ff;
  font-size: 3rem;
  line-height: 1;
  text-shadow: 0 0 18px rgba(0, 204, 255, 0.65);
}

.pdf-page-stage {
  position: relative;
  flex: 0 0 auto;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.pdf-page-canvas {
  display: block;
}

.pdf-annotation-layer {
  position: absolute;
  inset: 0;
}

.pdf-placement-item {
  position: absolute;
  box-sizing: border-box;
}

.pdf-form-field,
.pdf-placed-text {
  position: absolute;
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(27, 112, 207, 0.85);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-family: Arial, sans-serif;
  line-height: 1.2;
}

.pdf-form-field {
  width: 100%;
  height: 100%;
  padding: 1px 3px;
  font-size: 12px;
}

.pdf-form-field:focus,
.pdf-placed-text:focus {
  outline: 2px solid #168af2;
  outline-offset: 0;
}

.pdf-form-field[type="checkbox"],
.pdf-form-field[type="radio"] {
  width: min(100%, 20px);
  accent-color: #168af2;
  background: rgba(255, 255, 255, 0.65);
}

.pdf-form-select {
  position: absolute;
}

.pdf-placed-text {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  min-width: 40px;
  min-height: 1.5em;
  padding: 2px;
  resize: none;
  background: rgba(255, 255, 255, 0.76);
}

.pdf-placement-widget .pdf-form-field {
  inset: 0;
  box-sizing: border-box;
}

.pdf-placed-signature {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 1px dashed rgba(22, 138, 242, 0.8);
  object-fit: fill;
}

.pdf-placed-checkmark {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
}

.pdf-item-move,
.pdf-item-delete,
.pdf-item-resize {
  position: absolute;
  top: -10px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: #fff;
  font: 700 0.8rem/1 Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 100ms ease, transform 100ms ease;
}

.pdf-item-move {
  left: -10px;
  background: #126fae;
  touch-action: none;
  cursor: grab;
}

.pdf-item-move:active {
  cursor: grabbing;
}

.pdf-item-delete {
  right: -10px;
  background: #b3263a;
  font-size: 1.1rem;
}

.pdf-item-resize {
  top: auto;
  right: -10px;
  bottom: -10px;
  background: #6449ad;
  touch-action: none;
  cursor: nwse-resize;
}

.pdf-placement-item.is-selected .pdf-item-move,
.pdf-placement-item.is-selected .pdf-item-delete,
.pdf-placement-item.is-selected .pdf-item-resize {
  opacity: 1;
  pointer-events: auto;
}

.pdf-placement-text:not(.is-selected) .pdf-placed-text {
  border-color: rgba(27, 112, 207, 0.38);
}

.pdf-placement-text.is-selected .pdf-placed-text {
  border-color: rgba(27, 112, 207, 0.95);
}

.pdf-placement-text .pdf-placed-text {
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pdf-item-move:hover,
.pdf-item-delete:hover,
.pdf-item-resize:hover {
  transform: scale(1.12);
}

.pdf-signature-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(1, 6, 16, 0.86);
}

.pdf-signature-modal.hidden {
  display: none;
}

.pdf-signature-dialog {
  width: min(720px, 100%);
  padding: 1rem;
  border: 1px solid rgba(0, 204, 255, 0.48);
  border-radius: 14px;
  background: #071426;
  box-shadow: 0 0 32px rgba(0, 204, 255, 0.2);
}

.pdf-signature-dialog h3 {
  margin-bottom: 0.35rem;
  color: #ffe25c;
  font-size: 1.2rem;
}

.pdf-signature-dialog p {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

#pdfSignatureCanvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(0, 204, 255, 0.48);
  border-radius: 8px;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}

.pdf-signature-actions {
  justify-content: flex-end;
  margin-top: 0.75rem;
}

@media (max-width: 767px), (max-height: 500px) and (max-width: 991px) {
  .os-window[data-app="pdf-editor"] {
    top: 8px !important;
    right: 8px !important;
    bottom: 76px !important;
    left: 8px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    min-height: 0;
  }

  .os-window[data-app="pdf-editor"] .window-maximize {
    display: none;
  }

  .pdf-editor {
    min-width: 0;
    padding: 0.45rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pdf-editor-filebar,
  .pdf-editor-toolbar,
  .pdf-editor-actions,
  .pdf-editor-modes,
  .pdf-editor-navigation {
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .pdf-editor-toolbar {
    width: 100%;
    gap: 0.35rem;
    padding: 0.4rem;
  }

  .pdf-editor-modes,
  .pdf-editor-navigation {
    flex-basis: 100%;
  }

  .pdf-editor-navigation {
    width: 100%;
    justify-content: space-between;
    gap: 0.3rem;
  }

  .pdf-editor .btn {
    min-height: 40px;
    padding: 0.5rem 0.6rem;
  }

  .pdf-setting select,
  .pdf-setting input {
    min-height: 40px;
  }

  .pdf-editor-actions {
    width: 100%;
  }

  .pdf-editor-actions .btn {
    flex: 1 1 8rem;
  }

  #pdfPrintButton {
    flex-basis: 100%;
  }

  .pdf-file-name {
    flex-basis: 8rem;
  }

  .pdf-local-note {
    flex-basis: 100%;
  }

  .pdf-viewer {
    flex: 0 1 auto;
    height: 45vh;
    max-height: 360px;
    min-width: 0;
    min-height: min(180px, 28vh);
    padding: 0.35rem;
    overflow-x: auto;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .pdf-editor-status {
    overflow-wrap: anywhere;
  }
}

@media (hover: none) {
  .pdf-placement-item.is-selected .pdf-item-move,
  .pdf-placement-item.is-selected .pdf-item-delete,
  .pdf-placement-item.is-selected .pdf-item-resize {
    opacity: 1;
    pointer-events: auto;
  }
}