html {
  height: -webkit-fill-available;
}
html, body {
  margin: 0;
  height: 100%;
  width: 100%;
  min-height: -webkit-fill-available;
  overflow: hidden;
  background: linear-gradient(120deg, #0d1b2a, #1b263b, #2e1a47, #001f54);
  background-size: 800% 800%;
  animation: ambientFlow 90s ease infinite;
  font-family: 'Segoe UI', sans-serif;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.promo-page, .simple-page {
  background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 25%, #2e1a47 75%, #001f54 100%) !important;
  background-attachment: fixed;
}
@supports (-webkit-touch-callout: none) {
  body {
    height: -webkit-fill-available;
  }
}
@keyframes ambientFlow {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}
#time {
  font-size: min(3.5rem, 10vw);
  font-weight: bold;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8),
               4px 4px 20px rgba(0, 0, 0, 0.4);
  padding: 0 1em;
  cursor: pointer;
  transition: opacity 0.2s;
  min-height: 1.2em;
}
#time:empty::after {
  content: "";
  display: block;
  position: fixed;
  left: 0;
  bottom: 0px;
  width: 100vw;
  height: 6px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%);
  animation: loadingBar 3s linear infinite;
  opacity: 0.7;
  z-index: 1000;
}
@keyframes loadingBar {
  0% { transform: translateX(-100vw); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100vw); }
}
#loading-bar, #loading-bar .bar { display: none !important; }
#loading-bar::before {
  content: '';
  position: fixed;
  bottom: 0;
  width: 60vw;
  height: 120px;
  left: -60vw;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.5) 60%, rgba(255,255,255,0) 100%);
  filter: blur(4px);
  pointer-events: none;
  opacity: 0.7;
  animation: loadingBarGlow 6s cubic-bezier(0.42,0,0.58,1) infinite, loadingBarPulse 2s ease-in-out infinite alternate;
  transform: translateY(80px);
}
#loading-bar .bar::after {
  display: none;
}
@keyframes loadingBarGlow {
  0%   { left: -60vw; }
  100% { left: 100vw; }
}
@keyframes loadingBarPulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}
#time:hover {
  opacity: 0.8;
}
#english {
  font-size: min(1.5rem, 6vw);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}
.translation {
  font-size: min(1.5rem, 4.5vw);
  opacity: 0.8;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}
.literal-label {
  opacity: 0.6;
}
#settings-icon, #play-icon {
  position: fixed;
  bottom: 1rem;
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: opacity 0.3s;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
#settings-icon {
  right: 1rem;
  opacity: 0.3;
}
#play-icon {
  left: 1rem;
  opacity: 0.15;
}
#settings-icon:hover, #play-icon:hover {
  opacity: 0.8;
}
#play-icon path {
  transition: all 0.2s ease;
}
#settings-panel {
  position: fixed;
  bottom: 3rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 8px;
  width: min(300px, calc(100vw - 2rem));
  margin-left: 1rem;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  text-align: left;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}
#settings-panel.open {
  transform: translateX(0);
}
.setting-group {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.setting-group label {
  font-size: 0.9rem;
  opacity: 0.9;
  flex: 1;
  min-width: 0;
  user-select: none;
}
.setting-group .toggle-switch {
  flex: 0 0 auto;
}
.setting-group:has(input:disabled) {
  opacity: 0.5;
}
.setting-group:has(input:disabled) label {
  opacity: 1;
  cursor: not-allowed;
}
.setting-group select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  min-width: 130px;
  flex: 0 0 auto;
}
.setting-group select:hover {
  background: rgba(255, 255, 255, 0.15);
}
.setting-group select:focus {
  border-color: rgba(255, 255, 255, 0.3);
}
.setting-group.has-select {
  position: relative;
}
.setting-group.has-select::after {
  content: '▼';
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.setting-group .slider-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  min-width: 130px;
}
.speed-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  opacity: 0.7;
  transition: opacity .2s;
  flex: 1;
}
.speed-slider:hover {
  opacity: 1;
}
.speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1b263b;
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s;
}
.speed-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1b263b;
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s;
}
.speed-slider::-webkit-slider-thumb:hover {
  background: #2e1a47;
  transform: scale(1.1);
}
.speed-slider::-moz-range-thumb:hover {
  background: #2e1a47;
  transform: scale(1.1);
}
.speed-value {
  font-size: 0.9rem;
  opacity: 0.8;
  min-width: 45px;
  text-align: right;
  user-select: none;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: .3s;
  border-radius: 24px;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .toggle-slider {
  background-color: #1b263b;
}
input:checked + .toggle-slider:before {
  transform: translateX(20px);
}
input:disabled + .toggle-slider {
  background-color: rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
}
input:disabled + .toggle-slider:before {
  background-color: rgba(255, 255, 255, 0.3);
}
.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1rem 0;
}
.footer-links {
  font-size: 0.8rem;
  opacity: 0.7;
}
.footer-links a {
  color: white;
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}
.donate-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #2563eb;
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1;
  transition: background-color 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.donate-button:hover {
  background: #1d4ed8;
}
.donate-button:active {
  background: #1e40af;
}
.donate-icon {
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
}
.donate-text {
  position: relative;
  top: 1px;
  line-height: 1;
}
.audio-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.audio-hint.show {
  opacity: 1;
  animation: fadeInOut 3s forwards;
}
@keyframes fadeInOut {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}
.hidden {
  display: none !important;
}

