html,
body {
  height: 100%;
  overflow: hidden;
}
/* --- Default Theme (Root) --- */
:root {
  --bg-light: #f0f2f5;
  --bg-dark: #121212;
  --card-bg-light: #ffffff;
  --card-bg-dark: #1e1e1e;
  --text-light: #1c1e21;
  --text-dark: #e4e6eb;
  --text-secondary-light: #65676b;
  --text-secondary-dark: #b0b3b8;
  --border-light: #dadde1;
  --border-dark: #3e4042;
  --highlight: #37ff00; /* Main theme color changed as requested */
  --danger: #fa383e;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --chart-grid-light: rgba(0, 0, 0, 0.1);
  --chart-grid-dark: rgba(255, 255, 255, 0.1);
  --anniversary-color: #9966ff;
}
body:not([class*="theme-"]):not(.dark) {
  --highlight: #0e5814;
}
/* --- Monokai Theme --- */
body.theme-monokai {
  --bg-light: #f9f8f5;
  --card-bg-light: #f9f8f5;
  --text-light: #49483e;
  --border-light: #d0cec5;
  --highlight: #f92672;
  --anniversary-color: #66d9ef;
}
body.theme-monokai.dark {
  --bg-dark: #272822;
  --card-bg-dark: #272822;
  --text-dark: #f8f8f2;
  --border-dark: #49483e;
  --highlight: #f92672;
  --anniversary-color: #66d9ef;
}

/* --- Solarized Theme --- */
body.theme-solarized {
  --bg-light: #fdf6e3;
  --card-bg-light: #fdf6e3;
  --text-light: #657b83;
  --border-light: #eee8d5;
  --highlight: #d33682;
  --anniversary-color: #2aa198;
}
body.theme-solarized.dark {
  --bg-dark: #002b36;
  --card-bg-dark: #002b36;
  --text-dark: #839496;
  --border-dark: #073642;
  --highlight: #d33682;
  --anniversary-color: #2aa198;
}

/* --- Dracula Theme --- */
body.theme-dracula {
  --bg-light: #f8f8f2;
  --card-bg-light: #f8f8f2;
  --text-light: #44475a;
  --border-light: #e3e3e3;
  --highlight: #ff79c9;
  --anniversary-color: #8be9fd;
}
body.theme-dracula.dark {
  --bg-dark: #282a36;
  --card-bg-dark: #282a36;
  --text-dark: #f8f8f2;
  --border-dark: #44475a;
  --highlight: #ff79c9;
  --anniversary-color: #8be9fd;
}

/* --- Nord Theme --- */
body.theme-nord {
  --bg-light: #eceff4;
  --card-bg-light: #eceff4;
  --text-light: #2e3440;
  --border-light: #d8dee9;
  --highlight: #b48ead;
  --anniversary-color: #88c0d0;
}
body.theme-nord.dark {
  --bg-dark: #2e3440;
  --card-bg-dark: #2e3440;
  --text-dark: #eceff4;
  --border-dark: #4c566a;
  --highlight: #b48ead;
  --anniversary-color: #88c0d0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background-color 0.3s, color 0.3s;
  -webkit-tap-highlight-color: transparent;
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

#app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* --- NEW: Header Styles --- */
#main-header {
  padding: 8px 16px;
  background-color: var(--card-bg-light);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
body.dark #main-header {
  background-color: var(--card-bg-dark);
  border-bottom: 1px solid var(--border-dark);
}
#header-view-control {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background-color 0.2s;
  margin-left: auto;
  flex-direction: row-reverse;
}
#header-brand h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  color: var(--highlight);
  white-space: nowrap;
}
#app-mode-indicator {
  font-size: 0.6rem;
  font-weight: 400; /* 400 is the numeric value for normal weight */
  color: var(--text-secondary-light);
  margin-left: 4px; /* Adds a little space after the title */
  text-transform: uppercase; /* Ensures FREE or PLUSH is always uppercase */
}

