:root {
  --bg-gradient-start: #008080;
  --bg-gradient-end: #006666;
  --header-bg-start: #dfdfdf;
  --header-bg-end: #c0c0c0;
  --header-border: #ffffff #404040 #404040 #ffffff;
  --header-text: #000080;
  --stat-bg-start: #000080;
  --stat-bg-end: #000066;
  --stat-text: #00ff00;
  --stat-border: #9999ff #000033 #000033 #9999ff;
  --button-bg-start: #dfdfdf;
  --button-bg-end: #c0c0c0;
  --button-border: #ffffff #808080 #808080 #ffffff;
  --button-text: #000;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'VT323', monospace;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Header */
.app-header {
  background: linear-gradient(180deg, var(--header-bg-start) 0%, var(--header-bg-end) 100%);
  border-bottom: 4px solid;
  border-color: var(--header-border);
  padding: 1rem 1.5rem;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-logo {
  width: 60px;
  height: 60px;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.3));
  animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.header-text {
  display: flex;
  flex-direction: column;
}

.header-left h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.2rem;
  color: var(--header-text);
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
}

.tagline {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: var(--button-text);
  letter-spacing: 2px;
  margin-top: 0.2rem;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.search-container {
  position: relative;
}

#search-input {
  padding: 0.5rem 1rem;
  border: 3px solid;
  border-color: #404040 #ffffff #ffffff #404040;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  background: #fff;
  color: #000;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.25);
  width: 250px;
}

#search-input:focus {
  outline: 2px dotted var(--header-text);
  outline-offset: -4px;
  background: #ffffcc;
}

.stats {
  display: flex;
  gap: 0.75rem;
}

.stat {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  padding: 0.5rem 0.85rem;
  background: linear-gradient(180deg, var(--stat-bg-start) 0%, var(--stat-bg-end) 100%);
  color: var(--stat-text);
  border: 3px solid;
  border-color: var(--stat-border);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3), inset -1px -1px 0 rgba(0, 0, 0, 0.5);
  text-shadow: 1px 1px 0 #000;
}

.header-right {
  display: flex;
  gap: 0.5rem;
}

.btn-print,
.btn-settings,
.btn-shortcuts,
.btn-delete-all {
  padding: 0.5rem 0.75rem;
  border: 3px solid;
  font-size: 0.7rem;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 400;
  transition: all 0.1s;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  background: linear-gradient(180deg, var(--button-bg-start) 0%, var(--button-bg-end) 100%);
  border-color: var(--button-border);
  color: var(--button-text);
  white-space: nowrap;
}

.btn-print:focus,
.btn-settings:focus,
.btn-shortcuts:focus,
.btn-delete-all:focus {
  outline: 3px dotted #000;
  outline-offset: 2px;
}

