/* ---------- DASHBOARD CONTAINER FIX ---------- */
/* Wrap the dashboard in a container that stays within the white area */

/* Create a content container that stays within the white area */
.content-safe-zone {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.carousel {
  display: flex;
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 20px;
  justify-content: center;
}

.category-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 15px;
  position: relative;
  justify-content: center;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 5px;
  margin-top: 5px;
  font-family: 'Cabin', sans-serif;
}

.template-container {
  position: relative;
  width: 794px;
  max-width: 100%;
  margin: 10px auto;
  
  /* CRITICAL: This ensures the container maintains aspect ratio */
  aspect-ratio: 794/1123;
  
  /* IMPROVED: Better centering and scaling */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1600px) {
  .content-safe-zone {
    padding: 0 60px;
  }
}

@media (max-width: 1400px) {
  .content-safe-zone {
    padding: 0 80px;
    max-width: 1000px;
  }
}

@media (max-width: 1200px) {
  .content-safe-zone {
    padding: 0 100px;
    max-width: 900px;
  }
}

@media (max-width: 1024px) {
  .content-safe-zone {
    padding: 0 120px;
    max-width: 700px;
  }
  
  .template-container {
    width: 600px;
    margin: 10px auto;
  }
}

@media (max-width: 900px) {
  .content-safe-zone {
    padding: 0 80px;
    max-width: 600px;
  }
  
  .template-container {
    width: 500px;
    margin: 10px auto;
  }
}

