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

:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #141414;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent-red: #dc2626;
  --accent-blue: #2563eb;
  --border-color: #262626;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  max-width: 1920px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Added header actions container for donate button and menu toggle */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Added donate button styles */
.btn-donate {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-red);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.btn-donate:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-donate:active {
  transform: translateY(0);
}

.btn-donate svg {
  stroke: currentColor;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
}

/* Main Content */
.main-content {
  max-width: 1920px;
  margin: 0 auto;
  padding: 2rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
}

/* Video Section */
.video-section {
  min-width: 0;
}

.video-container {
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  background: #000;
}

.video-wrapper iframe,
.video-wrapper #player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.live-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent-red);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
}

.scheduled-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(37, 99, 235, 0.9);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
}

.video-scheduled-time {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background: rgba(37, 99, 235, 0.9);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.video-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
}

.action-btn:hover {
  background: rgba(0, 0, 0, 0.95);
}

.video-info {
  padding: 1.5rem;
}

/* Added styles for video info header with current time display */
.video-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.current-time-display {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent-blue);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.video-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.video-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.video-meta {
  display: flex;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Video Countdown Timer */
.video-countdown {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 10;
  backdrop-filter: blur(4px);
}

#videoTimeRemaining {
  font-weight: 700;
  color: #60a5fa;
  margin-left: 0.25rem;
}

/* Added styles for video duration display */
.video-duration-display {
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.duration-item {
  text-align: center;
}

.duration-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}

.duration-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  text-transform: uppercase;
}

