/* Minimal CSS inspired by catherinejue.com */

:root {
  --bg-color: #fff;
  --text-color: #333;
  --text-muted: #666;
  --border-color: #eee;
  --hover-opacity: 0.7;
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #e5e5e5;
  --text-muted: #999;
  --border-color: #333;
  --hover-opacity: 0.8;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 40px 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation */
.navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.nav-home {
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  color: var(--text-color);
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  font-size: 16px;
  color: var(--text-color);
}

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

.nav-links a.active {
  text-decoration: underline;
  font-weight: 600;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  margin-left: 15px;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.theme-toggle:hover {
  opacity: var(--hover-opacity);
}

.theme-icon {
  display: inline-block;
}

/* Typography */
h1, h2, h3 {
  font-weight: normal;
  margin: 30px 0 15px 0;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 18px;
}

p {
  margin-bottom: 15px;
}

/* Links */
a {
  color: var(--text-color);
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

/* Lists */
ul.post-list {
  list-style: none;
  margin: 15px 0;
}

ul.post-list li {
  margin: 8px 0;
}

.post-date {
  display: inline-block;
  min-width: 150px;
  margin-right: 20px;
}

/* Article styling */
article header {
  margin-bottom: 30px;
}

article header h1 {
  margin-bottom: 5px;
}

article header time {
  color: var(--text-muted);
  font-size: 14px;
}

article footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* Content spacing */
.content p {
  margin-bottom: 15px;
}

.content ul, .content ol {
  margin: 15px 0;
  padding-left: 30px;
}

.content ul {
  list-style: disc;
}

.content li {
  margin: 5px 0;
}

/* Home page styling */
.home {
  line-height: 1.8;
}

/* Photos page styling */
.photos-page {
  max-width: 800px;
  margin: 0 auto;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.photo-item:hover {
  transform: translateY(-2px);
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.photo-item img:hover {
  opacity: 0.9;
}

/* Maintain aspect ratio for consistent grid */
.photo-item img {
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: pointer;
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 30px;
  font-weight: normal;
  cursor: pointer;
  z-index: 1001;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 40px;
  font-weight: normal;
  cursor: pointer;
  z-index: 1001;
  user-select: none;
  padding: 10px 15px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 0.7;
}

/* Simple responsive */
@media (max-width: 800px) {
  .photos-page {
    max-width: 100%;
  }
  
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
}

/* Photo posts styling */
.photo-figure img {
  max-height: 80vh;
  object-fit: contain;
}

@media (max-width: 600px) {
  body {
    padding: 0 15px 20px 15px;
  }

  .navigation {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    padding: 20px 0;
  }

  .nav-links {
    gap: 15px;
  }

  .photo-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* Event page styling */
.event-page {
  max-width: 600px;
  margin: 0 auto;
}

.event-content {
  text-align: center;
}

.invite-image-container {
  margin: 30px 0;
}

.invite-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .invite-image {
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}

.invite-placeholder {
  padding: 40px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
}

.rsvp-section {
  margin-top: 40px;
  text-align: left;
}

.rsvp-section h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.5rem;
  font-weight: bold;
  color: #C39030;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

[data-theme="dark"] .rsvp-section h2 {
  color: #E5B555;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.rsvp-form {
  max-width: 400px;
  margin: 0 auto;
  background: rgba(195, 144, 48, 0.05);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid rgba(195, 144, 48, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .rsvp-form {
  background: rgba(195, 144, 48, 0.08);
  border: 1px solid rgba(195, 144, 48, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #C39030;
  font-size: 15px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .form-group label {
  color: #E5B555;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid rgba(195, 144, 48, 0.3);
  border-radius: 8px;
  font-size: 16px;
  background: var(--bg-color);
  color: var(--text-color);
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #C39030;
  box-shadow: 0 0 0 3px rgba(195, 144, 48, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(229, 181, 85, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

#submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #ff8c42, #f57c00);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  margin-top: 10px;
}

#submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #f57c00, #e65100);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 140, 66, 0.5);
}

#submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 140, 66, 0.4);
}

#submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  background: #ccc;
  box-shadow: none;
}

.rsvp-message {
  margin-top: 20px;
  padding: 12px;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
}

.rsvp-message.success {
  background: #fff8e1;
  color: #f57c00;
  border: 1px solid #ffb74d;
}

.rsvp-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.rsvp-message.dead {
  background: #2d1b2e;
  color: #ff4444;
  border: 2px solid #8b0000;
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 0 10px #ff0000, 2px 2px 4px rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .rsvp-message.success {
  background: #3e2723;
  color: #ff8c42;
  border-color: #5d4037;
}

[data-theme="dark"] .rsvp-message.error {
  background: #4a1e1e;
  color: #f8d7da;
  border-color: #6d2c2c;
}

/* Mobile responsive for event page */
@media (max-width: 600px) {
  .event-page {
    max-width: 100%;
  }

  .rsvp-form {
    max-width: 100%;
  }

  .invite-image {
    max-width: 100%;
  }
}

/* Halloween Success Animation */
.halloween-success {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.floating-ghost {
  position: absolute;
  font-size: 3rem;
  animation: floatGhost 5s ease-in-out;
  opacity: 0;
}

.bouncing-pumpkin {
  position: absolute;
  font-size: 2.5rem;
  animation: bouncePumpkin 4s ease-out;
  opacity: 0;
}

@keyframes floatGhost {
  0% {
    opacity: 0;
    transform: translateY(100px) scale(0.5);
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
    transform: translateY(-50px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) scale(0.5);
  }
}

@keyframes bouncePumpkin {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.5) rotate(0deg);
  }
  15% {
    opacity: 1;
    transform: translateY(0px) scale(1) rotate(-5deg);
  }
  30% {
    transform: translateY(-15px) scale(1.1) rotate(5deg);
  }
  45% {
    transform: translateY(0px) scale(1) rotate(-3deg);
  }
  60% {
    transform: translateY(-8px) scale(1.05) rotate(2deg);
  }
  75% {
    transform: translateY(0px) scale(1) rotate(-1deg);
  }
  100% {
    opacity: 0;
    transform: translateY(0px) scale(0.8) rotate(0deg);
  }
}

.spooky-success-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: bold;
  color: #ff6b35;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  animation: spookyGlow 4s ease-in-out;
  z-index: 1001;
  pointer-events: none;
  opacity: 0;
}

@keyframes spookyGlow {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    text-shadow: 0 0 20px #ff6b35, 2px 2px 4px rgba(0, 0, 0, 0.7);
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
    text-shadow: 0 0 30px #ff6b35, 0 0 40px #ff6b35, 2px 2px 4px rgba(0, 0, 0, 0.7);
  }
  80% {
    opacity: 1;
    text-shadow: 0 0 20px #ff6b35, 2px 2px 4px rgba(0, 0, 0, 0.7);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

[data-theme="dark"] .spooky-success-text {
  color: #ff8c42;
}

/* Skull Animation for "No" RSVPs */
.skull-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.floating-skull {
  position: absolute;
  font-size: 3rem;
  animation: floatSkull 5s ease-in-out;
  opacity: 0;
}

@keyframes floatSkull {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) scale(0.5);
  }
  20% {
    opacity: 1;
  }
  50% {
    transform: translateY(-40vh) rotate(180deg) scale(1);
  }
  80% {
    opacity: 1;
    transform: translateY(-70vh) rotate(360deg) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) rotate(540deg) scale(0.5);
  }
}

[data-theme="dark"] .rsvp-message.dead {
  background: #1a0a1b;
  color: #ff6666;
  border-color: #660000;
}