@media (max-width: 768px) {
  .content-safe-zone {
    padding: 0 60px;
    max-width: 500px;
  }
  
  .info-row {
    flex-direction: column;
    gap: 5px;
  }
  
  .carousel {
    justify-content: flex-start;
  }
  
  .category-tabs {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  .template-container {
    width: 400px;
    margin: 10px auto;
  }
}

@media (max-width: 600px) {
  .content-safe-zone {
    padding: 0 40px;
    max-width: 400px;
  }
  
  .template-container {
    width: 320px;
    margin: 10px auto;
  }
}

@media (max-width: 480px) {
  .content-safe-zone {
    padding: 0 30px;
    max-width: 350px;
  }
  
  .template-container {
    width: 280px;
    margin: 10px auto;
  }
}

/* Dashboard with background */
.personal-info-dashboard {
  max-width: 1600px;
  margin: 0 auto;
  margin-bottom: 10px;
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
  font-size: 14px;
  position: relative;
  word-wrap: break-word;
  
  /* Background image */
  background-image: url('dashboard-background.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
  padding: 40px 60px;
  min-height: 200px;
}

/* UPDATED: Make info rows responsive and prevent overflow */
.info-row span {
  color: #333;
  font-weight: 400;
  white-space: nowrap;
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  
  /* FORCE each span to its own line */
  display: block;
  margin-bottom: 28px;
  
  /* ADD blue line under each text line */
  border-bottom: 1px solid #4A90E2;
  padding-bottom: 6px;
}


@media (max-width: 1200px) {
  .info-row {
    flex-direction: column;
    gap: 5px;
  }
  
  .info-row span {
    white-space: normal;
    max-width: 100%; /* Full width on mobile */
  }
  
  .personal-info-dashboard {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .personal-info-dashboard {
    font-size: 11px;
  }
  
  .info-row span {
    /* On very small screens, allow text to break at any point if needed */
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* Also fix the top navigation to stay in safe zone */
.top-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 15px;
  font-family: 'Cabin', sans-serif;
  max-width: 1200px; /* Constrain width */
  margin-left: auto;
  margin-right: auto;
  padding: 0 40px;
  box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
  .content-safe-zone,
  .top-nav-row {
    padding: 0 30px;
  }
}

@media (max-width: 1024px) {
  .content-safe-zone,
  .top-nav-row {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .content-safe-zone,
  .top-nav-row {
    padding: 0 15px;
  }
}


/* ---------- CENTERED ALIGNMENT AND CLEAR BACKGROUND FIX ---------- */
/* Add this CSS to fix the left alignment and remove white backgrounds */

/* Keep the yellow border background */
body {
  font-family: 'Cabin', sans-serif;
  margin: 0;
  padding: 20px 20px 300px 20px;
  
  /* DESKTOP: Yellow border background for full screens */
  border-image: url('yellow-border-expandable.svg') 400 135 600 135 stretch;
  border-image-width: 400px 135px 600px 135px;
  border-style: solid;
  border-color: transparent;
}

/* REMOVE all white backgrounds that are blocking the SVG */
.logo,
.top-nav-row,
.carousel,
.category-tabs,
.controls,
.template-container {
  background: transparent !important; /* Make all backgrounds clear */
  padding: 10px;
  margin: 5px 0;
  border-radius: 0; /* Remove rounded corners that might interfere */
}

/* Specifically center the logo */
/* Specifically center the logo */
.logo {
  height: 60px;
  margin-bottom: 10px; /* Extra space for scaling */
  margin-top: 75px; /* Extra space above */
  display: block;
  margin-left: auto;
  margin-right: auto;
  transform: scale(2); /* 2x larger on desktop */
}

/* Responsive logo scaling */
@media (max-width: 1024px) {
  .logo {
    transform: scale(1.5); /* Smaller on tablets */
    margin-top: 50px;
    margin-bottom: 8px;
  }
}

@media (max-width: 768px) {
  .logo {
    transform: scale(1.2); /* Even smaller on mobile */
    margin-top: 30px;
    margin-bottom: 5px;
  }
}

@media (max-width: 480px) {
  .logo {
    transform: scale(1); /* Normal size on small mobile */
    margin-top: 20px;
    margin-bottom: 5px;
  }
}

/* Center the carousel (template options) */
.carousel {
  display: flex;
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 20px;
  justify-content: center; /* Center the carousel */
}

/* Center the category tabs */
.category-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 15px;
  position: relative;
  justify-content: center; /* Center the tabs */
}

/* Center the controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center; /* Center the controls */
  margin-bottom: 5px;
  margin-top: 5px;
  font-family: 'Cabin', sans-serif;
}


/* Ensure top navigation stays properly aligned */
.top-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 15px;
  font-family: 'Cabin', sans-serif;
}

/* Responsive adjustments for the taller SVG */
@media (max-height: 1200px) {
  body {
    background-size: contain; /* Fit the full height on shorter screens */
  }
}

@media (max-width: 768px) {
  .carousel {
    justify-content: flex-start; /* On mobile, allow horizontal scroll */
  }
  
  .category-tabs {
    justify-content: flex-start; /* On mobile, allow horizontal scroll */
    flex-wrap: wrap;
  }
}

@import url('https://fonts.googleapis.com/css2?family=Cabin:wght@400;500;600;700&display=swap');
@font-face { font-family:'Dotted'; src:url('DN KidLetters Dotted.ttf'); }
@font-face { font-family:'DotGuided'; src:url('DN KidLetters DotGuided.ttf'); }
@font-face { font-family:'ArrowDot'; src:url('DN KidLetters ArrowDot.ttf'); }
@font-face { font-family:'ArrowDotLine'; src:url('DN KidLetters ArrowDotLine.ttf'); }

* {
  font-family: 'Cabin', sans-serif;
  letter-spacing: 0.8px;
  font-size: 16px;
}

body {
  font-family: 'Cabin', sans-serif;
  margin: 0;
  padding: 20px 20px 300px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  letter-spacing: 0.8px;
  font-size: 16px;
}

logo {
  height: 60px;
  margin-bottom: 10px; /* Extra space for scaling */
  margin-top: 100px; /* Extra space above */
  transform: scale(1.75); /* 2.5x larger */
}

.top-bar {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  font-family: 'Cabin', sans-serif;
}

.top-bar * {
  font-family: 'Cabin', sans-serif;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 5px;
  margin-top: 5px;
  font-family: 'Cabin', sans-serif;
}

.controls label {
  font-family: 'Cabin', sans-serif;
  font-weight: 500;
}

.controls select {
  font-family: 'Cabin', sans-serif;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  color: #000;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="5" viewBox="0 0 8 5"><path fill="%23000" d="M4 5L0 1h8z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 8px 5px;
  padding-right: 28px;
  height: 36px;
  letter-spacing: 0.5px;
}

.controls select:focus {
  border-color: #999;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.carousel {
  display: flex;
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 20px;
}

.carousel img {
  height: 120px;
  margin-right: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border .3s;
}

.carousel img.selected {
  border-color: #000;
}

.category-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 15px;
  position: relative;
}

.tab-button {
  padding: 12px 20px;
  border: none;
  background: white;
  color: #000;
  cursor: pointer;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Cabin', sans-serif;
  transition: all 0.3s;
  position: relative;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.tab-button:hover {
  background: #f5f5f5;
  box-shadow: 0 -3px 6px rgba(0,0,0,0.15);
}

.tab-button.active {
  background: #000;
  color: white;
  box-shadow: 0 -4px 8px rgba(0,0,0,0.2);
  z-index: 2;
}

.tab-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: white;
  color: #000;
  box-shadow: 0 -1px 2px rgba(0,0,0,0.05);
}


.template-container.landscape {
  width: 1123px;  /* Wider for landscape */
  max-width: 100%;
  aspect-ratio: 1123/794; /* Landscape aspect ratio */
}

.template-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.editable-text {
  position: absolute;
  font-size: 55px;
  color: black;
  outline: none;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  user-select: text;
  opacity: 0.5;
  font-family: 'Dotted', monospace;
  line-height: 1.2;
  word-wrap: break-word;
  padding: 0;
  margin: 0;
  border: none;
  overflow: hidden;
  resize: none;
}

/* REPLACE your .persistent-text-area CSS with this COMPLETELY INVISIBLE version: */

.persistent-text-area {
  position: absolute !important;
  font-size: 55px;
  color: black !important;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  user-select: text;
  pointer-events: auto;
  opacity: 0.5;
  font-family: 'Dotted', monospace;
  line-height: 1.2;
  word-wrap: break-word;
  padding: 4px;
  margin: 0;
  overflow: hidden;
  z-index: 10;
  cursor: text;
  /* COMPLETELY INVISIBLE - No borders, backgrounds, or outlines */
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  font-size: 56px; /* Default - controlled by JavaScript */
}

/* ONLY show visual feedback on hover - and make it very subtle */
.persistent-text-area:hover {
  /* Very subtle shadow that won't print */
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.1));
}

