/* ===== ATP Grid - Styles ===== */
/* Clean, modern tennis-themed interface */

:root {
  --green-dark: #1a3c34;
  --green-primary: #2d6a4f;
  --green-medium: #3d8b6e;
  --green-light: #52b788;
  --green-lighter: #95d5b2;
  --green-lightest: #e8f5ee;
  --green-cell: #3a7d5e;
  --lime: #b5e61d;
  --lime-bright: #c8f02d;
  --lime-muted: #eef8c3;
  --lime-hover: #d0ff3e;
  --gold: #f4a261;
  --gold-dark: #e76f51;
  --red: #d94f4f;
  --red-muted: #e8a0a0;
  --bg: #f7f8f4;
  --bg-alt: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #5a5a6e;
  --text-light: #9a9aaa;
  --border: #d8dbd2;
  --border-light: #eceee8;
  --shadow: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.1);
  --radius: 10px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --transition: 0.15s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.app-header {
  width: 100%;
  max-width: 540px;
  padding: 14px 16px 6px;
  margin: 0 auto;
}

.header-top {
  display: flex;
  align-items: center;
}

.header-left {
  display: flex;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
}

.header-center {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.app-title {
  line-height: 1;
  display: flex;
  align-items: center;
}

.header-logo-img {
  height: 150px;
  width: auto;
  margin: -40px 0;
  display: block;
}

/* Subheader: "Today's Grid | ATP Grid #32" */
.subheader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 0 2px;
}

.date-display {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.subheader-sep {
  font-size: 11px;
  color: var(--border);
  font-weight: 300;
}

.grid-number {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.countdown-timer {
  text-align: center;
  font-size: 12px;
  color: var(--green-dark);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 0 4px;
  display: none;
}

.countdown-timer.visible {
  display: block;
}

.rarity-mode-badge {
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 10px;
  margin: 2px auto 0;
  width: fit-content;
  color: var(--text-light);
}

.rarity-mode-badge.live {
  background: rgba(45, 106, 79, 0.08);
  color: var(--green-primary);
  border: 1px solid rgba(45, 106, 79, 0.15);
}

/* Icon buttons */
.icon-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: var(--transition);
  overflow: visible;
  flex-shrink: 0;
}

.help-icon {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.icon-btn:hover {
  border-color: var(--green-primary);
  color: var(--green-primary);
  background: var(--green-lightest);
}

/* ===== LET'S PLAY BUTTON ===== */
.htp-play-btn {
  display: block;
  margin: 20px auto 0;
  padding: 12px 48px;
  background: var(--lime);
  color: var(--green-dark);
  border: none;
  border-radius: 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.htp-play-btn:hover {
  background: var(--lime-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(181,230,29,0.3);
}

/* ===== MODE TOGGLE ===== */
.mode-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.mode-btn {
  background: none;
  border: none;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}

.mode-btn.active {
  background: var(--green-dark);
  color: white;
}

.mode-btn:not(.active):hover {
  background: var(--green-lightest);
  color: var(--green-primary);
}

/* ===== ATTEMPTS COUNTER ===== */
.strikes-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: var(--green-dark);
  color: white;
  border-radius: 20px;
  padding: 6px 14px 5px;
  min-width: 58px;
}

.attempts-label {
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.55;
  line-height: 1;
  margin-bottom: 1px;
}

.attempts-count {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.strikes-display {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.strike-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.35);
  font-size: 0;
  line-height: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.strike-dot.used {
  background: var(--red);
  border-color: var(--red);
}

.strikes-container.low {
  background: var(--red);
  animation: pulse 1.2s ease infinite;
}

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

/* ===== ARCHIVE PANEL ===== */
.archive-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(3px);
  z-index: 890;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.archive-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.archive-panel {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  background: var(--bg-alt);
  box-shadow: 20px 0 40px rgba(0,0,0,0.15);
  z-index: 900;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
}

.archive-panel.open { left: 0; }

.archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}

.archive-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--green-dark);
}

.archive-list {
  flex: 1;
  overflow-y: auto;
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.archive-item:hover { background: var(--green-lightest); }

.archive-item.today {
  background: #f5f5f0;
  border-left: 4px solid var(--green-dark);
}

.archive-date-info { display: flex; flex-direction: column; }
.archive-day { font-size: 13px; font-weight: 600; color: var(--text); }
.archive-date { font-size: 11px; color: var(--text-light); }
.archive-grid-num { font-size: 10px; color: var(--text-light); font-weight: 500; }

.archive-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.archive-status.complete { background: var(--lime); color: var(--green-dark); }
.archive-status.partial { background: var(--border-light); color: var(--text-secondary); }
.archive-status.in-progress { background: var(--border-light); color: var(--text-secondary); }

/* ===== GRID ===== */
.app-main {
  width: 100%;
  max-width: 540px;
  padding: 0 12px;
  margin: 0 auto;
}

.grid-container { width: 100%; }

.grid-table {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr;
  gap: 6px;
  width: 100%;
}

.grid-row { display: contents; }

.grid-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

/* Corner cell - empty axis intersection */
.corner-cell {
  background: transparent;
  border: none;
}

.corner-rarity-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.corner-rarity-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1;
}

.corner-rarity-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  line-height: 1;
}