body.dark #app-mode-indicator {
  color: var(--text-secondary-dark);
}

#header-view-control:active {
  background-color: color-mix(in srgb, var(--border-light), black 20%);
}
body.dark #header-view-control:active {
  background-color: var(--bg-dark);
}
#header-view-icon svg {
  width: 24px;
  height: 24px;
  color: var(--highlight);
}
#header-view-name {
  text-align: right;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary-light);
}
body.dark #header-view-name {
  color: var(--text-secondary-dark);
}
/* --- End Header Styles --- */

#cards-container,
#calendar-container,
#reports-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px 8px 150px 8px; /* Space for control center */
}

#calendar-container,
#reports-container {
  display: none; /* Hidden by default */
}

#app-container.calendar-view-active #calendar-container {
  padding: 0 0 150px 0;
}

#reports-container {
  padding: 16px 16px 150px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.report-card {
  background-color: var(--card-bg-light);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}
body.dark .report-card {
  background-color: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
}
.report-card h3 {
  margin: 0 0 16px 0;
  text-align: center;
  font-size: 1.1rem;
  color: var(--highlight);
}
.chart-wrapper {
  position: relative;
  flex-grow: 1;
  min-height: 250px;
}

/* --- Quick Stats Card Styles --- */
.stats-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-grow: 1;
  padding: 16px 0;
}
.stat-item {
  text-align: center;
}
.stat-value {
  display: block;
  font-size: 4rem;
  font-weight: 700;
  color: var(--highlight);
}
.stat-label {
  font-size: 1rem;
  color: var(--text-secondary-light);
}
body.dark .stat-label {
  color: var(--text-secondary-dark);
}

/* --- Calendar Styling --- */
.fc-daygrid-event .fc-event-title {
  white-space: normal !important;
  color: #000 !important;
}
.fc .fc-button {
  background-color: #e4e6eb;
  color: #1c2121;
  border: none;
}
body.dark .fc .fc-button {
  background-color: #4e4f50;
  color: var(--text-dark);
}
.fc-theme-standard .fc-list-day-cushion {
  background-color: var(--bg-light);
}
body.dark .fc-theme-standard .fc-list-day-cushion {
  background-color: var(--bg-dark);
}
#calendar-container .fc {
  border: none;
}
#calendar-container .fc .fc-toolbar-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--highlight);
}
.fc-toolbar-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary-light);
  font-weight: 500;
  margin-top: 4px;
}
body.dark .fc-toolbar-subtitle {
  color: var(--text-secondary-dark);
}
#calendar-container .fc .fc-daygrid-day-number {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px;
}
#calendar-container .fc .fc-day-today {
  background-color: var(--highlight) !important;
  opacity: 0.1;
}
#calendar-container .fc .fc-day-today .fc-daygrid-day-number {
  background-color: var(--highlight);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
}
#calendar-container .fc-event {
  border-radius: 4px;
  font-size: 1.2rem;
}
/* --- End Calendar Styling --- */

.card {
  background-color: var(--card-bg-light);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 0 auto 16px auto;
  max-width: 500px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

body.dark .card {
  background-color: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
}

.couple-container {
  border: 2px solid var(--highlight);
  background-color: var(--highlight);
  border-radius: 14px;
  padding: 8px;
  margin: 0 auto 16px auto;
  max-width: 500px;
}
.couple-container .card {
  margin-bottom: 8px;
  box-shadow: none;
}
.couple-container .card:last-child {
  margin-bottom: 0;
}

.card-header {
  padding: 12px 16px;
  cursor: pointer;
}

.card-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.person-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--highlight);
  font-family: inherit;
  width: 100%;
}

.person-details {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
  margin-top: 8px;
}
body.dark .person-details {
  color: var(--text-dark);
}
.person-details a {
  color: var(--highlight);
  text-decoration: none;
}

.person-details .highlight-number {
  color: var(--highlight);
  font-weight: 700;
}

.card-body-section {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
}
body.dark .card-body-section {
  border-top: 1px solid var(--border-dark);
}

