html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #f0f0f0;
  max-width: 100vw;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

body {
  font-family: 'Oswald', sans-serif;
  min-height: 100vh;
  background: #f0f0f0;
  color: #222;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* HEADER */
.main-header {
  width: 100vw;
  max-width: 100vw;
  background: #4CAF9E;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  height: 58px;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  border-bottom: 1px solid #e0e0e0;
}

.header-title {
  font-size: 1.3rem;
  font-weight: 400;
  padding-left: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-menu {
  font-size: 2rem;
  padding: 0 18px;
  cursor: pointer;
  color: #fff;
  flex: 0 0 auto;
  user-select: none;
}

@media (max-width: 600px) {
  .main-header { height: 48px; }
  .header-title { font-size: 1.05rem; padding-left: 12px; }
  .header-menu { font-size: 1.7rem; padding-right: 12px; }
}

/* SECTION CARD STYLE */
.app-section {
  display: none;
  width: 100vw;
  max-width: 100vw;
  min-height: calc(100vh - 58px - 60px);
  margin: 0;
  padding-top: 58px;
  padding-bottom: 70px;
  box-sizing: border-box;
  background: #fff;
  position: relative;
  overflow-x: hidden;
}
#homeSection { display: block; }

@media (max-width: 600px) {
  .app-section {
    min-height: calc(100vh - 48px - 60px);
    padding-top: 48px;
    padding-bottom: 70px;
  }
}

.main-content {
  max-width: 420px;
  margin: 0 auto;
  padding: 18px 18px 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100vw;
  box-sizing: border-box;
}

/* COUNTER UI */
.god-image-container {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  text-align: center;
}

.god-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: block;
  margin: 0 auto;
}

.counter-box {
  background: #f8f4e9;
  border-radius: 16px;
  box-shadow: inset 2px 2px 6px #e0dccf, inset -2px -2px 6px #ffffff;
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 800;
  font-size: 4.2rem;
  color: #2D7A8C;
  padding: 16px 32px;
  margin: 16px 0;
  user-select: none;
  min-width: 140px;
  max-width: 180px;
  overflow-x: auto;
  overflow-y: hidden;
}

.reset-button {
  background: #E6B85C;
  border-radius: 12px;
  color: white;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  margin: 8px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.count-button {
  background: linear-gradient(145deg, #4CAF9E, #2D7A8C);
  border-radius: 20px;
  box-shadow: 4px 4px 8px #2a4a9f22, -4px -4px 8px #7ea0f722;
  color: white;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  font-size: 1.5rem;
  padding: 20px 40px;
  border: none;
  width: 90%;
  max-width: 280px;
  cursor: pointer;
  user-select: none;
  transition: box-shadow 0.2s;
  margin: 24px 0;
}

.count-button:active {
  box-shadow: inset 8px 4px 8px #214942, inset -4px -4px 8px #7ea0f722;
}

.app-explanation {
  text-align: center;
  color: #555;
  margin: 16px 0;
  padding: 0 16px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

/* FOOTER */
.footer {
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
  height: 60px;
}

.footer-icon {
  font-size: 28px;
  color: #2D7A8C;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
  margin: 0 4px;
  opacity: 1;
  user-select: none;
}

.footer-icon.disabled {
  color: #bbb !important;
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}

.footer-icon.active {
  color: #E6B85C;
}

/* PHOTO LIBRARY SECTION */
.photo-library {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px 0 20px 0;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  overflow-y: auto;
  padding-bottom: 80px; /* allow grid to scroll behind footer */
}

.photo-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8f4e9;
  padding-bottom: 6px;
}

.photo-item img {
  width: 100%;
  display: block;
  border-radius: 8px 8px 0 0;
  border: 2px solid transparent;
}

.photo-item .god-name {
  font-size: 0.7rem;
  color: #2D7A8C;
  padding: 4px;
  text-align: center;
  width: 100%;
  background: #f8f4e9;
  border-radius: 0 0 8px 8px;
}

.photo-item.selected img {
  border-color: #4CAF9E;
}

/* --- YOUTUBE SECTION (UPDATED) --- */
#youtubeSection .main-content {
  width: 100vw;
  max-width: 100vw;
  align-items: center;
  justify-content: flex-start;
  padding: 0 18px;
  box-sizing: border-box;
}

#youtubePlaylists {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 12px 0 16px 0;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}

.youtube-playlist-btn {
  background: #4CAF9E;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 10px 16px;
  font-size: 1rem;
  font-family: 'Oswald', sans-serif;
  margin: 2px 0;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 8px #4CAF9E22;
}
.youtube-playlist-btn.active,
.youtube-playlist-btn:active {
  background: #2D7A8C;
}

/* --- YOUTUBE VIDEO GRID & CARDS (REPLACED/UPDATED) --- */
.youtube-video-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 0;
}

.youtube-video-thumb {
  width: 200px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(40,40,40,0.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.youtube-video-thumb:hover {
  box-shadow: 0 6px 18px rgba(40,40,40,0.18);
}
.youtube-video-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}
.yt-title {
  background: #fff;
  color: #222;
  padding: 14px 12px 16px 12px;
  font-size: 1rem;
  font-weight: 500;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  min-height: 48px;
  border-radius: 0 0 12px 12px;
}

/* --- Show More Button (Styled Like Counter Button) --- */
.youtube-show-more-btn {
  display: block;
  margin: 28px auto 20px auto;
  padding: 16px 38px;
  background: #2D7A8C;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(40,40,40,0.08);
  cursor: pointer;
  transition: background 0.2s;
}
.youtube-show-more-btn:hover {
  background: #D1A84A;
}

/* YOUTUBE PLAYER OVERLAY */
.youtube-player-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}
.youtube-player-modal {
  width: 96vw;
  max-width: 400px;
  margin: 0 auto;
  padding: 20px 0;
  background: #fff;
  border-radius: 16px;
  text-align: center;
  position: relative;
  box-sizing: border-box;
}
.youtube-player-modal iframe {
  border-radius: 16px;
  box-shadow: 0 4px 24px #2D7A8C22;
  width: 96vw;
  max-width: 400px;
  height: 220px;
}
.youtube-player-modal button {
  margin: 16px auto 0 auto;
  padding: 8px 24px;
  border-radius: 8px;
  background: #4CAF9E;
  color: #fff;
  border: none;
  font-size: 1em;
  cursor: pointer;
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
  transition: background 0.2s;
}
.youtube-player-modal button:hover {
  background: #2D7A8C;
}

/* MENU SECTION (slide in from left) */
.menu-section {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 85vw;
  max-width: 340px;
  height: 100vh;
  background: #fff;
  z-index: 1500;
  box-shadow: 2px 0 16px rgba(0,0,0,0.13);
  animation: menu-slide-in 0.25s;
}
@keyframes menu-slide-in {
  from { transform: translateX(-100%);}
  to { transform: translateX(0);}
}
.menu-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0 0 0 0;

}
.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #4CAF9E;
  color: #fff;
  height: 58px;
  padding: 0 18px;
  box-sizing: border-box;
}
.menu-title {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 1px;
}
.menu-close {
  font-size: 2rem;
  cursor: pointer;
  color: #fff;
  user-select: none;
}
.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.menu-list li {
  border-bottom: 1px solid #eee;
}
.menu-list a, .menu-list button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #2D7A8C;
  font-size: 1.1em;
  padding: 10px 24px;
  font-family: 'Oswald', sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.menu-list a:hover, .menu-list button:hover {
  background: #f0f0f0;
  color: #4CAF9E;
}