/* Active text area - use only filter effects that don't print */
.active-text-area {
  z-index: 50;
  /* Use filter instead of border/background */
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.2)) !important;
  opacity: 0.7 !important;
}

/* Focus state - minimal visual feedback */
.persistent-text-area:focus {
  outline: none !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  /* Subtle filter effect only */
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.15));
  opacity: 0.8 !important;
}

/* Placeholder text - very subtle */
.persistent-text-area:empty::before {
  content: "Click here to start typing...";
  color: rgba(0, 0, 0, 0.2) !important;
  font-style: italic;
  font-size: 0.5em;
  pointer-events: none;
  line-height: 1.4;
}

.persistent-text-area:focus:empty::before {
  content: "";
}

/* Hide placeholder during PDF generation */
.pdf-generation .persistent-text-area:empty::before {
  display: none !important;
  content: "" !important;
}

/* FORCE invisible in print/PDF */
@media print {
  .persistent-text-area {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
  }
  
  .persistent-text-area:hover,
  .persistent-text-area:focus,
  .active-text-area {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
  }
  
  .persistent-text-area:empty::before {
    display: none !important;
    content: "" !important;
  }
}

.watermark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
  display: none;
  overflow: hidden;
}

.watermark-text {
  position: absolute;
  font-family: Arial, sans-serif;
  font-size: 36px;
  font-weight: bold;
  color: rgba(150, 150, 150, 0.4);
  transform: rotate(-45deg);
  user-select: none;
  white-space: nowrap;
  transform-origin: center center;
}

/* Template-locked watermarks for all template sizes */
.template-container .watermark,
.template-container.landscape .watermark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}
/* ADD this CSS to your styles.css to make watermarks crisp in PDFs */

/* Ensure watermarks render crisply */
.watermark-small {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Enhanced PDF rendering */
@media print {
  .watermark-small {
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
    print-color-adjust: exact;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    /* Force higher resolution for PDF */
    transform-origin: center center;
    will-change: transform;
  }
  
  .universal-svg-watermark {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

#downloadBtn {
  padding: 8px 12px;
  background: #000;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 5px;
  font-family: 'Cabin', sans-serif;
  height: 36px;
  min-width: 120px;
  letter-spacing: 0.5px;
}

#downloadBtn:hover:not([disabled]) {
  background: #333;
}

#downloadBtn:disabled {
  background: #999;
  opacity: 0.6;
  cursor: not-allowed;
}

/* Developer Tools - Only shown in dev mode */
.dev-tools {
  display: none;
}

.dev-mode .dev-tools {
  display: inline-block;
}