/* Subheader rarity badge */
.subheader-rarity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px auto 0;
  padding: 3px 12px;
  background: rgba(45, 106, 79, 0.07);
  border: 1px solid rgba(45, 106, 79, 0.12);
  border-radius: 12px;
  width: fit-content;
}

.subheader-rarity-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-light);
}

.subheader-rarity-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}

/* Header cells */
.header-cell {
  background: var(--green-dark);
  color: white;
  padding: 8px 6px;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  width: 100%;
}

.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}

.cat-icon {
  width: 18px;
  height: 18px;
  stroke: rgba(255,255,255,0.85);
}

.header-label {
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
  max-width: 100%;
  opacity: 0.95;
  letter-spacing: 0.01em;
}

.col-header { border-radius: var(--radius) var(--radius) var(--radius-xs) var(--radius-xs); }
.row-header { border-radius: var(--radius) var(--radius-xs) var(--radius-xs) var(--radius); }

/* ===== Data cells ===== */
.data-cell {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.data-cell:hover:not(.answered) {
  border-color: var(--lime);
  background: rgba(194,229,62,0.08);
  transform: scale(1.02);
  box-shadow: 0 0 0 2px rgba(194,229,62,0.12);
}

.cell-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.cell-plus {
  font-size: 32px;
  font-weight: 300;
  color: var(--lime);
  transition: var(--transition);
  line-height: 1;
}

.data-cell:hover .cell-plus {
  color: var(--green-dark);
  transform: scale(1.15);
}

/* Answered cells */
.data-cell.answered {
  border: none;
  cursor: default;
  padding: 0;
}

.cell-answered {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  position: relative;
  border-radius: var(--radius-sm);
}

.player-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.player-name-cell {
  font-size: 10px;
  font-weight: 700;
  color: white;
  text-align: center;
  line-height: 1.2;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.rarity-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  background: rgba(0,0,0,0.25);
  border-radius: 6px;
  padding: 2px 5px;
  backdrop-filter: blur(3px);
  font-variant-numeric: tabular-nums;
}

/* Shake animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.shake { animation: shake 0.35s ease; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 48px 16px;
  overflow-y: auto;
}

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

.modal-content {
  background: var(--bg-alt);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  z-index: 1010;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-light);
  cursor: pointer;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close:hover { background: var(--border-light); color: var(--text); }

/* Search Modal */
.search-modal-content {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 36px;
}

.modal-cat {
  background: var(--green-dark);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.2px;
}

.modal-cat .cat-icon {
  width: 14px;
  height: 14px;
  stroke: #fff;
}

.modal-x {
  color: var(--text-light);
  font-weight: 400;
  font-size: 13px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
  margin: 10px 12px;
  border-radius: 16px;
  border: 2px solid var(--border-light);
  transition: border-color 0.2s ease;
}

.search-bar:focus-within {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(26, 67, 49, 0.15);
}

.search-icon { color: var(--text-light); flex-shrink: 0; }

#search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  padding: 4px 0;
}