/* Simple promotional page styles */
.simple-page {
  overflow: auto;
  height: auto;
  min-height: 100vh;
  background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 25%, #2e1a47 75%, #001f54 100%);
  animation: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.container {
  max-width: 900px;
  width: 100%;
}

.main-table {
  width: 100%;
  border-collapse: collapse;
}

.header-section {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  clear: both;
}

.header-section img {
  width: auto;
  height: 4.4rem;
  margin-right: 1rem;
  border-radius: 12px;
  flex-shrink: 0;
}

.header-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}

.header-section h1 {
  margin: 0;
  font-size: 3rem;
  font-weight: bold;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  line-height: 1.0;
}

.header-section .subtitle {
  margin: 0.2rem 0 0 0;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.subtitle-full {
  display: inline;
}

.subtitle-short {
  display: none;
}

.phone-cell {
  width: 300px;
  vertical-align: top;
  padding-right: 1rem;
  text-align: left;
}

.content-cell {
  vertical-align: top;
  padding-left: 1rem;
  text-align: left;
}

.phone-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

.mobile-image {
  display: none;
}

.app-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.title-text {
  flex: 0;
}

.info-section h1 {
  font-size: 3rem;
  margin: 0 0 0.5rem;
  font-weight: bold;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

.subtitle {
  font-size: 1.2rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.quote {
  margin: 0 0 2rem;
  padding: 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: center;
}

.quote::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: #4ade80;
  font-family: Georgia, serif;
  line-height: 1;
}

.irish-quote {
  font-size: 1.4rem;
  font-style: italic;
  margin: 0 0 0.5rem;
  color: #1e293b;
  font-weight: 500;
}

.quote-translation {
  font-size: 1rem;
  margin: 0;
  color: #64748b;
  font-style: italic;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.features li {
  padding: 0.8rem 0;
  font-size: 1.1rem;
  position: relative;
  padding-left: 2rem;
  line-height: 1.5;
}

.features li::before {
  content: "✓";
  color: #166534;
  font-size: 1.2rem;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0.8rem;
  width: 20px;
  height: 20px;
  background: rgba(22, 101, 52, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.features li strong {
  color: white;
  font-weight: 600;
}

.bonus-features {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0.3rem 0 2rem;
  margin-top: -10px;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #166534;
}

.bonus-features strong {
  color: white;
  font-weight: 600;
}

.thank-you {
  text-align: left;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 1.5rem 0 1rem;
}

.thank-you strong {
  color: white;
  font-weight: 700;
}

.shamrock {
  filter: brightness(0) saturate(100%) invert(25%) sepia(80%) saturate(1500%) hue-rotate(100deg) brightness(0.7);
}

.download-btn-svg {
  display: inline-block;
  transition: transform 0.2s ease;
}

.download-btn-svg:hover {
  transform: translateY(-2px);
}

.app-store-badge, .google-play-badge {
  height: 50px;
  width: auto;
}

.download-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1rem;
  margin: 2rem 0;
  justify-content: flex-start;
  align-items: center;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.download-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.download-btn .icon {
  font-size: 1.5rem;
}

.download-btn .text {
  font-size: 1.1rem;
  font-weight: 500;
}

.web-link {
  text-align: center;
  margin: 0;
}

.web-link a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s;
}

.web-link a:hover {
  color: white;
  border-bottom-color: white;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .simple-page {
    padding: 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .main-table, .main-table tbody, .main-table tr {
    display: block;
    width: 100%;
  }

  .phone-cell, .content-cell {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0 1rem;
  }

  .phone-cell {
    display: block;
    margin-bottom: 1rem;
    text-align: left;
    padding-top: 100px;
    padding-bottom: 25px;
  }

  .phone-image {
    display: none;
  }

  .mobile-image {
    display: block;
    width: 50%;
    height: auto;
    max-width: 180px;
    margin: 0;
    margin-left: 0;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  }

  .header-section {
    text-align: left;
    margin-bottom: 1.5rem;
    align-items: flex-start;
  }

  .header-section img {
    width: auto;
    height: 3.2rem;
    margin-right: 1rem;
    margin-bottom: 0;
  }

  .header-text {
    flex: 1;
    min-width: 0;
  }

  .info-section h1 {
    font-size: 2.5rem;
  }

.title-section {
    flex-direction: row;
    text-align: left;
    gap: 1rem;
    align-items: center;
  }

  .app-logo {
    width: 70px;
    height: 70px;
  }

  .phone-image {
    max-height: 350px;
  }

  .features {
    text-align: left;
    display: inline-block;
  }

  .download-buttons {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.5rem;
    padding-bottom: 100px;
  }

  .app-store-badge, .google-play-badge {
    height: 40px;
    width: auto;
    flex-shrink: 1;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .simple-page {
    padding: 0.5rem 1rem;
  }

  .content {
    gap: 0.2rem;
  }

  .info-section h1 {
    font-size: 2rem;
  }

  .app-logo {
    width: 60px;
    height: 60px;
  }

  .phone-image {
    display: none !important;
  }

  .header-section h1 {
    font-size: 2rem;
    margin: 0;
    line-height: 1.0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-section .subtitle {
    font-size: 1rem;
    margin: 0.2rem 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .subtitle-full {
    display: none;
  }

  .subtitle-short {
    display: inline;
  }

  .features {
    text-align: left;
    margin: 0 0 2rem;
    padding: 0 0.5rem;
  }

  .download-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
  }

  .app-store-badge, .google-play-badge {
    height: 40px;
    width: auto;
    flex-shrink: 1;
    min-width: 120px;
  }


  .download-btn {
    width: 100%;
    max-width: 200px;
  }

  .download-btn {
    padding: 0.8rem 1.2rem;
  }

  .download-btn .text {
    font-size: 1rem;
  }
}