#templateBuilderBtn {
  padding: 8px 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 5px;
  font-family: 'Cabin', sans-serif;
  height: 36px;
  min-width: 140px;
  letter-spacing: 0.5px;
}

#templateBuilderBtn:hover:not([disabled]) {
  background: #0056b3;
}

#templateBuilderBtn.active {
  background: #dc3545;
}

#templateBuilderBtn.active:hover {
  background: #c82333;
}

#addTextBoxBtn {
  padding: 8px 12px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 5px;
  font-family: 'Cabin', sans-serif;
  height: 36px;
  min-width: 120px;
  letter-spacing: 0.5px;
}

#addTextBoxBtn:hover:not([disabled]) {
  background: #218838;
}

#addTextBoxBtn:disabled {
  background: #999;
  opacity: 0.6;
  cursor: not-allowed;
}

/* Template Builder Styles */
.template-builder-box {
  position: absolute;
  border: 3px solid #007bff;
  background: rgba(0, 123, 255, 0.1);
  cursor: move;
  z-index: 100;
  min-width: 50px;
  min-height: 50px;
}

.template-builder-box.selected {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
  z-index: 101;
}

.resize-handle {
  position: absolute;
  background: #007bff;
  border: 2px solid white;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.template-builder-box.selected .resize-handle {
  background: #dc3545;
}

.resize-handle.nw { top: -6px; left: -6px; cursor: nw-resize; }
.resize-handle.ne { top: -6px; right: -6px; cursor: ne-resize; }
.resize-handle.sw { bottom: -6px; left: -6px; cursor: sw-resize; }
.resize-handle.se { bottom: -6px; right: -6px; cursor: se-resize; }
.resize-handle.n { top: -6px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.resize-handle.s { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.resize-handle.w { top: 50%; left: -6px; transform: translateY(-50%); cursor: w-resize; }
.resize-handle.e { top: 50%; right: -6px; transform: translateY(-50%); cursor: e-resize; }

.coordinates-display {
  position: absolute;
  top: -40px;
  left: 0;
  background: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Cabin', sans-serif;
  white-space: nowrap;
  z-index: 101;
}

.template-builder-box.selected .coordinates-display {
  background: #dc3545;
}

.box-label {
  position: absolute;
  top: -20px;
  right: 0;
  background: #333;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-family: 'Cabin', sans-serif;
  font-weight: bold;
}

.template-builder-box.selected .box-label {
  background: #dc3545;
}

.builder-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.builder-controls button {
  padding: 8px 12px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Cabin', sans-serif;
  font-weight: 500;
}

.save-coords-btn {
  background: #28a745;
  color: white;
}

.save-coords-btn:hover {
  background: #218838;
}

.cancel-builder-btn {
  background: #dc3545;
  color: white;
}

.cancel-builder-btn:hover {
  background: #c82333;
}

.delete-box-btn {
  background: #ffc107;
  color: #333;
}

.delete-box-btn:hover {
  background: #e0a800;
}

.delete-box-btn:disabled {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

.dev-indicator {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Cabin', sans-serif;
  z-index: 1000;
  display: none;
}

.dev-mode .dev-indicator {
  display: block;
}

/* Text area selector for multi-text box templates */
.text-area-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  justify-content: center;
}

.text-area-btn {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'Cabin', sans-serif;
  transition: all 0.3s;
}

.text-area-btn.active {
  background: #000;
  color: white;
  border-color: #000;
}

.text-area-btn:hover:not(.active) {
  background: #f5f5f5;
}


#buySubscriptionBtn:hover {
  background: #333;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 320px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  position: relative;
  font-family: 'Cabin', sans-serif;
}

.tabs {
  display: flex;
  margin-bottom: 16px;
}

.tabs button {
  flex: 1;
  padding: 8px;
  border: none;
  background: #eee;
  cursor: pointer;
  border-radius: 6px;
  margin: 0 2px;
  font-family: 'Cabin', sans-serif;
}

.tabs button.active {
  background: #000;
  color: white;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input[type=email], input[type=password] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  font-family: 'Cabin', sans-serif;
}

.modal-content button[type=submit] {
  padding: 10px;
  border: none;
  background: #111;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Cabin', sans-serif;
}

.close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.forgot-link {
  color: #007bff;
  cursor: pointer;
  text-decoration: underline;
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
}

.forgot-link:hover {
  color: #0056b3;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 14px;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 14px;
}

.purchase-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.purchase-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  width: 480px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  position: relative;
  font-family: 'Cabin', sans-serif;
}

.purchase-modal h2 {
  margin: 0 0 24px 0;
  text-align: center;
  color: #333;
  font-family: 'Cabin', sans-serif;
}

.credit-packages {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.credit-package {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.credit-package:hover {
  border-color: #000;
  background: #f8f8f8;
}

.credit-package.selected {
  border-color: #000;
  background: #f0f0f0;
}

.credit-package.popular {
  border-color: #000;
}

.credit-package.popular::before {
  content: "Most Popular";
  position: absolute;
  top: -10px;
  left: 20px;
  background: #000;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  font-family: 'Cabin', sans-serif;
}

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

.package-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  font-family: 'Cabin', sans-serif;
}

.package-price {
  font-size: 24px;
  font-weight: bold;
  color: #000;
  font-family: 'Cabin', sans-serif;
}

.package-description {
  color: #666;
  font-size: 14px;
  font-family: 'Cabin', sans-serif;
}

.package-value {
  color: #000;
  font-size: 12px;
  font-weight: bold;
  margin-top: 4px;
  font-family: 'Cabin', sans-serif;
}

.purchase-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.purchase-actions button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  font-family: 'Cabin', sans-serif;
}

.btn-primary {
  background: #000;
  color: white;
}

.btn-primary:hover {
  background: #333;
}

.btn-primary:disabled {
  background: #999;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: #000;
  border: 1px solid #000;
}

.btn-secondary:hover {
  background: #f5f5f5;
}

.logoutBtn,
#buySubscriptionBtn,
#logoutBtn {
  background: #000;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 10px;
  font-family: 'Cabin', sans-serif;
  height: 36px;
  min-width: 120px;
  font-size: 14px;
  box-sizing: border-box;
  vertical-align: middle;
}

