:root {
  --primary: #143122;
  --primary-hover: #0f261a;
  --primary-light: #eef3f0;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --border-color: #d1d5db;
  --error: #ef4444;
  --success: #10b981;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  line-height: 1.2;
}

.hidden {
  display: none !important;
}

/* Top Bar */
.top-bar {
  background: #ffffff;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  position: relative;
  z-index: 100;
}
.top-bar-content {
  max-width: 800px;
  margin: 0 auto;
}
.logo-link {
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.2s;
}
.logo-link:hover {
  opacity: 0.85;
}
.logo {
  max-height: 100px;
  width: auto;
  display: block;
  margin: 0 auto;
}
.top-bar-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* Hero Banner Image */
.hero-banner {
  width: 100%;
  background-color: var(--primary);
  text-align: center;
}
.hero-banner-img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Content Wrapper */
.content-wrapper {
  max-width: 800px;
  margin: 2rem auto 3rem;
  padding: 0 1rem;
  position: relative;
  z-index: 10;
}

/* Prize Box */
.prize-box {
  background: var(--primary-light);
  border: 1px solid rgba(20, 49, 34, 0.2);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}
.prize-box h3 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}
.prize-box ul {
  list-style: none;
}
.prize-box ul li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  font-size: 1.1rem;
}
.prize-box ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 1.2rem;
}

/* How It Works Section */
.how-it-works-section {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}
.how-it-works-section h3 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.how-it-works-section ol {
  padding-left: 1.5rem;
  margin-bottom: 0;
}
.how-it-works-section ol li {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Judges Section */
.judges-section {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}
.judges-section h3 {
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.judge {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.judge:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.judge h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  font-weight: 700;
}
.judge h4 a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.judge h4 a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}
.judge p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Voting Grid Section */
.voting-section {
  background: var(--bg-card);
  padding: 3rem 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}
.finalists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.finalist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 150px;
}
.finalist-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  border-color: var(--primary);
}

/* Card images */
.finalist-images-wrapper {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  justify-content: center;
  align-items: center;
  min-height: 120px;
}

.book-cover-container {
  width: 50%;
  max-width: 120px;
  aspect-ratio: 2/3;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  overflow: hidden;
  background: rgba(0,0,0,0.03);
  flex-shrink: 0;
}

.author-img-container {
  width: 40%;
  max-width: 100px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  overflow: hidden;
  background: rgba(0,0,0,0.03);
  flex-shrink: 0;
}

.finalist-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.finalist-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  line-height: 1.3;
}
.finalist-card p {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1rem;
}

/* Excerpt View */
.excerpt-content {
  white-space: pre-wrap;
  color: var(--text-main);
  line-height: 1.8;
  font-size: 1.1rem;
  text-align: left;
  background: #f9fafb;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  max-height: 45vh;
  overflow-y: auto;
}
.excerpt-content::-webkit-scrollbar {
  width: 8px;
}
.excerpt-content::-webkit-scrollbar-track {
  background: #f1f1f1; 
  border-radius: 8px;
}
.excerpt-content::-webkit-scrollbar-thumb {
  background: #c1c1c1; 
  border-radius: 8px;
}
.excerpt-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8; 
}


/* Forms */
.form-group {
  margin-bottom: 1.75rem;
  text-align: left;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-size: 1.05rem;
}
.required {
  color: var(--error);
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 1rem 1.125rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1.05rem;
  transition: all 0.2s ease;
  background: var(--bg-card);
  color: var(--text-main);
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 49, 34, 0.1);
}

.select-wrapper {
  position: relative;
}
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234b5563' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  text-align: left;
}
.checkbox-group input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1.35rem;
  height: 1.35rem;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}
.checkbox-group label {
  font-weight: 400;
  margin-bottom: 0;
  cursor: pointer;
  line-height: 1.5;
  font-size: 1.05rem;
}

/* Buttons */
.primary-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  text-decoration: none;
  padding: 1rem 2rem;
  font-size: 1.15rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 49, 34, 0.2);
}
.primary-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.secondary-btn {
  display: inline-block;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.secondary-btn:hover {
  background: var(--primary-light);
}

/* Error Message */
.error-message {
  background: #fee2e2;
  color: #b91c1c;
  padding: 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  border: 1px solid #fca5a5;
  font-size: 1.05rem;
  text-align: left;
}

/* Footer Section */
.footer-section {
  background: transparent;
  padding: 1rem 0;
  margin-bottom: 2rem;
  text-align: center;
}
.footer-contact p {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}
.footer-contact a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.fine-print {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

/* Thank You Card */
.thank-you-card {
  background: var(--bg-card);
  padding: 4rem 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  text-align: center;
}
.thank-you-card h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.ty-subtitle {
  color: var(--text-main);
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
}

.timeline-reminder {
  background: var(--primary-light);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  text-align: left;
}
.timeline-reminder h4 {
  font-family: 'Inter', sans-serif;
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.timeline-reminder ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}
.timeline-reminder ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-size: 1.05rem;
}
.timeline-reminder ul li::before {
  content: '•';
  position: absolute;
  left: 0.5rem;
  color: var(--primary);
  font-weight: bold;
}

/* Share Callout & While you wait */
.share-callout, .while-you-wait {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}
.share-callout .share-prompt {
  margin-bottom: 1.5rem !important;
  font-size: 1.05rem;
  color: var(--text-main);
}
.while-you-wait h4 {
  font-family: 'Inter', sans-serif;
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.while-you-wait p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.team-signoff {
  font-style: italic;
  margin-top: 1.5rem;
  margin-bottom: 0 !important;
}

/* Modals */
.modal {
  position: fixed;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay {
  position: absolute;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: var(--bg-card);
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
  padding: 3rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.close-modal {
  position: absolute;
  top: 1.25rem;
  right: 1.75rem;
  font-size: 2.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.close-modal:hover {
  color: var(--error);
}

.modal-images-wrapper {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  align-items: center;
}

#modal-book-cover {
  max-width: 160px;
  width: 50%;
  height: auto;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

#modal-author-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.rules-container h1 {
  font-size: 2rem;
  margin-bottom: 1.75rem;
  text-align: center;
}
.rules-container h2 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-main);
}
.rules-container p, .rules-container ul {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1.05rem;
}
.rules-container ul {
  padding-left: 2rem;
}
.rules-container li {
  margin-bottom: 0.75rem;
}
.sponsor-box {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-weight: 500;
  color: var(--text-main);
}

/* Responsive */
@media (min-width: 768px) {
  .how-it-works-section, .judges-section, .voting-section, .thank-you-card {
    padding: 3.5rem;
  }
}

@media (max-width: 768px) {
  .logo {
    max-height: 80px;
  }
  .top-bar {
    padding: 1rem;
  }
  .modal-content {
    padding: 2rem;
  }
  .rules-container h1 {
    font-size: 1.75rem;
  }
  
  .modal-images-wrapper {
    gap: 1rem;
  }
  
  #modal-book-cover {
    max-width: 120px;
  }
  
  #modal-author-img {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .finalists-grid {
    grid-template-columns: 1fr;
  }
}