/* More Videos */
.more-videos {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.video-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.video-card:hover {
  transform: translateY(-4px);
}

.video-thumbnail {
  position: relative;
  padding-bottom: 56.25%;
  background: var(--bg-tertiary);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.no-video-message {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.no-video-message h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.no-video-message p {
  font-size: 1rem;
}

.video-card-info h4 {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* Live Chat */
.live-chat-section {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 1.5rem;
}

.live-chat {
  margin-top: 1rem;
}

.chat-messages {
  height: 300px;
  overflow-y: auto;
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.chat-message {
  margin-bottom: 1rem;
}

.chat-message-name {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.chat-message-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.chat-form {
  display: flex;
  gap: 0.5rem;
}

.chat-form input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.chat-form button {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.chat-form button:hover {
  opacity: 0.9;
}

/* Schedule Sidebar */
.schedule-sidebar {
  background: var(--bg-secondary);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  position: sticky;
  top: 100px;
}

.schedule-header {
  flex-shrink: 0;
  padding: 1.5rem;
  margin-bottom: 0;
}

.timezone-select {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.next-service {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 0 1.5rem 1.5rem 1.5rem;
  flex-shrink: 0;
}

/* Added styles for current time display in NEXT SERVICE section */
.next-service .current-time-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-align: center;
  margin-bottom: 1.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.countdown {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1.5rem;
}

.countdown-item {
  text-align: center;
}

.countdown-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.countdown-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.next-service-info {
  text-align: center;
}

.next-service-time {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.next-service-title {
  color: var(--text-secondary);
}

.schedule-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.5rem 1.5rem 1.5rem;
  max-height: none;
}

.schedule-list::-webkit-scrollbar {
  width: 6px;
}

.schedule-list::-webkit-scrollbar-track {
  background: transparent;
}

.schedule-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.schedule-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Card styling for schedule date groups and items */
.schedule-date-group {
  margin-bottom: 1.5rem;
}

.schedule-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.schedule-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  transition: background 0.2s;
  cursor: pointer;
}

.schedule-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.schedule-time {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.schedule-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  right: 2rem;
  width: 380px;
  display: flex;
  gap: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 0;
  overflow: hidden;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  transition: all 0.2s;
  flex: 1;
  padding: 1rem 0.5rem;
  border-right: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.bottom-nav-item:last-child {
  border-right: none;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.bottom-nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Dialogs */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dialog {
  background: var(--bg-secondary);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.dialog-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.dialog-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.dialog-content {
  padding: 1.5rem;
}

/* Donate Form */
.donate-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.amount-btn {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.amount-btn:hover,
.amount-btn.active {
  border-color: var(--accent-blue);
  background: var(--accent-blue);
}

#donateForm input,
#donateForm textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-family: inherit;
}

#donateForm textarea {
  resize: vertical;
  min-height: 120px;
}

.prayer-privacy {
  margin-bottom: 1.5rem;
}

.prayer-privacy label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.prayer-privacy input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

/* Form Messages */
.form-message {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.form-message.success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Prayer Notice Card */
.prayer-notice {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

.prayer-notice.disabled {
  opacity: 0.6;
}

.prayer-notice svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.prayer-notice h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.prayer-notice p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Prayer Action Card */
.prayer-action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.prayer-action-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-blue);
}

.prayer-action-card > svg:first-child {
  flex-shrink: 0;
  color: var(--text-primary);
}

.prayer-action-card > svg:last-child {
  flex-shrink: 0;
  color: var(--text-secondary);
  margin-left: auto;
}

.prayer-action-content {
  flex: 1;
}

.prayer-action-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.prayer-action-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Prayer Login Notice */
.prayer-login-notice {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 1rem;
}

.prayer-login-notice a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
}

.prayer-login-notice a:hover {
  text-decoration: underline;
}

/* Prayer Request Form */
#prayerRequestForm input,
#prayerRequestForm textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
}

#prayerRequestForm textarea {
  resize: vertical;
  min-height: 120px;
}

/* Responsive */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .schedule-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: #f5f5f5;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    display: none;
  }

  .schedule-sidebar.active {
    display: flex;
  }

  .schedule-header {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .schedule-header h3 {
    color: #333;
    font-size: 0.875rem;
  }

  .timezone-select {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #333;
  }

  .next-service {
    background: white;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    padding: 1.5rem;
  }

  .countdown-value {
    color: #333;
  }

  /* Added mobile styles for duration display */
  .duration-value {
    color: #333;
  }

  .next-service-time {
    color: #333;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: none;
    border-top: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 0;
    justify-content: space-around;
    gap: 0;
    z-index: 100;
  }

  .bottom-nav-item {
    color: #666;
    font-size: 0.75rem;
    padding: 0.75rem 0.5rem;
    flex: 1;
    border-right: 1px solid #e0e0e0;
    background: white;
  }

  .bottom-nav-item:last-child {
    border-right: none;
  }

  .bottom-nav-item:hover,
  .bottom-nav-item.active {
    color: #333;
    background: #f9f9f9;
  }

  .bottom-nav-item svg {
    stroke: currentColor;
    width: 24px;
    height: 24px;
  }

  .video-section {
    display: block;
  }

  /* Added mobile styles for prayer section modal */
  .section-modal {
    border-radius: 0;
  }

  .section-modal-content {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .donate-amounts {
    grid-template-columns: repeat(2, 1fr);
  }

  .share-buttons {
    grid-template-columns: 1fr;
  }

  /* Hide donate button text on mobile, show only icon */
  .btn-donate {
    padding: 0.625rem;
    min-width: 44px;
    justify-content: center;
  }

  .btn-donate span {
    display: none;
  }
}

/* Added styles for prayer section modal */
.section-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.section-modal-content {
  background: var(--bg-secondary);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.section-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.section-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.section-modal-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.section-modal-body {
  padding: 1.5rem;
}

/* Share Buttons */
.share-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}

.share-btn:hover {
  opacity: 0.9;
}

.share-btn.facebook {
  background: #1877f2;
  color: white;
}

.share-btn.twitter {
  background: #1da1f2;
  color: white;
}

.share-btn.whatsapp {
  background: #25d366;
  color: white;
}

.share-btn.email {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.share-link {
  display: flex;
  gap: 0.5rem;
}

.share-link input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.share-link button {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.share-link button:hover {
  opacity: 0.9;
}

.btn-primary {
  width: 100%;
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
  text-align: center;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  background: #1e40af;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Notes Section Styles */
.notes-modal {
  max-width: 700px;
  max-height: 85vh;
}

.notes-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: calc(85vh - 80px);
}

/* Updated notes sidebar to be sticky with scroll, removed horizontal overflow */
.notes-sidebar {
  background: var(--bg-secondary);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  max-height: calc(100vh - 140px);
  position: sticky;
  top: 100px;
  overflow: hidden;
  z-index: 200;
}

.notes-sidebar-header {
  flex-shrink: 0;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

/* Removed "Notes Editor - Full height" text by hiding it */
.notes-sidebar-header h3 {
  display: none;
}

.notes-sidebar-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* Toolbar positioned at top with proper styling */
.notes-toolbar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  flex-wrap: nowrap;
  overflow-x: hidden;
}

/* Editor takes full width and height with sticky scroll behavior */
.notes-editor {
  flex: 1;
  padding: 1.5rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-y: auto;
  overflow-x: hidden;
  outline: none;
  width: 100%;
  max-height: calc(100vh - 280px);
  position: sticky;
  top: 0;
}

.notes-editor::-webkit-scrollbar {
  width: 8px;
}

.notes-editor::-webkit-scrollbar-track {
  background: transparent;
}

.notes-editor::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.notes-editor::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.notes-editor:empty:before {
  content: attr(placeholder);
  color: var(--text-secondary);
  font-style: italic;
}

.notes-editor h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 1rem 0;
  line-height: 1.2;
}

.notes-editor h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.875rem 0;
  line-height: 1.3;
}

.notes-editor h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.75rem 0;
  line-height: 1.4;
}

.notes-editor p {
  margin: 0.5rem 0;
}

.notes-editor ul,
.notes-editor ol {
  margin: 0.5rem 0;
  padding-left: 2rem;
}

.notes-editor li {
  margin: 0.25rem 0;
}

.notes-editor strong {
  font-weight: 700;
}

.notes-editor em {
  font-style: italic;
}

.notes-editor u {
  text-decoration: underline;
}

.notes-notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.notes-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notes-notification.success {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.notes-notification.error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Mobile styles for notes */
@media (max-width: 1024px) {
  .notes-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .notes-body {
    height: calc(100vh - 80px);
  }

  /* Mobile styles for full-height notes sidebar */
  .notes-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: #f5f5f5;
    border-radius: 0;
    height: 100vh;
  }

  .notes-sidebar-header {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e0e0e0;
  }

  .notes-sidebar-header h3 {
    color: #333;
    font-size: 0.875rem;
  }

  .notes-sidebar-content {
    background: white;
  }

  .notes-toolbar {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .notes-format-select {
    background: white;
    border: 1px solid #e0e0e0;
    color: #333;
    flex: 1;
    min-width: 100%;
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  .notes-btn {
    background: white;
    border: 1px solid #e0e0e0;
    color: #333;
  }

  .notes-btn:hover {
    background: #f9f9f9;
    border-color: #2563eb;
  }

  .notes-editor {
    background: white;
    color: #333;
  }

  .notes-editor:empty:before {
    color: #999;
  }

  .notes-notification {
    right: 1rem;
    left: 1rem;
    top: 1rem;
  }
}

/* Bible Section Styles */
.bible-modal {
  max-width: 700px;
  max-height: 85vh;
}

.bible-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: calc(85vh - 80px);
  background: var(--bg-secondary);
}

/* Added position sticky and overflow hidden to contain scroll within bible-content */
.bible-sidebar {
  background: var(--bg-secondary);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  max-height: calc(100vh - 140px);
  position: sticky;
  top: 100px;
  overflow: hidden;
}

.bible-sidebar-header {
  flex-shrink: 0;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.bible-sidebar-header h3 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bible-sidebar-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
}

.bible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.bible-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.bible-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.625rem 1rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.bible-select:hover {
  border-color: var(--accent-blue);
}

.bible-select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.bible-actions {
  display: flex;
  gap: 0.5rem;
}

.bible-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
}

.bible-btn:hover {
  background: var(--bg-primary);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.bible-btn svg {
  stroke: currentColor;
}

.bible-content {
  flex: 1;
  padding: 1.5rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.75;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  position: sticky;
  top: 0;
  max-height: calc(100vh - 200px);
}

.bible-content::-webkit-scrollbar {
  width: 8px;
}

.bible-content::-webkit-scrollbar-track {
  background: transparent;
}

.bible-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.bible-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.bible-chapter-title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.bible-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.bible-verse {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.verse-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
  padding-top: 0.25rem;
}

.verse-text {
  flex: 1;
  color: var(--text-primary);
  line-height: 1.75;
}

.bible-footer {
  padding: 1rem 1.5rem;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  text-align: center;
}

.bible-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.1);
}

.bible-link:hover {
  background: rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.bible-link svg {
  stroke: currentColor;
}

/* Mobile styles for Bible section */
@media (max-width: 1024px) {
  .bible-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .bible-body {
    height: calc(100vh - 80px);
  }

  /* Added mobile styles for Bible sidebar */
  .bible-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: #f5f5f5;
    border-radius: 0;
    height: 100vh;
  }

  .bible-sidebar-header {
    padding: 1rem;
    background: white;
    border-bottom: 1px solid #e0e0e0;
  }

  .bible-sidebar-header h3 {
    color: #333;
    font-size: 0.875rem;
  }

  .bible-sidebar-content {
    background: white;
  }

  .bible-header {
    padding: 1rem;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
  }

  .bible-controls {
    gap: 0.5rem;
  }

  .bible-select {
    background: white;
    border: 1px solid #e0e0e0;
    color: #333;
  }

  .bible-btn {
    background: white;
    border: 1px solid #e0e0e0;
    color: #333;
  }

  .bible-btn:hover {
    background: #f9f9f9;
    border-color: #2563eb;
    color: #2563eb;
  }

  .bible-content {
    background: white;
    color: #333;
    padding: 1.5rem 1.25rem;
  }

  .bible-chapter-title {
    color: #666;
  }

  .bible-section-title {
    color: #333;
  }

  .verse-number {
    color: #2563eb;
  }

  .verse-text {
    color: #333;
  }

  .bible-footer {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
  }

  .bible-link {
    background: white;
    border: 1px solid #e0e0e0;
  }

  .bible-link:hover {
    background: #f9f9f9;
  }
}

/* Added currency selector styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.currency-select {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.currency-select:hover,
.currency-select:focus {
  border-color: var(--accent-blue);
  outline: none;
}

.currency-symbol {
  font-weight: 700;
}

/* Enhanced mobile responsiveness for all sections */
@media (max-width: 1024px) {
  .header-content {
    padding: 1rem;
  }

  .main-content {
    padding: 1rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Video section mobile optimization */
  .video-info {
    padding: 1rem;
  }

  .video-title {
    font-size: 1.25rem;
  }

  .video-actions {
    flex-direction: column;
    gap: 0.25rem;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }

  /* Schedule sidebar mobile */
  .schedule-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: #f5f5f5;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    display: none;
  }

  .schedule-sidebar.active {
    display: flex;
  }

  .schedule-header {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .schedule-header h3 {
    color: #333;
    font-size: 0.875rem;
  }

  .timezone-select {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #333;
  }

  .next-service {
    background: white;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    padding: 1.5rem;
  }

  .countdown-value {
    color: #333;
  }

  .duration-value {
    color: #333;
  }

  .next-service-time {
    color: #333;
  }

  .schedule-list {
    background: #f5f5f5;
  }

  .schedule-date {
    color: #666;
  }

  .schedule-item {
    background: white;
    border: 1px solid #e0e0e0;
  }

  .schedule-time {
    color: #333;
  }

  .schedule-title {
    color: #666;
  }

  /* Bottom navigation mobile */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: none;
    border-top: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 0;
    justify-content: space-around;
    gap: 0;
    z-index: 100;
  }

  .bottom-nav-item {
    color: #666;
    font-size: 0.75rem;
    padding: 0.75rem 0.5rem;
    flex: 1;
    border-right: 1px solid #e0e0e0;
    background: white;
  }

  .bottom-nav-item:last-child {
    border-right: none;
  }

  .bottom-nav-item:hover,
  .bottom-nav-item.active {
    color: #333;
    background: #f9f9f9;
  }

  .bottom-nav-item svg {
    stroke: currentColor;
    width: 24px;
    height: 24px;
  }

  .video-section {
    display: block;
    margin-bottom: 4rem;
  }

  /* Dialog mobile optimization */
  .dialog {
    width: 95%;
    max-height: 85vh;
  }

  .dialog-header {
    padding: 1rem;
  }

  .dialog-content {
    padding: 1rem;
  }

  /* Section modals mobile */
  .section-modal {
    border-radius: 0;
  }

  .section-modal-content {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
  }

  /* Chat section mobile */
  .chat-messages {
    height: 200px;
  }

  .chat-form {
    flex-direction: column;
  }

  .chat-form input {
    width: 100%;
  }

  .chat-form button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .logo h1 {
    font-size: 1rem;
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .donate-amounts {
    grid-template-columns: repeat(2, 1fr);
  }

  .share-buttons {
    grid-template-columns: 1fr;
  }

  /* Improved donate button mobile styles */
  .btn-donate {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    gap: 0.375rem;
  }

  .btn-donate svg {
    width: 16px;
    height: 16px;
  }

  /* Video player mobile */
  .video-wrapper {
    padding-bottom: 75%;
  }

  .live-badge,
  .scheduled-badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
  }

  /* More videos grid mobile */
  .more-videos {
    margin-bottom: 1rem;
  }

  .section-title {
    font-size: 1rem;
  }

  /* Form inputs mobile */
  #donateForm input,
  #donateForm textarea,
  #donateForm select {
    font-size: 16px;
  }

  .currency-select {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .header-content {
    padding: 0.75rem;
  }

  .main-content {
    padding: 0.75rem;
  }

  .donate-amounts {
    grid-template-columns: 1fr;
  }

  .amount-btn {
    padding: 1rem;
    font-size: 1rem;
  }

  .video-title {
    font-size: 1.125rem;
  }

  .countdown-value,
  .duration-value {
    font-size: 1.5rem;
  }

  .next-service-time {
    font-size: 1.25rem;
  }
}