#search-input::placeholder { color: var(--text-light); }

.guess-error {
  background: #fef2f2;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.guess-error.show {
  padding: 8px 16px;
  max-height: 60px;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-result-item:hover { background: var(--lime-muted); }
.search-result-item:hover .search-avatar-wrap { filter: grayscale(0); }
.search-result-item:active { background: rgba(163, 230, 53, 0.18); }

.search-result-item + .search-result-item {
  border-top: 1px solid var(--border-light);
}

.search-avatar-wrap {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  background: #1a4331;
  filter: grayscale(40%);
  transition: filter 0.2s ease;
  border: 1.5px solid var(--border-light);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.search-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
}

.search-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #1a4331;
}

.search-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-name { font-size: 15px; font-weight: 600; color: var(--text); }
.search-flag { font-size: 16px; line-height: 1; }

.no-results {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}

/* Game Over Modal */
.game-over-content { padding: 28px 24px; text-align: center; }

.game-over-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}

.game-over-stats { margin-bottom: 20px; }

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.stat-label { font-size: 13px; color: var(--text-secondary); }
.stat-value { font-size: 17px; font-weight: 700; color: var(--green-dark); }

.rarity-explanation {
  border-bottom: none;
  justify-content: center;
  padding-top: 12px;
  color: var(--text-light);
}

.game-over-actions { display: flex; gap: 10px; justify-content: center; }

.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--lime);
  color: var(--green-dark);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.btn-primary:hover {
  background: var(--lime-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(181,230,29,0.3);
}

/* How to Play Modal */
.how-to-play-content { padding: 24px; max-height: 85vh; overflow-y: auto; }

.how-to-play-content h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.htp-body { font-size: 13px; line-height: 1.5; }
.htp-body > p { margin-bottom: 14px; color: var(--text-secondary); }

.htp-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.htp-rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}

.htp-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.htp-section {
  background: #f5f0eb;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 12px;
}

.htp-section h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.htp-section p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.rarity-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
}

.rarity-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.rarity-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.htp-clarifications {
  list-style: none;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.htp-clarifications li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 3px 0;
  line-height: 1.45;
}

.htp-clarifications li strong {
  flex: 0 0 110px;
  min-width: 110px;
  color: var(--green-dark);
}

