:root {
  --bg-color: #0c121e;
  --bg-card: #162032;
  --bg-card-hover: #1e2c44;
  --accent-gold: #fbbf24;
  --accent-red: #dc2626;
  --accent-red-hover: #b91c1c;
  --accent-green: #15803d;
  --accent-green-hover: #166534;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Festive Snow Background Pattern */
.christmas-theme {
  background: radial-gradient(circle at 50% 10%, #1e293b 0%, #090d16 100%);
  position: relative;
  overflow-x: hidden;
}

/* Snowflake decoration */
.snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 40px 70px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 90px 40px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 160px 120px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 250px 180px, #ffffff, rgba(0,0,0,0));
  background-size: 300px 300px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
  position: relative;
  z-index: 1;
}

/* Header & Navigation */
header.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent-red);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--accent-red-hover);
}

.btn-secondary {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: #64748b;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.8rem;
}

/* Center Card (Login / Error / Locked) */
.center-card {
  max-width: 480px;
  margin: 80px auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  text-align: center;
  position: relative;
  z-index: 1;
}

.center-card h1 {
  color: var(--accent-gold);
  margin-bottom: 12px;
  font-size: 1.8rem;
}

.center-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: #0b111a;
  color: var(--text-main);
  font-size: 1rem;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.alert-danger {
  background-color: rgba(220, 38, 38, 0.2);
  border: 1px solid var(--accent-red);
  color: #fca5a5;
}

.alert-success {
  background-color: rgba(21, 128, 61, 0.2);
  border: 1px solid var(--accent-green);
  color: #4ade80;
}

.alert-info {
  background-color: rgba(14, 165, 233, 0.15);
  border: 1px solid #0284c7;
  color: #bae6fd;
}

/* Grid & Dashboard */
.calendar-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover {
  border-color: #475569;
}