.logoutBtn:hover,
#buySubscriptionBtn:hover,
#logoutBtn:hover {
  background: #333;
}

/* Subscription Info */
.subscription-info {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 10px 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-family: 'Cabin', sans-serif;
  text-align: center;
}

.subscription-info span {
  font-weight: 600;
  color: #000;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .personal-dashboard {
    min-width: 350px;
    padding: 14px 16px;
  }
  
  .welcome-greeting {
    font-size: 16px;
  }
  
  .stat-item {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .personal-dashboard {
    min-width: 280px;
    padding: 12px 14px;
  }
  
  .dashboard-stats {
    gap: 4px;
  }
  
  .stat-item {
    font-size: 11px;
  }
  
  .subscription-info {
    margin: 8px 10px;
    padding: 10px 12px;
  }
}

/* Loading States */
.stat-loading {
  color: #adb5bd !important;
  font-style: italic;
}

.nav-spacer {
  flex: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-actions a {
  color: #000;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Cabin', sans-serif;
  white-space: nowrap;
}

.nav-actions a:hover {
  text-decoration: underline;
}

.nav-actions button {
  background: #000;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Cabin', sans-serif;
  font-weight: 500;
  white-space: nowrap;
}

.nav-actions button:hover {
  background: #333;
}

#accountBtn {
  background: #000;
  color: white;
}

/* Welcome message gets special styling but keeps Courier font */
#welcomeMessage {
  font-weight: 600 !important;
  color: #000 !important;
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace !important;
}

/* All spans should use Courier font */
#memberSince,
#lastDownload,
#topWords,
#favoritePhrase {
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace !important;
  color: #333 !important;
}

/* Subscription Info - Also with small left buffer and Courier font */
.subscription-info {
  background: transparent;
  border: none;
  padding: 0;
  margin: 5px 0 15px 20px;
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace !important;
  font-size: 14px;
  text-align: left;
}

