body {
    font-family: 'Georgia', serif;
    line-height: 1.7;
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #f7f4ed;
    color: #5d5d5d;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.card {
    background: white;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
    transition: background-color 0.3s ease;
}

h1,
h2 {
    color: #4a4a4a;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    font-weight: normal;
}

.page-header h1, .page-header h2 {
    color: white;
    border-bottom-color: rgba(255,255,255,0.3);
    text-shadow: 1px 1px 3px rgb(0 0 0 / 40%);
}

.rubric {
    color: #a52a2a; /* Brown */
    font-style: italic;
    font-size: 0.9em;
}

.ref {
    font-weight: bold;
    color: #7f8c8d;
    font-size: 0.9em;
    display: block;
    margin-bottom: 10px;
}

.prayer-topic {
    color: #2980b9;
    font-weight: bold;
    font-size: 1.1em;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 5px 10px 0;
    background-color: #8a9a9a;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-family: inherit;
}

.button:hover {
    background-color: #798989;
    color: white;
}

.button:disabled,
.button:disabled:hover {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
}

/* Collapsible Styles */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.card-header h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin: 0;
    flex-grow: 1;
}

.toggle-icon {
    font-size: 1.5em;
    color: #7f8c8d;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.card.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.card-content {
    display: block;
    margin-top: 20px;
}

.card.collapsed .card-content {
    display: none;
}

/* Adjust padding/margins when collapsed */
.card.collapsed {
    padding-bottom: 15px;
    /* Less padding when collapsed */
}

.card-content .subheader {
    border-bottom: 1px solid #eee;
    padding-bottom: 3px;
    margin-bottom: 10px;
}

 .versicle-ref {
    font-size: 0.8em;
    color: #7f8c8d;
    text-align: right;
    display: block;
    margin-top: -10px;
    margin-bottom:10px;
}

#github-link img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

/* Prayer Wall */
.prayer-wall-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 20px 0 0 0;
  padding: 30px 15px; /* Padding around notes */
  background:
    radial-gradient(#a0522d 15%, transparent 16%) 0 0,
    radial-gradient(#a0522d 15%, transparent 16%) 8px 8px,
    radial-gradient(rgba(255,255,255,.15) 15%, transparent 20%) 0 1px,
    radial-gradient(rgba(255,255,255,.15) 15%, transparent 20%) 8px 9px;
  background-color:#d2b48c;
  background-size:16px 16px;
  border-radius: 8px;
  min-height: 300px;
  border-top: 1px solid #eee;
}

li.post-it {
  width: 210px;
  min-height: 210px;
  padding: 20px;
  margin: 15px;
  box-shadow: 3px 3px 6px rgba(0,0,0,.4);
  transition: all .2s ease-in-out;
  font-family: cursive, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-wrap: break-word;
  line-height: 1.5;
  font-size: 1.1em;
  color: #333;
}
li.post-it p { margin: 0; }
.post-it-text { flex-grow: 1; }
.post-it-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 10px;
}
.post-it-name { font-weight: bold; text-align: right; font-size: 0.9em; }

.pray-container {
  display: flex;
  align-items: center;
}
.pray-button {
  background: none;
  border: none;
  font-size: 1.8em; /* make emoji larger */
  cursor: pointer;
  padding: 0 5px 0 0;
  line-height: 1;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.2s ease;
  vertical-align: middle;
}
.pray-button:hover {
  filter: grayscale(50%);
  opacity: 1;
}
.pray-button.prayed,
.pray-button.prayed:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}
.pray-count {
  font-size: 0.9em;
  color: #333;
  min-width: 1em;
  text-align: left;
  font-family: 'Georgia', serif; /* match body */
}

li.post-it:hover {
  box-shadow:7px 7px 10px rgba(0,0,0,.5);
  transform: scale(1.1) rotate(0deg) !important;
  z-index: 5;
}