/* ===== FOOTER ===== */
.app-footer {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 16px 16px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-share-footer {
  background: var(--lime);
  color: var(--green-dark);
  border: none;
  border-radius: 24px;
  padding: 12px 48px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn-share-footer:hover {
  background: var(--lime-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(181,230,29,0.3);
}

.btn-share-footer.copied { background: var(--green-light); }

.footer-info {
  font-size: 11px;
  color: #78716c;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-dot { opacity: 0.5; }

/* Share modal */
.share-text-content {
  padding: 24px;
  max-width: 380px;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.share-text-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--green-dark);
  text-align: center;
  margin-bottom: 16px;
}

.share-preview-card {
  background: #f5f0eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  text-align: center;
  white-space: pre-line;
}

.share-preview-card .share-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--green-dark);
}

.share-preview-card .share-score {
  font-size: 13px;
  color: #555;
}

.share-preview-card .share-grid-row {
  font-family: 'Courier New', Courier, monospace;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: 4px;
  display: block;
  text-align: center;
}

.share-preview-card .share-url {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

.share-copy-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--lime);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.share-copy-btn:hover {
  background: #a8d119;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-copy-btn:active {
  transform: translateY(0);
}

.share-copy-btn.copied {
  background: var(--green-dark);
  color: #fff;
}

.share-copy-btn.copied .share-copy-icon {
  stroke: #fff;
}

.share-copy-icon {
  flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .app-header { padding: 8px 10px 2px; }
  .header-logo-img { height: 114px; margin: -28px 0; }
  .cat-icon { width: 17px; height: 17px; }
  .header-label { font-size: 8px; }
  .cell-plus { font-size: 22px; }
  .player-photo { width: 40px; height: 40px; border-width: 2px; }
  .player-avatar { width: 40px; height: 40px; font-size: 13px; border-width: 2px; }
  .player-name-cell { font-size: 8px; }
  .search-avatar-wrap { width: 36px; height: 36px; }
  .grid-table { gap: 4px; }
  .icon-btn { width: 30px; height: 30px; }
  .icon-btn svg { width: 14px; height: 14px; }
  .strikes-container { padding: 4px 8px; min-width: 48px; }
  .attempts-label { font-size: 6px; }
  .attempts-count { font-size: 11px; }
  .strike-dot { width: 5px; height: 5px; }
  .date-display, .grid-number { font-size: 10px; }
  .subheader-sep { font-size: 10px; }

  .modal-overlay { padding: 20px 0 0; align-items: flex-end; }
  .modal-content { max-width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
  .search-modal-content { max-height: 90vh; }
}

/* ===== DESKTOP ===== */
@media (min-width: 768px) {
  .app-header { max-width: 640px; }
  .app-main { max-width: 640px; }
  .app-footer { max-width: 640px; }

  .header-logo-img { height: 180px; margin: -48px 0; }

  .grid-table { gap: 8px; }
  .grid-cell { border-radius: var(--radius); }

  .header-cell { padding: 12px 8px; }
  .cat-icon { width: 22px; height: 22px; }
  .header-label { font-size: 11px; }

  .cell-plus { font-size: 38px; }

  .player-photo { width: 64px; height: 64px; }
  .player-avatar { width: 64px; height: 64px; font-size: 18px; }
  .player-name-cell { font-size: 11px; }
  .rarity-badge { font-size: 10px; padding: 2px 6px; }

  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 18px; height: 18px; }

  .strikes-container { padding: 6px 16px; min-width: 64px; }
  .attempts-count { font-size: 15px; }
  .strike-dot { width: 7px; height: 7px; }

  .date-display, .grid-number { font-size: 12px; }
  .subheader-sep { font-size: 12px; }
  .countdown-timer { font-size: 13px; }
}

@media (min-width: 1024px) {
  .app-header { max-width: 720px; }
  .app-main { max-width: 720px; }
  .app-footer { max-width: 720px; }

  .header-logo-img { height: 210px; margin: -56px 0; }

  .grid-table { gap: 10px; }

  .header-cell { padding: 16px 10px; }
  .cat-icon { width: 24px; height: 24px; }
  .header-label { font-size: 12px; }

  .cell-plus { font-size: 42px; }
  .cell-answered { padding: 10px; gap: 5px; }
  .player-photo { width: 72px; height: 72px; }
  .player-avatar { width: 72px; height: 72px; font-size: 20px; }
  .player-name-cell { font-size: 13px; }
  .rarity-badge { font-size: 11px; padding: 3px 7px; top: 6px; right: 6px; }

  .date-display, .grid-number { font-size: 13px; }
}

/* ===== SCROLLBAR ===== */
.search-results::-webkit-scrollbar,
.archive-list::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-track,
.archive-list::-webkit-scrollbar-track { background: transparent; }
.search-results::-webkit-scrollbar-thumb,
.archive-list::-webkit-scrollbar-thumb { background: #c4b5a4; border-radius: 4px; }
.search-results::-webkit-scrollbar-thumb:hover,
.archive-list::-webkit-scrollbar-thumb:hover { background: #a89b8c; }

/* Firefox scrollbar */
.search-results,
.archive-list {
  scrollbar-width: thin;
  scrollbar-color: #c4b5a4 transparent;
}