.subscription-info span {
  color: #666;
  font-weight: 400;
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .nav-actions {
    gap: 15px;
  }
  
  .nav-actions button {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .info-row {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .nav-actions {
    gap: 10px;
  }
  
  .nav-actions button {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .info-row span {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .nav-actions {
    flex-direction: column;
    gap: 8px;
  }
}

/* Force hide duplicate subscription display */
#subscriptionInfo {
  display: none !important;
  visibility: hidden !important;
}

/* Text Overflow Warning Styles */
.text-overflow-warning {
  animation: slideDown 0.3s ease-out;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  font-weight: 500;
}

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

/* Ensure text areas show scroll indicators when needed */
.persistent-text-area {
  overflow-y: auto;
  /* Keep existing styles */
}

/* Hide scrollbar in print/PDF mode */
@media print {
  .persistent-text-area {
    overflow: hidden !important;
  }
  
  .text-overflow-warning {
    display: none !important;
  }
  
}
/* Universal SVG Watermark Styles */
.universal-svg-watermark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}

.watermark-center {
  /* Styles are applied inline for maximum flexibility */
}

/* Responsive watermark sizing */
@media (max-width: 768px) {
  .watermark-center {
    width: min(50vw, 200px) !important;
    height: min(50vw, 200px) !important;
    opacity: 0.1 !important;
  }
}

@media (max-width: 480px) {
  .watermark-center {
    width: min(60vw, 160px) !important;
    height: min(60vw, 160px) !important;
    opacity: 0.08 !important;
  }
}

/* Ensure watermarks don't interfere with text editing */
.universal-svg-watermark,
.watermark-center {
  pointer-events: none;
  user-select: none;
}

/* Print/PDF optimization */
@media print {
  .universal-svg-watermark,
  .watermark-center {
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
    print-color-adjust: exact;
  }
}
/* ---------- STARTER KIT PAGE STYLES ---------- */

.starter-kit-header {
  text-align: center;
  margin: 20px 0 30px 0;
  max-width: 800px;
}

.starter-kit-header h1 {
  color: #333;
  font-size: 28px;
  margin-bottom: 10px;
  font-family: 'Cabin', sans-serif;
  font-weight: 600;
}

.starter-kit-header p {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  font-family: 'Cabin', sans-serif;
}

.starter-kit-viewer {
  margin: 20px 0;
  width: 100%;
  max-width: 900px;
}

.pdf-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 30px;
}

.pdf-embed {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 8px;
}

.starter-kit-download {
  text-align: center;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  max-width: 700px;
  width: 100%;
  margin: 20px 0;
}

.starter-kit-download h2 {
  color: #333;
  font-size: 24px;
  margin-bottom: 10px;
  font-family: 'Cabin', sans-serif;
}

.starter-kit-download > p {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 25px;
}

.starter-kit-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 25px 0;
  text-align: left;
}

.feature-item {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.feature-item h3 {
  color: #000;
  margin: 0 0 8px 0;
  font-size: 16px;
  font-family: 'Cabin', sans-serif;
}

.feature-item p {
  color: #666;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.download-actions {
  text-align: center;
  margin-top: 25px;
}

.download-btn {
  background: #000;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-family: 'Cabin', sans-serif;
  transition: background 0.3s;
}

.download-btn:hover {
  background: #333;
}

.download-note {
  margin-top: 15px;
  color: #666;
  font-size: 14px;
  font-family: 'Cabin', sans-serif;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .starter-kit-header h1 {
    font-size: 24px;
  }
  
  .starter-kit-header p {
    font-size: 14px;
  }
  
  .pdf-embed {
    height: 400px;
  }
  
  .download-btn {
    font-size: 16px;
    padding: 12px 24px;
  }
  
  .starter-kit-features {
    grid-template-columns: 1fr;
  }
}
/* ---------- LORA FONT OVERRIDE FOR STARTER KIT PAGE ---------- */

/* Apply Lora to the starter kit page only */
.starter-kit-header,
.starter-kit-download,
.feature-item,
.download-actions {
  font-family: 'Lora', serif !important;
}

.starter-kit-header h1 {
  font-family: 'Lora', serif !important;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.starter-kit-header p {
  font-family: 'Lora', serif !important;
  font-weight: 400;
  line-height: 1.7;
}

.starter-kit-download h2 {
  font-family: 'Lora', serif !important;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.starter-kit-download > p {
  font-family: 'Lora', serif !important;
  font-weight: 400;
  line-height: 1.7;
}

.feature-item h3 {
  font-family: 'Lora', serif !important;
  font-weight: 600;
}

.feature-item p {
  font-family: 'Lora', serif !important;
  font-weight: 400;
  line-height: 1.6;
}

.download-btn {
  font-family: 'Lora', serif !important;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.download-note {
  font-family: 'Lora', serif !important;
  font-weight: 400;
}

/* Keep navigation in Cabin for consistency with main app */
.nav-actions,
.nav-actions a,
.nav-actions button {
  font-family: 'Cabin', sans-serif !important;
}