/* SETTINGS SECTION */
#settingsSection label {
  display: block;
  margin-bottom: 18px;
  color: #555;
  font-size: 1rem;
  width: 100%;
}
#settingsSection input[type="number"], 
#settingsSection select, 
#settingsSection input[type="range"] {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  font-size: 1rem;
  background: #f8f4e9;
}
#settingsSection input[type="range"] {
  padding: 0;
  background: none;
}
#settingsSection .save-settings {
  background: #4CAF9E;
  border-radius: 12px;
  color: white;
  border: none;
  padding: 14px 0;
  font-size: 1.1rem;
  cursor: pointer;
  width: 100%;
  margin-top: 12px;
  margin-bottom: 8px;
}

/* TERMS & PRIVACY SECTION */
#termsSection, #privacySection {
  background: #fff;
}
#termsSection .main-content, #privacySection .main-content {
  max-width: 600px;
  width: 100vw;
  margin: 0 auto;
  padding: 10px 18px 32px 18px;
  box-sizing: border-box;
}
#termsSection h3, #privacySection h3 {
  margin-top: 0;
  text-align: center;
}
.modal-scroll-content {
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px 0;
  font-size: 1.05em;
}

/* DARK MODE */
body.dark {
  background: #23272f;
  color: #fff;
}
body.dark .main-header, body.dark .menu-header {
  background: #2D7A8C;
  color: #fff;
}
body.dark .app-section, body.dark .main-content, body.dark #termsSection, body.dark #privacySection, body.dark .youtube-player-modal {
  background: #181b20;
  color: #fff;
}
body.dark .counter-box { background: #23272f; color: #E6B85C; }
body.dark .footer { background: #181b20; border-top: 1px solid #222; }
body.dark .footer-icon { color: #E6B85C; }
body.dark .footer-icon.disabled { color: #555 !important; }
body.dark .photo-item { background: #23272f; }
body.dark .photo-item .god-name { background: #23272f; color: #E6B85C; }
body.dark .youtube-video-thumb { background: #23272f; box-shadow: 0 4px 16px #0008; }
body.dark .yt-title { background: #181b20; color: #E6B85C; }
body.dark .youtube-player-modal { background: #23272f; color: #fff; }
body.dark .menu-section { background: #181b20; color: #fff; }
body.dark .menu-list a, body.dark .menu-list button { color: #E6B85C; }
body.dark .menu-list a:hover, body.dark .menu-list button:hover { background: #23272f; color: #fff; }
body.dark #settingsSection input, body.dark #settingsSection select, body.dark #settingsSection input[type="range"] { background: #181b20; color: #fff; border: 1px solid #333; }

@media (max-width: 500px) {
  .main-content, #youtubePlaylists, #youtubeVideos, .photo-library {
    max-width: 98vw;
    width: 98vw;
    padding-left: 6px;
    padding-right: 6px;
  }
  .youtube-video-thumb {
    width: 97vw;
    max-width: 97vw;
  }
  .youtube-player-modal iframe {
    width: 97vw;
    max-width: 97vw;
    height: 180px;
  }
  .counter-box {
    min-width: 100px;
    max-width: 90vw;
    font-size: 2.6rem;
    padding: 12px 4vw;
  }
  .god-image-container {
    max-width: 98vw;
  }
  .footer { height: 54px; }
  .app-section { padding-bottom: 60px; }
}

/* Remove scrollbars for horizontal overflow */
body, html, .footer, .main-header, .app-section, #youtubeSection .main-content, #youtubeVideos, #youtubePlaylists, .photo-library {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  box-sizing: border-box;
}
/* style.css */
#update-prompt {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.update-banner {
  background: #2D7A8C;
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  gap: 20px;
  align-items: center;
}

#reload-button {
  background: #E6B85C;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.app-description {
  font-size: 0.9rem;
  color: #888;
  text-align: center;
  max-width: 600px;
  margin: 1rem auto;
  line-height: 1.5;
}