/* --- Styles for collapsible cards --- */
.card .card-body-section {
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  border-top: none; /* Hide the border when collapsed */
}

.card.is-expanded .card-body-section {
  max-height: 1000px; /* A large value to allow for any content size */
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: 1px solid var(--border-light); /* Show the border again */
  transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

body.dark .card.is-expanded .card-body-section {
  border-top: 1px solid var(--border-dark);
}
/* --- End of collapsible card styles --- */

.card-body-section h3 {
  margin: 0;
  font-size: 1.2rem;
}

.card-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.card-actions {
  display: flex;
  gap: 20px;
}
.card-copy-btn {
  margin-right: 8px;
}
.summary-item {
  margin-bottom: 6px;
  line-height: 1.4;
}
.summary-item a {
  color: var(--highlight);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.summary-item .child-item {
  padding-left: 20px;
}

.notes-content {
  white-space: pre-wrap;
  font-style: italic;
}

.card-edit-toggle,
.card-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary-light);
  font-size: 1.5rem;
  padding: 8px; /* Increased padding for easier tapping */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; /* Standardized size */
  height: 40px;
  margin: -8px; /* Offset padding to maintain alignment */
}
body.dark .card-edit-toggle,
body.dark .card-copy-btn {
  color: var(--text-secondary-dark);
}
.card-edit-toggle svg,
.card-copy-btn svg {
  width: 24px;
  height: 24px;
}

.birthday-share-btn,
.anniversary-share-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  color: var(--highlight);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --- Original Upgrade Card Styles --- */
.card.upgrade-card {
  border: 2px solid var(--highlight);
}
.upgrade-card .person-details {
  color: var(--text-secondary-light);
}
body.dark .upgrade-card .person-details {
  color: var(--text-secondary-dark);
}
.learn-more-link {
  text-decoration: underline;
  font-weight: 700;
}
.upgrade-body-content {
  text-align: center;
}
.upgrade-body-content p {
  font-size: 1.1rem;
  margin-bottom: 24px;
}
#get-plush-btn {
  background-color: var(--highlight);
  color: var(--bg-dark);
  font-size: 1.2rem;
  font-weight: 700;
  width: 100%;
  padding: 14px;
}
/* --- End Original Upgrade Card Styles --- */

#control-center {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--card-bg-light);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
}
body.dark #control-center {
  background-color: var(--card-bg-dark);
  border-top: 1px solid var(--border-dark);
}

#search-panel {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
}
body.dark #search-panel {
  border-bottom: 1px solid var(--border-dark);
}

#search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
  font-size: 1.1rem;
  box-sizing: border-box;
  background-color: var(--card-bg-light);
  color: var(--text-light);
}
body.dark #search-input {
  background-color: #3a3b3c;
  border-color: #3a3b3c;
  color: var(--text-dark);
}

#bottom-nav-bar {
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
}
.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary-light);
  padding: 4px 12px;
  border-radius: 8px;
  flex-grow: 1;
}
body.dark .nav-btn {
  color: var(--text-secondary-dark);
}
.nav-btn svg {
  width: 28px;
  height: 28px;
}
.nav-btn.active,
.nav-btn:active {
  color: var(--highlight);
}
#nav-add-btn {
  color: var(--highlight);
}

.control-btn {
  background-color: #e4e6eb;
  color: #1c2121;
  border: none;
  border-radius: 9999px;
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s ease;
}
.control-btn:active {
  transform: scale(0.95);
}
.control-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

body.dark .control-btn {
  background-color: #4e4f50;
  color: var(--text-dark);
}