.btn-print:hover {
  background: linear-gradient(180deg, #99ff99 0%, #66ff66 100%);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-settings:hover,
.btn-shortcuts:hover {
  background: linear-gradient(180deg, #ffff99 0%, #ffff66 100%);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-delete-all:hover {
  background: linear-gradient(180deg, #ff9999 0%, #ff6666 100%);
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-print:active,
.btn-settings:active,
.btn-shortcuts:active,
.btn-delete-all:active {
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  transform: translate(2px, 2px);
}

/* Main Content */
.app-main {
  flex: 1;
  padding: 2rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.columns-container {
  display: flex;
  gap: 1.5rem;
  min-height: 500px;
  align-items: flex-start;
  width: fit-content;
  min-width: 100%;
  padding-bottom: 1rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
  border: 4px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
  max-width: 600px;
  margin: 0 auto;
}

.empty-state h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.2rem;
  color: #000080;
  margin-bottom: 1.5rem;
}

.empty-state p {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: #000;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.empty-state .hint {
  font-size: 1.1rem;
  color: #666;
}

/* Task Column */
.task-column {
  background: #c0c0c0;
  border: 4px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  padding: 1rem;
  min-width: 320px;
  width: 380px;
  max-width: 100%;
  flex-shrink: 0;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
  border: 5px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4),
              inset -2px -2px 0 rgba(0, 0, 0, 0.1);
}

.column-header h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.9rem;
  color: #000;
  flex: 1;
  word-break: break-word;
}

.task-count {
  background: linear-gradient(180deg, #ff00ff 0%, #cc00cc 100%);
  border: 3px solid;
  border-color: #ff99ff #660066 #660066 #ff99ff;
  color: #fff;
  padding: 0.4rem 0.8rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  text-shadow: 1px 1px 0 #000;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.column-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow: visible;
  padding-bottom: 1rem;
  padding-left: 0;
}

/* Task Card */
.task-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  border: 5px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.1s;
  position: relative;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4),
              inset -2px -2px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
}

.task-card:hover {
  border-color: #ffff00 #000080 #000080 #ffff00;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5),
              inset -2px -2px 0 rgba(0, 0, 0, 0.1);
  transform: translate(-2px, -2px);
  background: linear-gradient(180deg, #ffffdd 0%, #ffffaa 100%);
}

.task-card.selected {
  border-color: #ff00ff #000080 #000080 #ff00ff;
  box-shadow: 0 0 0 5px #ff00ff,
              6px 6px 0 rgba(0, 0, 0, 0.5),
              inset -2px -2px 0 rgba(0, 0, 0, 0.15);
  background: linear-gradient(180deg, #ffddff 0%, #ffaaff 100%);
  animation: pulse 1s infinite;
  border-width: 6px;
}

.task-card.dragging {
  opacity: 0.5;
}

.task-card.drag-over {
  border-style: dashed;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.task-card.completed {
  opacity: 0.7;
  background: linear-gradient(180deg, #cccccc 0%, #999999 100%);
  border-style: dashed;
}

.task-card.completed .task-title {
  text-decoration: line-through;
  color: #666;
}

.task-card.editing {
  border-color: #00ffff #000080 #000080 #00ffff;
  box-shadow: 0 0 0 4px #00ffff, 4px 4px 0 rgba(0, 0, 0, 0.5);
  cursor: default;
  background: #e0ffff;
}

.task-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
  border: 3px solid #000;
  background: #fff;
  appearance: none;
  position: relative;
}

.task-checkbox:checked {
  background: #00ff00;
}

.task-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: -4px;
  left: 1px;
  font-size: 18px;
  font-weight: bold;
  color: #000;
}

.task-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'VT323', monospace;
  color: #000;
  flex: 1;
  word-break: break-word;
  line-height: 1.4;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.7);
  letter-spacing: 1.5px;
}

.task-description {
  margin: 0.5rem 0 0 0;
  font-size: 1.1rem;
  font-family: 'VT323', monospace;
  color: #333;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed #808080;
}

.task-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.task-priority-badge,
.task-due-badge,
.task-time-badge,
.task-assigned-badge {
  padding: 0.6rem 1.2rem;
  border: 3px solid;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3), inset -1px -1px 0 rgba(0, 0, 0, 0.25);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.5;
  min-width: fit-content;
}

.task-priority-badge.priority-high {
  background: linear-gradient(180deg, #ff0000 0%, #cc0000 100%);
  border-color: #ff9999 #660000 #660000 #ff9999;
  color: #fff;
}

.task-priority-badge.priority-medium {
  background: linear-gradient(180deg, #ffff00 0%, #cccc00 100%);
  border-color: #ffff99 #666600 #666600 #ffff99;
  color: #000;
}

.task-priority-badge.priority-low {
  background: linear-gradient(180deg, #00ff00 0%, #00cc00 100%);
  border-color: #99ff99 #006600 #006600 #99ff99;
  color: #000;
}

.task-due-badge {
  background: linear-gradient(180deg, #ff00ff 0%, #cc00cc 100%);
  border-color: #ff99ff #660066 #660066 #ff99ff;
  color: #fff;
}

.task-time-badge {
  background: linear-gradient(180deg, #00ffff 0%, #00cccc 100%);
  border-color: #99ffff #006666 #006666 #99ffff;
  color: #000;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.task-assigned-badge {
  background: linear-gradient(180deg, #ffa500 0%, #ff8c00 100%);
  border-color: #ffcc99 #cc6600 #cc6600 #ffcc99;
  color: #000;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.subtask-count {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(180deg, #00ffff 0%, #00cccc 100%);
  border: 3px solid;
  border-color: #99ffff #006666 #006666 #99ffff;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: #000;
  font-weight: 400;
  display: inline-block;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3), inset -1px -1px 0 rgba(0, 0, 0, 0.25);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.task-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 4px double #606060;
  background: rgba(0, 0, 0, 0.02);
  padding: 0.75rem;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  margin-bottom: -1.25rem;
}

.btn-breakdown,
.btn-edit,
.btn-emoji,
.btn-delete {
  padding: 0.5rem 0.75rem;
  border: 3px solid;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: 'VT323', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  transition: all 0.1s;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.btn-breakdown:focus,
.btn-edit:focus,
.btn-emoji:focus,
.btn-delete:focus {
  outline: 2px dotted #000080;
  outline-offset: 2px;
}

.btn-breakdown {
  background: linear-gradient(180deg, #0000ff 0%, #0000cc 100%);
  border-color: #9999ff #000066 #000066 #9999ff;
  color: #fff;
  flex: 1;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3), inset -1px -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-breakdown:hover:not(:disabled) {
  background: linear-gradient(180deg, #6666ff 0%, #0000ff 100%);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-breakdown:active:not(:disabled) {
  border-color: #000066 #9999ff #9999ff #000066;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  transform: translate(2px, 2px);
}

.btn-breakdown:disabled {
  background: linear-gradient(180deg, #808080 0%, #666666 100%);
  border-color: #999999 #404040 #404040 #999999;
  color: #cccccc;
  cursor: not-allowed;
  opacity: 0.6;
  text-shadow: 1px 1px 0 #000;
}

.btn-edit,
.btn-emoji,
.btn-delete {
  background: linear-gradient(180deg, #dfdfdf 0%, #c0c0c0 100%);
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #000;
  padding: 0.5rem 0.6rem;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3), inset -1px -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-edit:hover,
.btn-emoji:hover {
  background: linear-gradient(180deg, #ffff99 0%, #ffff66 100%);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-delete:hover {
  background: linear-gradient(180deg, #ff9999 0%, #ff6666 100%);
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-edit:active,
.btn-emoji:active,
.btn-delete:active {
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  transform: translate(2px, 2px);
}

/* Edit/Add Task Form */
.add-task-form {
  background: linear-gradient(180deg, #e0ffff 0%, #d0f0f0 100%);
  border: 5px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  padding: 1.25rem;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4),
              inset -2px -2px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
}

.edit-title,
.edit-description,
.new-task-title,
.new-task-description {
  width: 100%;
  padding: 0.5rem;
  border: 3px solid;
  border-color: #404040 #ffffff #ffffff #404040;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  background: #fff;
  color: #000;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.25);
}

.edit-title,
.new-task-title {
  font-weight: 700;
  font-size: 1.3rem;
}

.edit-title:focus,
.edit-description:focus,
.new-task-title:focus,
.new-task-description:focus {
  outline: 2px dotted #000080;
  outline-offset: -4px;
  background: #ffffcc;
}

.edit-description,
.new-task-description {
  resize: vertical;
  min-height: 70px;
  font-size: 1.1rem;
}

.edit-form-row,
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.edit-form-field,
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.edit-form-field label,
.form-field label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.edit-priority,
.edit-due-date,
.edit-time,
.edit-assigned,
.new-task-priority,
.new-task-due-date,
.new-task-time,
.new-task-assigned {
  width: 100%;
  padding: 0.5rem;
  border: 3px solid;
  border-color: #404040 #ffffff #ffffff #404040;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  background: #fff;
  color: #000;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.25);
}

.edit-priority,
.new-task-priority {
  font-size: 1.2rem;
  cursor: pointer;
}

.edit-time,
.new-task-time {
  cursor: pointer;
}

.edit-assigned,
.new-task-assigned {
  cursor: text;
}

.edit-priority:focus,
.edit-due-date:focus,
.edit-time:focus,
.edit-assigned:focus,
.new-task-priority:focus,
.new-task-due-date:focus,
.new-task-time:focus,
.new-task-assigned:focus {
  outline: 2px dotted #000080;
  outline-offset: -4px;
  background: #ffffcc;
}

.edit-actions,
.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-save,
.btn-add,
.btn-cancel,
.btn-reset {
  padding: 0.6rem 1rem;
  border: 3px solid;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: 'VT323', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  transition: all 0.1s;
  flex: 1;
}

.btn-save:focus,
.btn-add:focus,
.btn-cancel:focus,
.btn-reset:focus {
  outline: 2px dotted #000080;
  outline-offset: 2px;
}

.btn-save,
.btn-add {
  background: linear-gradient(180deg, #00ff00 0%, #00cc00 100%);
  border-color: #99ff99 #006600 #006600 #99ff99;
  color: #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3), inset -1px -1px 0 rgba(0, 0, 0, 0.25);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-save:hover,
.btn-add:hover {
  background: linear-gradient(180deg, #66ff66 0%, #00ff00 100%);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-cancel {
  background: linear-gradient(180deg, #dfdfdf 0%, #c0c0c0 100%);
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3), inset -1px -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-cancel:hover {
  background: linear-gradient(180deg, #ff9999 0%, #ff6666 100%);
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-save:active,
.btn-add:active,
.btn-cancel:active {
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  transform: translate(2px, 2px);
}

.btn-new-task {
  width: 100%;
  padding: 1rem;
  border: 5px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  background: linear-gradient(180deg, #00ff00 0%, #00cc00 100%);
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4),
              inset -2px -2px 0 rgba(0, 0, 0, 0.15);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.1s;
}

.btn-new-task:focus {
  outline: 3px dotted #000080;
  outline-offset: 2px;
}

.btn-new-task:hover {
  background: linear-gradient(180deg, #66ff66 0%, #00ff00 100%);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-new-task:active {
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  transform: translate(2px, 2px);
}

/* Keyboard Hints */
.keyboard-hints {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2rem;
  background: linear-gradient(180deg, #dfdfdf 0%, #c0c0c0 100%);
  padding: 0.75rem 1.5rem;
  border: 3px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: #000;
  z-index: 100;
}

kbd {
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  padding: 0.25rem 0.5rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: #000;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.modal-content {
  background: linear-gradient(180deg, #dfdfdf 0%, #c0c0c0 100%);
  border: 4px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 3px solid #808080;
  background: linear-gradient(180deg, #000080 0%, #000066 100%);
}

.modal-header h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}

.btn-close {
  background: linear-gradient(180deg, #ff0000 0%, #cc0000 100%);
  border: 3px solid;
  border-color: #ff9999 #660000 #660000 #ff9999;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.1s;
  text-shadow: 1px 1px 0 #000;
}

.btn-close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.btn-close:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-close:active {
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  transform: translate(2px, 2px);
}

.modal-body {
  padding: 2rem;
}

#emoji-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 0.5rem;
}

#emoji-picker span {
  cursor: pointer;
  font-size: 1.5rem;
  text-align: center;
  padding: 0.5rem;
  border-radius: 5px;
  transition: background-color 0.2s;
}

#emoji-picker span:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.shortcuts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shortcuts-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: #000;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.modal-input,
.modal-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 3px solid;
  border-color: #404040 #ffffff #ffffff #404040;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  background: #fff;
  color: #000;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.25);
}

.modal-textarea {
  resize: vertical;
  min-height: 100px;
}

.modal-input:focus,
.modal-textarea:focus {
  outline: 2px dotted #000080;
  outline-offset: -4px;
  background: #ffffcc;
}

.modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 3px solid #808080;
}

/* Confirmation Modal */
.confirm-modal-content {
  max-width: 500px;
}

.confirm-modal-body {
  padding: 2rem 2rem 1.5rem 2rem;
  text-align: center;
}

.confirm-message {
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  color: #000;
  line-height: 1.6;
  margin: 0;
  white-space: pre-line;
  letter-spacing: 0.5px;
}

.btn-reset,
.btn-change-theme,
.btn-export,
.btn-import {
  background: linear-gradient(180deg, #ffff00 0%, #cccc00 100%);
  border-color: #ffff99 #666600 #666600 #ffff99;
  color: #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3), inset -1px -1px 0 rgba(0, 0, 0, 0.25);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-reset:hover,
.btn-change-theme:hover,
.btn-export:hover,
.btn-import:hover {
  background: linear-gradient(180deg, #ffff66 0%, #ffff00 100%);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.btn-reset:active,
.btn-change-theme:active,
.btn-export:active,
.btn-import:active {
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  transform: translate(2px, 2px);
}

#theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.theme-preview {
  cursor: pointer;
  border: 3px solid #000;
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s;
}

.theme-preview:hover {
  transform: scale(1.05);
}

/* Import Modal */
.import-modal-content {
  max-width: 800px;
}

.import-options {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid #808080;
  padding-bottom: 0;
}

.btn-import-option {
  padding: 0.75rem 1rem;
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  background: linear-gradient(180deg, #dfdfdf 0%, #c0c0c0 100%);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  cursor: pointer;
  transition: all 0.1s;
  flex: 1;
  border-bottom: none;
  margin-bottom: -3px;
}

.btn-import-option:hover {
  background: linear-gradient(180deg, #ffffcc 0%, #ffff99 100%);
}

.btn-import-option.active {
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
  border-bottom: 3px solid #ffffff;
  margin-bottom: -3px;
  font-weight: bold;
}

.import-section {
  padding: 1rem 0;
}

.import-help {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #000;
}

.import-textarea,
.ai-prompt-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 3px solid;
  border-color: #404040 #ffffff #ffffff #404040;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  background: #fff;
  color: #000;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.25);
  resize: vertical;
  min-height: 200px;
  margin-bottom: 1rem;
}

.ai-prompt-textarea {
  background: #f5f5f5;
  cursor: text;
}

.import-textarea:focus,
.ai-prompt-textarea:focus {
  outline: 2px dotted #000080;
  outline-offset: -4px;
  background: #ffffcc;
}

#import-file {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 3px dashed #808080;
  background: #f5f5f5;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  cursor: pointer;
}

#import-file:hover {
  background: #ffffcc;
  border-color: #000080;
}


/* Print Preview Modal */
.print-preview-modal {
  z-index: 2000;
}

.print-preview-content {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  display: flex;
  flex-direction: column;
}

.print-preview-body {
  padding: 0;
  overflow-y: auto;
  flex: 1;
  max-height: calc(95vh - 150px);
}

.print-content {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.4;
  max-width: 80mm;
  margin: 0 auto;
  padding: 10mm;
  background: white;
  color: #000;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-content .header {
  text-align: center;
  border-bottom: 2px dashed #000;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.print-content .header h1 {
  margin: 0 0 5px 0;
  font-size: 18px;
  font-weight: bold;
}

.print-content .date {
  font-size: 10px;
  color: #666;
}

.print-content .stats {
  display: flex;
  justify-content: space-between;
  margin: 15px 0;
  padding: 8px 0;
  border-top: 1px dashed #ccc;
  border-bottom: 1px dashed #ccc;
  font-size: 11px;
}

.print-content .task {
  margin-bottom: 10px;
}

.print-content .task[data-level="1"] {
  padding-left: 0;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ccc;
}

.print-content .task[data-level="2"] {
  padding-left: 15px;
  border-left: 2px solid #666;
  margin-bottom: 8px;
}

.print-content .task[data-level="3"] {
  padding-left: 30px;
  border-left: 2px solid #999;
  margin-bottom: 5px;
}

.print-content .task-header {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-bottom: 5px;
}

.print-content .checkbox {
  width: 12px;
  height: 12px;
  border: 1px solid #000;
  display: inline-block;
  flex-shrink: 0;
  margin-top: 2px;
  text-align: center;
  line-height: 11px;
  font-size: 10px;
}

.print-content .task-title {
  font-weight: bold;
  font-size: 13px;
  flex: 1;
}

.print-content .task[data-level="1"] .task-title {
  font-size: 14px;
}

.print-content .task[data-level="1"] .task-description {
  margin-left: 0;
}

.print-content .task[data-level="1"] .task-meta {
  margin-left: 0;
}

.print-content .task-description {
  font-size: 11px;
  color: #444;
  margin: 5px 0 5px 17px;
  white-space: pre-wrap;
}

.print-content .task-meta {
  font-size: 10px;
  color: #666;
  margin: 2px 0 2px 17px;
}

.print-content .footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 2px dashed #000;
  font-size: 10px;
  white-space: pre-line;
}

.print-preview-header,
.print-preview-footer {
  flex-shrink: 0;
}

/* Hide modal UI when actually printing */
@media print {
  /* Hide everything by default */
  body > *:not(#print-preview-modal) {
    display: none !important;
  }

  /* Hide modal chrome, only show content */
  .print-preview-modal {
    position: static !important;
    display: block !important;
    background: transparent !important;
  }

  .modal-content {
    max-width: none !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    display: block !important;
  }

  .print-preview-header,
  .print-preview-footer {
    display: none !important;
  }

  .print-preview-body {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
  }

  #print-content {
    position: static !important;
    width: 80mm !important;
    margin: 0 !important;
    padding: 10mm !important;
    display: block !important;
    background: white !important;
    color: #000 !important;
  }

  @page {
    size: 80mm auto;
    margin: 0;
    padding: 0;
  }

  body {
    margin: 0;
    padding: 0;
  }

  /* Prevent page breaks for continuous printing */
  .print-content {
    page-break-inside: avoid;
  }

  /* Header and footer appear only once (not repeated on every page) */
  .print-content .header {
    page-break-inside: avoid;
    break-inside: avoid;
    page-break-after: avoid;
    break-after: avoid;
  }

  .print-content .footer {
    page-break-inside: avoid;
    break-inside: avoid;
    page-break-before: avoid;
    break-before: avoid;
  }

  .print-content .stats,
  .print-content .task,
  .print-content .task-header,
  .print-content .task-description,
  .print-content .task-meta {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-content .task {
    page-break-after: auto;
    break-after: auto;
  }

  /* Keep task groups together */
  .print-content .task[data-level="1"] {
    page-break-before: avoid;
    page-break-after: auto;
    break-before: avoid;
    break-after: auto;
  }

  /* Disable running headers/footers */
  @page {
    @top-left { content: none; }
    @top-center { content: none; }
    @top-right { content: none; }
    @bottom-left { content: none; }
    @bottom-center { content: none; }
    @bottom-right { content: none; }
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .app-header {
    gap: 1rem;
  }

  .header-left h1 {
    font-size: 1.2rem;
  }

  .stat {
    font-size: 0.6rem;
    padding: 0.6rem 1rem;
  }

  .stats {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .notification-content {
    min-width: 90vw;
    max-width: 90vw;
    padding: 1.25rem;
  }

  .notification-icon {
    font-size: 2rem;
  }

  .notification-title {
    font-size: 0.7rem;
  }

  .notification-message {
    font-size: 1rem;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .header-left h1 {
    font-size: 1rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .header-center {
    justify-content: center;
  }

  .stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .stat {
    font-size: 0.55rem;
    padding: 0.5rem 0.75rem;
  }

  .header-right {
    justify-content: center;
    flex-wrap: wrap;
  }

  .btn-print,
  .btn-settings,
  .btn-delete-all {
    padding: 0.6rem 0.75rem;
    font-size: 0.7rem;
  }

  .app-main {
    padding: 1rem;
  }

  .task-column {
    min-width: 280px;
    width: 90vw;
  }

  .column-header h2 {
    font-size: 0.75rem;
  }

  .task-count {
    font-size: 0.6rem;
    padding: 0.3rem 0.6rem;
  }

  .task-title {
    font-size: 1.2rem;
  }

  .keyboard-hints {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    bottom: 0.5rem;
  }

  kbd {
    font-size: 0.6rem;
  }

  .print-preview-content {
    max-width: 100vw;
    width: 100vw;
  }

  .print-content {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .notification-content {
    min-width: 95vw;
    max-width: 95vw;
    padding: 1rem;
  }

  .notification-icon {
    font-size: 1.8rem;
  }

  .notification-title {
    font-size: 0.6rem;
  }

  .notification-message {
    font-size: 0.95rem;
  }

  .notification-close {
    width: 30px;
    height: 30px;
    font-size: 0.6rem;
  }

  .header-left h1 {
    font-size: 0.85rem;
  }

  .tagline {
    font-size: 0.8rem;
    letter-spacing: 1px;
  }

  .stats {
    flex-direction: column;
    gap: 0.5rem;
  }

  .stat {
    width: 100%;
    text-align: center;
  }

  .btn-print,
  .btn-settings,
  .btn-delete-all {
    font-size: 0.65rem;
    padding: 0.5rem 0.6rem;
  }

  .task-column {
    min-width: 260px;
    width: calc(100vw - 2rem);
  }

  .keyboard-hints {
    display: none;
  }

  .modal-content {
    max-width: 95vw;
  }

  .modal-header h2 {
    font-size: 0.8rem;
  }
}

/* Notification Modal */
.notification-modal {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.notification-content {
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
  border: 5px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
  min-width: 400px;
  max-width: 600px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  position: relative;
}

.notification-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.notification-body {
  flex: 1;
}

.notification-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  margin: 0 0 0.5rem 0;
  color: #000080;
}

.notification-message {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  margin: 0;
  color: #000;
  line-height: 1.4;
}

.notification-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: linear-gradient(180deg, #ff0000 0%, #cc0000 100%);
  border: 3px solid;
  border-color: #ff9999 #660000 #660000 #ff9999;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  width: 35px;
  height: 35px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.1s;
  text-shadow: 1px 1px 0 #000;
  padding: 0;
}

.notification-close:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.notification-close:active {
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  transform: translate(2px, 2px);
}

/* Notification types */
.notification-content.success {
  border-color: #00ff00 #006600 #006600 #00ff00;
  background: linear-gradient(180deg, #ddffdd 0%, #ccffcc 100%);
}

.notification-content.success .notification-title {
  color: #006600;
}

.notification-content.error {
  border-color: #ff0000 #660000 #660000 #ff0000;
  background: linear-gradient(180deg, #ffdddd 0%, #ffcccc 100%);
}

.notification-content.error .notification-title {
  color: #660000;
}

.notification-content.warning {
  border-color: #ffff00 #666600 #666600 #ffff00;
  background: linear-gradient(180deg, #ffffdd 0%, #ffffcc 100%);
}

.notification-content.warning .notification-title {
  color: #666600;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #dfdfdf 0%, #c0c0c0 100%);
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffffcc 0%, #ffff99 100%);
}
