@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;700&display=swap");

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

/* ---------- Floating header (date + title) ---------- */

#app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding-top: 75px;
  padding-left: 16px;
  padding-right: 16px;
  pointer-events: none;
  background: transparent;
}

#current-date {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: #000000;
}

#dashboard-title {
  margin: 4px 0 0 0;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 34px;
  color: #000000;
}

/* ---------- Content grid (masonry) ---------- */

#content {
  padding: 190px 16px 100px 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 82px;
  grid-auto-flow: dense;
  gap: 11px;
}

.card {
  border-radius: 26px;
  background: #f2f2f2;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #000000;
  overflow: hidden;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card--small {
  grid-column: span 1;
  grid-row: span 1;
}

.card--large {
  grid-column: span 1;
  grid-row: span 2;
}

/* ---------- Long Press / Drag & Drop states ---------- */

.card.pressing {
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: scale(1.08);
  z-index: 5;
}

.card.menu-open {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform: scale(1.08);
  z-index: 40;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.card.dragging {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  transform: scale(1.1);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  transition: box-shadow 0.15s ease;
  pointer-events: none;
  margin: 0;
}

.card.placeholder {
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Kontextmenü ---------- */

#card-context-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: transparent;
}

#card-context-overlay.hidden {
  display: none;
}

#card-context-menu {
  position: fixed;
  z-index: 60;
  min-width: 170px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform-origin: top center;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#card-context-menu.hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

#context-delete-btn {
  width: 100%;
  border: none;
  background: transparent;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #ff3b30;
  padding: 13px 16px;
  text-align: left;
  cursor: pointer;
}

#context-delete-btn:active {
  background: rgba(0, 0, 0, 0.05);
}

/* ---------- Floating add button ---------- */

#add-card-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #000000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 20;
}

#add-card-btn:active {
  transform: scale(0.94);
}

/* ---------- Modal (iOS style) ---------- */

#modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity 0.2s ease;
}

#modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#modal {
  width: 270px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 20px 16px 16px 16px;
  text-align: center;
  transform: scale(1);
  transition: transform 0.2s ease;
}

#modal-overlay.hidden #modal {
  transform: scale(0.92);
}

#modal-title {
  margin: 0 0 14px 0;
  font-weight: 700;
  font-size: 16px;
  color: #000000;
}

.modal-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-option {
  border: none;
  background: #000000;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 15px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
}

.modal-option:active {
  opacity: 0.8;
}

#modal-cancel {
  margin-top: 12px;
  border: none;
  background: transparent;
  color: #007aff;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 15px;
  padding: 8px;
  cursor: pointer;
  width: 100%;
}