/* --- DIALOG (MODAL) STYLE OVERHAUL --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background-color: var(--card-bg-light);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 450px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}
body.dark .modal-content {
  background-color: var(--card-bg-dark);
}
.modal-header {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 24px 0;
}
.modal-body p {
  margin: 0 0 16px 0;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 1.05rem;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 1rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  font-size: 1rem;
  box-sizing: border-box;
  font-family: inherit;
  background-color: var(--card-bg-light);
  color: var(--text-light);
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}
body.dark .form-group input,
body.dark .form-group select,
body.dark .form-group textarea {
  background-color: #3a3b3c;
  border-color: #3a3b3c;
  color: var(--text-dark);
}

.form-group.checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.form-group.checkbox-group input[type="checkbox"] {
  width: 1.2em;
  height: 1.2em;
}
.form-group.checkbox-group label {
  margin-bottom: 0;
  font-weight: 500;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}
.modal-buttons button {
  flex-grow: 0;
  padding: 12px 20px;
  font-weight: 600;
  min-width: 100px;
}
.cancel-btn {
  background-color: #e4e6eb;
  color: #1c2121;
}
body.dark .cancel-btn {
  background-color: #4e4f50;
  color: var(--text-dark);
}

#alert-modal .modal-content {
  text-align: center;
}
#alert-modal #alert-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 8px;
}
body.dark #alert-modal #alert-title {
  color: var(--text-dark);
}
#alert-modal #alert-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary-light);
  white-space: normal;
}
body.dark #alert-modal #alert-text {
  color: var(--text-secondary-dark);
}
/* --- END DIALOG OVERHAUL --- */

#edit-modal-events-list .summary-item {
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
body.dark #edit-modal-events-list .summary-item {
  border: 1px solid var(--border-dark);
}
.summary-item-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.autocomplete-container {
  position: relative;
}
.autocomplete-suggestions {
  position: absolute;
  border: 1px solid var(--border-light);
  border-top: none;
  background-color: var(--card-bg-light);
  width: 100%;
  max-height: 150px;
  overflow-y: auto;
  z-index: 1001;
}
body.dark .autocomplete-suggestions {
  border: 1px solid var(--border-dark);
  background-color: var(--card-bg-dark);
}
.autocomplete-suggestions div {
  padding: 10px;
  cursor: pointer;
}
.autocomplete-suggestions div:hover {
  background-color: var(--highlight);
  color: white;
}

/* --- SLIDE-UP MENUS --- */
.slide-menu-overlay {
  align-items: flex-end;
}
.slide-menu-content {
  width: 100%;
  max-width: 100%;
  border-radius: 16px 16px 0 0;
  background-color: var(--bg-light);
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 -4px 12px rgba(0, 0, 0, 0.9);
}
body.dark .slide-menu-content {
  background-color: #242526;
}
.slide-menu-overlay.visible .slide-menu-content {
  transform: translateY(0);
}
.slide-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}
.slide-menu-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}
.slide-menu-header button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary-light);
  padding: 0;
}
body.dark .slide-menu-header button {
  color: var(--text-secondary-dark);
}

.slide-menu-body {
  padding: 0 18px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.menu-option-btn,
.menu-option-item {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.menu-option-btn {
  background-color: var(--card-bg-light);
  color: var(--text-light);
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  width: 100%;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
}
body.dark .menu-option-btn {
  background-color: var(--card-bg-dark);
  color: var(--text-dark);
}
.menu-option-btn svg {
  width: 24px;
  height: 24px;
  color: var(--highlight);
}

.menu-option-item {
  background-color: var(--card-bg-light);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
}
body.dark .menu-option-item {
  background-color: var(--card-bg-dark);
}
.menu-option-item select {
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
  font-family: inherit;
}
body.dark .menu-option-item select {
  color: var(--text-dark);
}
#theme-switcher option {
  color: var(--text-light);
}
/* Toggle Switch CSS */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 28px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--highlight);
}
input:checked + .slider:before {
  transform: translateX(22px);
}