.card-title {
  font-size: 1.25rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.dashboard-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.management-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.management-card h3 {
  color: var(--accent-gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
}

.calendar-settings-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

/* Doors Grid (Admin Detail) */
.doors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.door-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.door-card.unlocked {
  border-top: 3px solid var(--accent-green);
}
.door-card.locked {
  border-top: 3px solid var(--accent-red);
}

.door-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.door-number {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
}
.badge-success {
  background-color: rgba(21, 128, 61, 0.2);
  color: #4ade80;
  border: 1px solid var(--accent-green);
}
.badge-warning {
  background-color: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border: 1px solid #ca8a04;
}

/* Side-by-side QR Code & Thumbnail */
.door-visuals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.visual-box {
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 145px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.visual-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 105px;
  overflow: hidden;
}

.visual-box canvas, .visual-box img.qr-img {
  display: block;
  max-width: 100%;
  max-height: 105px;
}

.door-thumbnail-img {
  max-width: 100%;
  max-height: 105px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.no-thumb-placeholder {
  width: 100%;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1.5px dashed #cbd5e1;
  border-radius: 4px;
}

.visual-label {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Upload Section */
.door-upload-container {
  margin-bottom: 10px;
}

.file-input-hidden {
  display: none !important;
}

.upload-btn {
  width: 100%;
  cursor: pointer;
  background-color: #1e293b;
  border: 1px dashed var(--accent-gold);
  color: var(--accent-gold);
  font-size: 0.8rem;
  padding: 6px 10px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.upload-btn:hover {
  background-color: #334155;
  border-color: #fde047;
  color: #fff;
}

.upload-status {
  font-size: 0.75rem;
  display: block;
  text-align: center;
  min-height: 18px;
  margin-top: 4px;
  transition: all 0.3s;
}

.status-success {
  color: #4ade80;
  font-weight: 600;
}

.status-error {
  color: #f87171;
  font-weight: 600;
}

.status-loading {
  color: #38bdf8;
  font-weight: 500;
}

.door-url-box {
  background-color: #0b111a;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.75rem;
  color: #94a3b8;
  word-break: break-all;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.door-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.door-actions .btn {
  flex: 1;
}

/* Public Calendar View */
.public-door-container {
  max-width: 640px;
  margin: 30px auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.door-badge-tag {
  display: inline-block;
  background: var(--accent-red);
  color: #fff;
  font-weight: bold;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 1rem;
  margin-bottom: 16px;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

.door-image-wrapper {
  background: var(--bg-card);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  margin-bottom: 24px;
}

.calendar-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

.banner-preview {
  background: #ca8a04;
  color: #000;
  font-weight: bold;
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  text-align: center;
}

/* Lock Icon Styling */
.lock-icon-svg {
  width: 64px;
  height: 64px;
  stroke: var(--accent-gold);
  fill: none;
  margin-bottom: 16px;
}

/* Print Optimization */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .app-header, .btn, .snowflakes {
    display: none !important;
  }
  .doors-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .door-card {
    border: 1px solid #ccc;
    background: #fff;
    page-break-inside: avoid;
    color: #000;
  }
  .qr-wrapper {
    background: transparent;
    padding: 0;
  }
}

/* ========================================================
   10 DESIGN TEMPLATES (COLORS, BACKGROUNDS & ANIMATIONS)
   ======================================================== */

/* 1. Classic Red */
body.theme-classic-red {
  background: radial-gradient(circle at 50% 15%, #2a0808 0%, #0d0404 100%) !important;
}

/* 2. Winter Wonderland (Cool Ice Blue with Falling Snow) */
body.theme-winter-wonderland {
  --bg-color: #071728;
  --bg-card: #0f2d4d;
  --accent-gold: #38bdf8;
  --border-color: #1e4770;
  --text-main: #f0f9ff;
  --text-muted: #bae6fd;
  background: radial-gradient(circle at 50% 20%, #10365c 0%, #05101c 100%) !important;
}
body.theme-winter-wonderland .door-image-wrapper {
  border-color: #38bdf8;
  box-shadow: 0 15px 35px rgba(2, 132, 199, 0.3);
}
body.theme-winter-wonderland .door-badge-tag {
  background: #0284c7;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.5);
}

/* 3. Minimal Light (Clean Scandinavian White) */
body.theme-minimal-light {
  --bg-color: #f8fafc;
  --bg-card: #ffffff;
  --accent-gold: #475569;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  background: #f8fafc !important;
  color: #0f172a;
}
body.theme-minimal-light .snowflakes {
  display: none !important;
}
body.theme-minimal-light .door-image-wrapper {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
body.theme-minimal-light .door-badge-tag {
  background: #334155;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(51, 65, 85, 0.2);
}
body.theme-minimal-light .center-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}
body.theme-minimal-light .center-card h1 {
  color: #0f172a;
}
body.theme-minimal-light .lock-icon-svg {
  stroke: #475569;
}

/* 4. Minimal Dark (Matte Graphite / Understated) */
body.theme-minimal-dark {
  --bg-color: #121214;
  --bg-card: #18181b;
  --accent-gold: #e4e4e7;
  --border-color: #27272a;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  background: #121214 !important;
}
body.theme-minimal-dark .snowflakes {
  display: none !important;
}
body.theme-minimal-dark .door-image-wrapper {
  background: #18181b;
  border: 1px solid #3f3f46;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}
body.theme-minimal-dark .door-badge-tag {
  background: #27272a;
  color: #f4f4f5;
  border: 1px solid #3f3f46;
  box-shadow: none;
}
body.theme-minimal-dark .center-card {
  background: #18181b;
  border-color: #27272a;
}
body.theme-minimal-dark .center-card h1 {
  color: #f4f4f5;
}
body.theme-minimal-dark .lock-icon-svg {
  stroke: #71717a;
}

/* 5. Pine Forest (Deep Forest Green & Wood) */
body.theme-pine-forest {
  --bg-color: #041f17;
  --bg-card: #083327;
  --accent-gold: #fde68a;
  --border-color: #0f513e;
  --text-main: #ecfdf5;
  --text-muted: #a7f3d0;
  background: radial-gradient(circle at 50% 20%, #0d4435 0%, #031711 100%) !important;
}
body.theme-pine-forest .door-image-wrapper {
  background: #083327;
  border-color: #10b981;
  box-shadow: 0 15px 35px rgba(5, 150, 105, 0.25);
}
body.theme-pine-forest .door-badge-tag {
  background: #047857;
  color: #fef3c7;
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.4);
}

/* 6. Golden Elegance (Warm Black & Champagne Gold) */
body.theme-golden-elegance {
  --bg-color: #0a0908;
  --bg-card: #181512;
  --accent-gold: #fef08a;
  --border-color: #3a2e1d;
  --text-main: #fefce8;
  --text-muted: #d6d3d1;
  background: radial-gradient(circle at 50% 15%, #241c14 0%, #070605 100%) !important;
}
body.theme-golden-elegance .door-image-wrapper {
  background: #181512;
  border-color: #eab308;
  box-shadow: 0 15px 35px rgba(234, 179, 8, 0.25);
}
body.theme-golden-elegance .door-badge-tag {
  background: linear-gradient(135deg, #ca8a04 0%, #eab308 100%);
  color: #000;
  box-shadow: 0 4px 10px rgba(202, 138, 4, 0.5);
}

/* 7. Nordic Frost (Frosted Glass & Cyan Ice) */
body.theme-nordic-frost {
  --bg-color: #081622;
  --bg-card: rgba(14, 38, 61, 0.75);
  --accent-gold: #a5f3fc;
  --border-color: #1e4566;
  --text-main: #f0fdfa;
  --text-muted: #bae6fd;
  background: linear-gradient(145deg, #071520 0%, #0d2c47 50%, #06121c 100%) !important;
}
body.theme-nordic-frost .door-image-wrapper {
  background: rgba(14, 38, 61, 0.6);
  border: 2px solid #38bdf8;
  box-shadow: 0 15px 35px rgba(56, 189, 248, 0.25);
  backdrop-filter: blur(12px);
}
body.theme-nordic-frost .door-badge-tag {
  background: #0284c7;
  color: #f0fdfa;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

/* 8. Cozy Fireplace (Warm Amber & Mahogany) */
body.theme-cozy-fireplace {
  --bg-color: #170904;
  --bg-card: #281208;
  --accent-gold: #fed7aa;
  --border-color: #4a2110;
  --text-main: #fff7ed;
  --text-muted: #fdba74;
  background: radial-gradient(circle at 50% 25%, #3b170a 0%, #120502 100%) !important;
}
body.theme-cozy-fireplace .snowflakes {
  display: none !important;
}
body.theme-cozy-fireplace .door-image-wrapper {
  background: #281208;
  border-color: #f97316;
  box-shadow: 0 15px 35px rgba(234, 88, 12, 0.25);
}
body.theme-cozy-fireplace .door-badge-tag {
  background: #ea580c;
  color: #ffedd5;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.5);
}

/* 9. Pastel Dream (Rose, Cream & Warm Pink) */
body.theme-pastel-dream {
  --bg-color: #fdf2f8;
  --bg-card: #ffffff;
  --accent-gold: #be185d;
  --border-color: #fce7f3;
  --text-main: #831843;
  --text-muted: #9d174d;
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fae8ff 100%) !important;
  color: #831843;
}
body.theme-pastel-dream .snowflakes {
  display: none !important;
}
body.theme-pastel-dream .door-image-wrapper {
  background: #ffffff;
  border-color: #f472b6;
  box-shadow: 0 12px 30px rgba(244, 114, 182, 0.2);
}
body.theme-pastel-dream .door-badge-tag {
  background: #db2777;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(219, 39, 119, 0.3);
}
body.theme-pastel-dream .center-card {
  background: #ffffff;
  border-color: #fbcfe8;
  box-shadow: 0 10px 25px rgba(219, 39, 119, 0.08);
}
body.theme-pastel-dream .center-card h1 {
  color: #be185d;
}
body.theme-pastel-dream .lock-icon-svg {
  stroke: #db2777;
}

/* 10. Starlight Night (Midnight Indigo & Violet) */
body.theme-starlight-night {
  --bg-color: #0b091a;
  --bg-card: #15112e;
  --accent-gold: #c7d2fe;
  --border-color: #251e50;
  --text-main: #eef2ff;
  --text-muted: #a5b4fc;
  background: radial-gradient(circle at 50% 10%, #1e1b4b 0%, #060510 100%) !important;
}
body.theme-starlight-night .door-image-wrapper {
  background: #15112e;
  border-color: #818cf8;
  box-shadow: 0 15px 35px rgba(129, 140, 248, 0.3);
}
body.theme-starlight-night .door-badge-tag {
  background: #4f46e5;
  color: #e0e7ff;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.5);
}

/* ========================================================
   ANIMATED FALLING SNOWFLAKES (CSS KEYFRAMES)
   ======================================================== */
.snow-falling-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.snow-particle {
  position: absolute;
  top: -30px;
  color: #ffffff;
  opacity: 0.85;
  user-select: none;
  pointer-events: none;
  animation-name: animSnowfall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes animSnowfall {
  0% {
    transform: translateY(-20px) translateX(0) rotate(0deg);
    opacity: 0.85;
  }
  50% {
    transform: translateY(50vh) translateX(35px) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: translateY(105vh) translateX(-25px) rotate(360deg);
    opacity: 0.2;
  }
}

/* ========================================================
   TEMPLATE PICKER UI IN ADMIN
   ======================================================== */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.template-card-option {
  position: relative;
  background: #0b111a;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.template-card-option:hover {
  border-color: #64748b;
  transform: translateY(-2px);
}

.template-card-option input[type="radio"] {
  position: absolute;
  top: 12px;
  right: 12px;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.template-card-option.selected,
.template-card-option:has(input[type="radio"]:checked) {
  border-color: var(--accent-gold);
  background: #162438;
  box-shadow: 0 0 0 1px var(--accent-gold);
}

.template-swatch-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: calc(100% - 24px);
}

.template-swatch-bar span {
  flex: 1;
  height: 100%;
}

.template-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 4px;
  padding-right: 20px;
}

.template-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 10px;
}

.template-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  align-self: flex-start;
  margin-top: auto;
}

.template-tag-snow {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.template-tag-plain {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ========================================================
   OVERVIEW PAGE LAYOUTS (TREE, PRESENTS, CLOTHESLINE, DOORS)
   ======================================================== */
.overview-container {
  max-width: 860px;
  margin: 24px auto;
  padding: 16px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* 1. Tree Mode */
.tree-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 28px auto;
}

.tree-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tree-star {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle, #fef08a 0%, #eab308 60%, #ca8a04 100%);
  color: #451a03;
  text-decoration: none;
  box-shadow: 0 0 25px rgba(250, 204, 21, 0.85), 0 0 50px rgba(234, 179, 8, 0.4);
  border: 3px solid #ffffff;
  font-weight: 900;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 2;
}

.tree-star:hover {
  transform: scale(1.15);
  box-shadow: 0 0 35px rgba(250, 204, 21, 1);
}

.star-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.star-num {
  font-size: 1.15rem;
  font-weight: 900;
}

.tree-bauble {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  color: #ffffff;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: inset -3px -4px 7px rgba(0,0,0,0.5), inset 3px 3px 6px rgba(255,255,255,0.45), 0 4px 10px rgba(0,0,0,0.3);
  border: 1.5px solid rgba(255,255,255,0.3);
}

.tree-bauble:hover {
  transform: scale(1.15) translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}

.bauble-cap {
  position: absolute;
  top: -6px;
  width: 14px;
  height: 6px;
  background: linear-gradient(180deg, #d4d4d8 0%, #71717a 100%);
  border-radius: 2px;
  border: 1px solid #52525b;
}

.bauble-red {
  background: radial-gradient(circle at 35% 35%, #ef4444 0%, #b91c1c 65%, #7f1d1d 100%);
}
.bauble-gold {
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #eab308 65%, #a16207 100%);
  color: #451a03;
}
.bauble-green {
  background: radial-gradient(circle at 35% 35%, #22c55e 0%, #15803d 65%, #14532d 100%);
}
.bauble-blue {
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #0284c7 65%, #075985 100%);
}
.bauble-purple {
  background: radial-gradient(circle at 35% 35%, #c084fc 0%, #7e22ce 65%, #581c87 100%);
}
.bauble-silver {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #94a3b8 65%, #475569 100%);
  color: #0f172a;
}

.tree-trunk {
  font-size: 2.3rem;
  margin-top: 6px;
  line-height: 1;
}

/* 2. Presents Mode */
.presents-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 28px auto;
}

.presents-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.present-box {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  width: 64px;
  height: 58px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  transition: all 0.2s ease;
  overflow: hidden;
}

.present-box:hover {
  transform: translateY(-5px) scale(1.08);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}

.present-crown {
  width: 95px;
  height: 80px;
  font-size: 1.6rem;
  overflow: visible !important;
  border: 2px solid #fef08a;
  box-shadow: 0 0 25px rgba(250, 204, 21, 0.65);
  z-index: 2;
}

.present-bow {
  position: absolute;
  top: -18px;
  font-size: 1.8rem;
  line-height: 1;
  z-index: 3;
}

.present-ribbon-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  background: rgba(255,255,255,0.4);
  left: calc(50% - 4px);
}

.present-ribbon-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: rgba(255,255,255,0.4);
  top: calc(50% - 4px);
}

.present-gold {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #451a03;
}
.box-red {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}
.box-green {
  background: linear-gradient(135deg, #16a34a, #14532d);
}
.box-blue {
  background: linear-gradient(135deg, #0284c7, #075985);
}
.box-purple {
  background: linear-gradient(135deg, #9333ea, #581c87);
}
.box-teal {
  background: linear-gradient(135deg, #0d9488, #115e59);
}

/* 3. Clothesline Mode */
.clothesline-layout {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin: 30px auto;
  max-width: 820px;
}

.clothesline-wire {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  border-top: 2px dashed rgba(255,255,255,0.4);
  padding-top: 14px;
  position: relative;
  gap: 8px;
  flex-wrap: wrap;
}

.clothesline-item-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clothespin {
  width: 6px;
  height: 16px;
  background: #b45309;
  border-radius: 2px;
  position: absolute;
  top: -14px;
  left: calc(50% - 3px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  z-index: 2;
}

.clothesline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 8px;
  padding: 6px 10px;
  width: 66px;
  height: 72px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
  position: relative;
}

.clothesline-item:hover {
  transform: translateY(3px) rotate(3deg);
}

.item-graphic {
  font-size: 1.5rem;
  line-height: 1;
}

.item-num {
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent-gold);
}

.item-24-special {
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), var(--bg-card));
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.5);
}

/* 4. Doors Wall Mode */
.doors-wall-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 14px;
  margin: 30px auto;
  max-width: 820px;
}

.calendar-wall-door {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.35rem;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  transition: all 0.2s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  position: relative;
}

.calendar-wall-door:hover {
  transform: scale(1.08);
  border-color: var(--accent-gold);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.wall-door-24 {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, #ca8a04 0%, var(--bg-card) 100%);
  color: #fff;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.wall-door-status {
  font-size: 0.8rem;
  margin-top: 2px;
}

/* Shared Door Badges */
.lock-mini {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.75rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 50%;
  padding: 2px;
}

.door-locked {
  opacity: 0.88;
}

.door-open {
  opacity: 1;
}