/* Colors and rotations */
.post-it:nth-child(5n+1) { transform: rotate(-5deg); background: #FFF9B1; } /* yellow */
.post-it:nth-child(5n+2) { transform: rotate(3deg); background: #C1FFC1; } /* green */
.post-it:nth-child(5n+3) { transform: rotate(-2deg); background: #AEC6CF; } /* blue */
.post-it:nth-child(5n+4) { transform: rotate(4deg); background: #FFD1DC; } /* pink */
.post-it:nth-child(5n)   { transform: rotate(1deg); background: #FFF9B1; } /* yellow */

.picker-toggle-button {
  margin: 15px 0 5px 0;
  padding: 8px 15px;
  font-size: 0.9em;
}

.item-picker {
  display: none; /* Hidden by default */
  flex-wrap: wrap;
  padding: 10px 0;
  gap: 5px;
  border-top: 1px dashed #eee;
  margin-top: 15px;
}
.item-picker.visible {
  display: flex;
}
.picker-select-button {
  padding: 5px 10px;
  min-width: 40px;
  font-size: 0.85em;
  background-color: #eee;
  color: #333;
  border: 1px solid #ccc;
  margin: 2px;
}
.picker-select-button:hover {
  background-color: #34495e;
  color: white;
}

/* Menu Button */
#menu-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2em; /* Hamburger icon size */
    cursor: pointer;
    z-index: 1000;
    color: #333;
    padding: 0;
    line-height: 1;
}
body.dark-mode #menu-button {
    color: #e0e0e0;
}

/* App Menu Modal */
#app-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    width: 260px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 0;
    z-index: 1001;
    overflow: hidden;
}
body.dark-mode #app-menu {
    background-color: #444;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.app-menu-section {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.app-menu-section:last-child {
    border-bottom: none;
}
body.dark-mode .app-menu-section {
    border-bottom-color: #555;
}
.app-menu-section strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #333;
    font-weight: bold;
}
body.dark-mode .app-menu-section strong {
    color: #eee;
}
.menu-profile {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.menu-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    border: 1px solid #ccc;
}
.menu-profile-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
}
.menu-profile-info strong {
     margin-bottom: 0;
     font-size: 1.1em;
}
.menu-profile-info span {
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.dark-mode .menu-profile-info span {
     color: #bbb;
}
.menu-button-full {
    display: block;
    width: 100%;
    margin: 10px 0 0 0;
    padding: 8px 15px;
    font-size: 0.9em;
    text-align: center;
    box-sizing: border-box;
}
.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 1em;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.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: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2980b9;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Dark Mode */
body.dark-mode {
    background-color: #333333;
    color: #cccccc;
}

body.dark-mode .card {
    background: #444444;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode h1,
body.dark-mode h2 {
    color: #eeeeee;
    border-bottom-color: #555555;
}

body.dark-mode .page-header h1, body.dark-mode .page-header h2 {
    color: white;
    border-bottom-color: rgba(255,255,255,0.3);
}

body.dark-mode .rubric {
    color: #ffb6c1; /* LightPink */
}

body.dark-mode .ref,
body.dark-mode .toggle-icon,
body.dark-mode .versicle-ref {
    color: #b0b0b0;
}

body.dark-mode .prayer-topic {
    color: #64b5f6; /* Lighter blue */
}

body.dark-mode .button {
    background-color: #666666;
    color: #eeeeee;
}

body.dark-mode .button:hover {
    background-color: #777777;
}

body.dark-mode .button:disabled,
body.dark-mode .button:disabled:hover {
  background-color: #333;
  color: #777;
}

body.dark-mode .card-content .subheader {
    border-bottom-color: #444;
}

body.dark-mode .picker-select-button {
  background-color: #444;
  color: #e0e0e0;
  border: 1px solid #666;
}
body.dark-mode .picker-select-button:hover {
  background-color: #555;
  color: white;
}
body.dark-mode .item-picker {
    border-top-color: #444;
}

body.dark-mode .prayer-wall-container {
    background-color:#4d4230; /* darker cork board */
    border-top-color: #444;
}
body.dark-mode li.post-it {
    color: #1a1a1a; /* dark text on light post-its */
    box-shadow: 3px 3px 6px rgba(0,0,0,.6);
}
body.dark-mode li.post-it:hover {
  box-shadow:7px 7px 10px rgba(0,0,0,.7);
}

/* Advent Wreath */
.advent-wreath {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.wreath-base {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 8px solid #2e6b2e;
  box-sizing: border-box;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5), 0 0 2px rgba(0, 0, 0, 0.3);
  background-color: #3f8a3f;
}
body.dark-mode .wreath-base {
  border-color: #1f4a1f;
  background-color: #2a5f2a;
}

.candle {
  position: absolute;
  width: 6px;
  height: 18px;
  border-radius: 1px 1px 0 0;
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.2),
    inset 1px 0 1px rgba(255, 255, 255, 0.1);
  background: #500a75; /* Dark Purple for unlit */
}
/* Wick */
.candle::before {
  content: "";
  position: absolute;
  top: -2px;
  left: calc(50% - 0.5px);
  width: 1px;
  height: 2px;
  background: #404040;
}

.candle.purple-1 { top: 5px; left: 15px; background-color: #6a0dad; }
.candle.purple-2 { top: 15px; right: 5px; background-color: #6a0dad; }
.candle.pink { bottom: 5px; right: 15px; background-color: #ff99b5; }
.candle.purple-3 { bottom: 15px; left: 5px; background-color: #6a0dad; }
.candle.white {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  box-sizing: border-box;
  height: 20px;
  width: 6px; /* center candle maybe a bit wider */
}

/* Flame */
@keyframes flicker {
  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) scaleY(1) rotate(-2deg);
    box-shadow: 0 0 4px 1px #ffac4f;
  }
  50% {
    opacity: 0.8;
    transform: translateX(-50%) scaleY(1.08) rotate(2deg);
    box-shadow: 0 0 5px 2px #ffac4f;
  }
}
.candle.lit::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 6px;
  background-color: #ffac4f; /* Flame color */
  border-radius: 50% 50% 20% 20% / 60% 60% 40% 40%;
  box-shadow: 0 0 4px 1px #ffac4f;
  animation: flicker 1.8s infinite alternate ease-in-out;
}
/* White candle flame looks better yellow */
.candle.white.lit::after {
   background-color: #ffd700;
   box-shadow: 0 0 4px 1px #ffd700;
}

/* Advent popup */
#advent-popup {
  display: none;
  position: absolute;
  top: 90px;
  left: 20px;
  background-color: #fff;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 12;
  max-width: 250px;
  font-size: 0.9em;
}
body.dark-mode #advent-popup {
  background-color: #2a2a2a;
  color: #e0e0e0;
  box-shadow: 0 2px 4px rgba(255,255,255,0.1);
}

/* Page Header Banner */
.page-header {
    padding: 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background-color: #f7f4ed80; /* Match body transparent*/
    margin-top: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
    border-radius: 8px;
    text-align: center;
    margin-bottom: 40px;
    border: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
    z-index: 0;
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url("banner.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white; /* for text readability */
}

body.dark-mode .page-header {
    background-color: #33333380; /* Match dark body transparent */
    border: 1px solid #555555;
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url("banner.jpg");
}

.footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9em;
}
.footer a {
  color: #888;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}
.esv-attribution {
  font-size: 0.8em;
}
.esv-attribution a {
  text-decoration: none;
  color: #888;
}
.esv-attribution a:hover {
  text-decoration: underline;
}
body.dark-mode .esv-attribution a {
  color: #aaa;
}
body.dark-mode .footer a {
    color: #aaa;
}