/* Import Comparison Styles */
#choice-modal .modal-content {
  max-width: 700px;
}
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
}
.comparison-grid h4 {
  margin: 0 0 8px 0;
  color: var(--highlight);
}
.comparison-column {
  background-color: var(--bg-light);
  padding: 12px;
  border-radius: 8px;
}
body.dark .comparison-column {
  background-color: var(--bg-dark);
}
.comparison-column ul {
  padding-left: 20px;
  margin: 0;
}
.comparison-column li {
  margin-bottom: 4px;
}
.comparison-notes {
  white-space: pre-wrap;
  font-style: italic;
  border-left: 3px solid var(--border-light);
  padding-left: 8px;
  margin-top: 8px;
}
body.dark .comparison-notes {
  border-left-color: var(--border-dark);
}

/* Activity Log Styles */
#activity-log-modal .modal-content {
  max-width: 600px;
}
#activity-log-list {
  max-height: 50vh;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px;
}
body.dark #activity-log-list {
  border-color: var(--border-dark);
}
.log-entry {
  padding: 8px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
}
.log-entry[data-person-id] {
  cursor: pointer;
}
body.dark .log-entry {
  border-bottom-color: var(--border-dark);
}
.log-entry:last-child {
  border-bottom: none;
}
.log-entry-time {
  font-weight: 600;
  color: var(--highlight);
}
.log-entry-details {
  color: var(--text-secondary-light);
}
body.dark .log-entry-details {
  color: var(--text-secondary-dark);
}
.log-entry-action {
  margin-left: 8px;
  cursor: pointer;
  text-decoration: underline;
  color: var(--highlight);
}

/* Toast Notification Styles */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.toast-message {
  background-color: rgba(30, 30, 30, 0.9);
  color: white;
  padding: 12px 20px;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading Screen Styles */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-light);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-out;
}
body.dark #loading-overlay {
  background-color: var(--bg-dark);
}
#loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
#loading-logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--highlight);
  font-family: var(--font-family);
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid transparent;
  border-top: 4px solid var(--highlight);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
/* --- NEW: Gradient Upgrade Card --- */
.upgrade-card-gradient {
  position: relative;
  overflow: hidden; /* Crucial to contain the gradient */
  border-width: 2px;
  border-style: solid;
}

.upgrade-card-gradient .gradient-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Sits behind content */
}

.upgrade-card-gradient .gradient-circle {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: hard-light;
  /* Settings from screenshot */
  filter: blur(26px);
  opacity: 1;
}

#gc1 {
  background-color: var(--highlight);
  width: 250px;
  height: 250px;
  animation: move1 3.33s infinite alternate; /* 12s / 3.6 */
}
#gc2 {
  background-color: var(--anniversary-color);
  width: 350px;
  height: 350px;
  animation: move2 4.17s infinite alternate; /* 15s / 3.6 */
}
#gc3 {
  background-color: var(--danger);
  width: 300px;
  height: 300px;
  animation: move3 2.78s infinite alternate; /* 10s / 3.6 */
}

.upgrade-card-gradient .card-content {
  position: relative;
  z-index: 2; /* Sits on top of the gradient */
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px); /* Frosted glass */
}

body.dark .upgrade-card-gradient .card-content {
  background-color: rgba(30, 30, 30, 0.7);
}

/* Ensure content inside is styled correctly */
.upgrade-card-gradient .card-header {
  text-align: center;
}
.upgrade-card-gradient .person-details {
  text-decoration: none;
}
body.dark .upgrade-card-gradient .person-details {
  color: var(--text-dark);
}
.upgrade-card-gradient .upgrade-body-content p {
  color: var(--text-light);
}
body.dark .upgrade-card-gradient .upgrade-body-content p {
  color: var(--text-dark);
}
.upgrade-card-gradient #get-plush-btn {
  color: #000;
}

/* Keyframes for gradient movement */
@keyframes move1 {
  from {
    transform: translate(-50px, -50px);
  }
  to {
    transform: translate(200px, 150px);
  }
}
@keyframes move2 {
  from {
    transform: translate(250px, 200px);
  }
  to {
    transform: translate(-50px, -50px);
  }
}
@keyframes move3 {
  from {
    transform: translate(150px, -50px);
  }
  to {
    transform: translate(-50px, 200px);
  }
}
