/* Base (Mobile First) */
body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0d1b2a, #1b263b);
  color: #e0e6ed;
  margin: 0;
  padding: 0;
  text-align: center;
}
label, label input, #channelSelect { font-size: 2rem; }
/* Links */
a {
  color: #4a90e2; /* primary accent blue */
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover, a:focus {
  color: #9bb1d4; /* lighter blue on hover */
  text-shadow: 0 0 6px rgba(155,177,212,0.6);
}

a:active {
  color: #2a5d91; /* darker pressed state */
}

a:visited {
  color: #7aa0c4; /* subtle variation for visited links */
}

.current-prayer, #countdown {
  background: rgba(155,177,212,0.25);
  font-weight: 600;
  color: #fff;
  box-shadow: inset 0 0 12px rgba(155,177,212,0.6);
  border-left: 4px solid #9bb1d4;
}
#countdown { border-left: none !important; }

.bismillah {
  font-family: "Harmattan", serif;
  font-size: 2.2rem;
  color: #38ff00;
  margin: 15px 0;
  text-shadow: 0 0 12px rgba(255,215,0,0.6);
}
#countdown {
  font-family: "Harmattan";
}
.prayer-name-arabic {
  font-family: "Harmattan", serif !important;
  font-size: 2rem;
  color: #e0e6ed;
  margin-left: 6px;
}

/* Clock */
#clock {
  font-family: 'Segoe UI Light','Helvetica Neue',sans-serif;
  font-size: 3.5rem;
  font-weight: 200;
  color: #e0e6ed;
  margin-top: 20px;
  letter-spacing: 1px;
}
#clock .day {
  display: block;
  font-size: 1.4rem;
  font-weight: 500;
  color: #9bb1d4;
  margin-top: 8px;
}
#clock .date {
  display: block;
  font-size: 2rem;
  font-weight: 300;
  color: #aaa;
  margin-top: 4px;
}
h1 { font-size: 2.5rem; }

/* Player Container */
.player-container {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  width: 98%;
  margin: 15px auto;
  transition: max-height 0.6s ease, opacity 0.6s ease;
  overflow: hidden;
}

/* Minimal Mode */
.player-container.minimal {
  max-height: 200px;
  padding: 12px;
}
.player-container.minimal h1,
.player-container.minimal .channel-select,
.player-container.minimal .volume-slider,
.player-container.minimal footer,
.player-container.minimal #clock,
.player-container.minimal table th,
.player-container.minimal table td {
  display: none;
}
.player-container.minimal .controls {
  justify-content: center;
}
.player-container.minimal #prayerTable tbody tr:not(:last-child) {
  display: none;
}
.player-container.minimal #countdown {
  display: block;
  font-size: 2.5rem;
  font-weight: 500;
  color: #e0e6ed;
  margin-top: 15px;
  background: linear-gradient(90deg, #1b263b, #0d1b2a);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 0 12px rgba(155,177,212,0.4);
}

/* Toggle Button */
.toggle-btn {
  background: #1b263b;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 2rem;
  cursor: pointer;
  transition: 0.3s;
  color: #e0e6ed;
  box-shadow: 0 0 10px rgba(155,177,212,0.4);
  margin: 15px auto;
  display: inline-block;
}
.toggle-btn:hover {
  background: #0d1b2a;
  box-shadow: 0 0 15px rgba(155,177,212,0.6);
}

/* Controls */
.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}
.control-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: #1b263b;
  color: #9bb1d4;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 0 10px rgba(155,177,212,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
}
.control-btn:hover {
  background: #0d1b2a;
  box-shadow: 0 0 15px rgba(155,177,212,0.6);
}
.volume-slider {
  width: 100%;
  accent-color: #9bb1d4;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.9rem;
}
table th, table td {
  padding: 8px;
  text-align: center;
}
table th {
  background: #1b263b;
  color: #9bb1d4;
}
table tr:nth-child(even) {
  background: rgba(255,255,255,0.05);
}
.current-prayer {
  background: rgba(155,177,212,0.15);
  font-weight: 500;
  color: #e0e6ed;
}

/* Footer */
footer {
  margin-top: 20px;
  font-size: 0.8rem;
  color: #9bb1d4;
}

/* Gear Icon */
.settings-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  background: #1b263b;
  border: none;
  border-radius: 50%;
  width: auto;
  height: auto;
  color: #9bb1d4;
  font-size: 3rem;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(155,177,212,0.4);
  transition: 0.3s;
  z-index: 1000;
}
.settings-btn:hover {
  background: #0d1b2a;
  box-shadow: 0 0 15px rgba(155,177,212,0.6);
}
.fa.fa-cog { font-size:3rem; }
/* Side Drawer */
.settings-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: #1b263b;
  color: #e0e6ed;
  box-shadow: -4px 0 20px rgba(0,0,0,0.6);
  padding: 15px;
  transition: right 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  z-index: 999;
}
.settings-drawer.open {
  right: 0;
  opacity: 1;
  animation: slideIn 0.4s ease;
}
.settings-drawer h2 {
  margin-top: 0;
  color: #9bb1d4;
}
@keyframes slideIn {
  from { right: -100%; opacity: 0; }
  to { right: 0; opacity: 1; }
}

/* Accordion */
.accordion-header {
  background: #0d1b2a;
  color: #e0e6ed;
  padding: 8px;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}
.accordion-body {
  display: none;
  padding: 8px;
}
.accordion.open .accordion-body {
  display: block;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Inputs & Dropdowns */
select, input[type="text"], input[type="number"], button {
  width: 100%;
  padding: 8px 12px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #2e3b4e;
  background: rgba(255,255,255,0.05);
  color: #e0e6ed;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}
select:hover, input:hover, button:hover {
  border-color: #9bb1d4;
}
select:focus, input:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 10px rgba(74,144,226,0.6);
  outline: none;
}
button {
  background: linear-gradient(135deg, #4a90e2, #357ab8);
  border: none;
  color: #fff;
  cursor: pointer;
  font-weight: 500;
}
button:hover {
  background: linear-gradient(135deg, #357ab8, #2a5d91);
  transform: translateY(-2px);
}

/* Tablet overrides */
@media (min-width: 481px) {
  #clock {
    font-size: 4rem;
  }
  #clock .day {
    font-size: 1.6rem;
  }
  #clock .date {
    font-size: 1.5rem;
  }

  .player-container {
    width: 95%;
    padding: 20px;
    margin: 20px auto;
  }

  .controls {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
  }

  .control-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .toggle-btn {
    font-size: 2rem;
    padding: 12px 24px;
  }

  .volume-slider {
    width: 100%;
  }

  table {
    font-size: 1.5rem;
  }

  .settings-drawer {
    width: 100%; /* full width drawer on tablets */
  }

  select, input[type="text"], input[type="number"], button {
    font-size: 2rem;
  }
}

/* Desktop overrides */
@media (min-width: 769px) {
  #clock {
    font-size: 6rem;
  }
  #clock .day {
    font-size: 3rem;
  }
  #clock .date {
    font-size: 2rem;
  }

  .player-container {
    width: 90%;
    padding: 40px;
    margin: 30px auto;
    max-width: 800px;
  }

  .controls {
    gap: 20px;
  }

  .volume-slider {
    width: 150px;
  }

  table {
    font-size: 2rem;
  }

  .settings-drawer {
    width: 320px; /* fixed drawer width on desktop */
  }

  select, input[type="text"], input[type="number"], button {
    font-size: 2rem;
    padding: 10px 14px;
  }
}
