/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Fullscreen mode styles */
.fullscreen-active .fullscreen-hidden {
  display: none !important;
}

.fullscreen-active {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.fullscreen-active main {
  display: flex;
  flex-direction: column;
  height: 95vh;
  overflow-y: auto;
}

.fullscreen-active .main-section {
  min-height: 63vh;
  margin-bottom: 10px;
}

.fullscreen-active .announcement-section {
  height: auto;
  margin-bottom: 10px;
  max-height: 40vh; /* Increased to make sure it's fully visible */
}

:root {
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #0f3460;
  --highlight-color: #2dbf64;
  --text-color: #ffffff;
  --text-secondary: #cccccc;
  --admin-color: #e94560;
  --countdown-color: #ffb703;
  --next-prayer-bg: rgba(45, 191, 100, 0.2);
  --scheduled-change-bg: rgba(255, 183, 3, 0.1);
  --delete-color: #e63946;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--primary-color);
  color: var(--text-color);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("background.avif");
  background-color: #0b2545;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.4; /* Increased opacity to make background more visible */
  z-index: -1;
}

.container {
  max-width: 100%;
  height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Toast Styles */
.toast {
  visibility: hidden;
  min-width: 400px;
  background-color: var(--highlight-color);
  color: #fff;
  text-align: center;
  padding: 12px;
  border-radius: 4px;
  position: fixed;
  z-index: 9999;
  left: 90vw;
  top: 0vh;
  transform: translateX(-50%);
  font-size: 22px;
}
.toast.show {
  visibility: visible;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}
@keyframes fadein {
  from {
    right: 0;
    opacity: 0;
  }
  to {
    right: 30px;
    opacity: 1;
  }
}
@keyframes fadeout {
  from {
    right: 30px;
    opacity: 1;
  }
  to {
    right: 0;
    opacity: 0;
  }
}
/* Header Styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  flex-wrap: wrap;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon-buttons {
  display: flex;
  gap: 10px;
}

.logo {
  max-height: 80px;
  /* No border-radius needed for transparent PNG */
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

.current-time {
  font-size: 1.8rem; /* Increased from 1.5rem */
  text-align: center;
}

#current-date {
  font-weight: 300;
  font-size: 1.8rem; /* Added font size */
}

#current-time {
  font-weight: 700;
  font-size: 2rem; /* Increased from 2rem */
}

.btn {
  background-color: var(--accent-color);
  color: var(--text-color);
  border: none;
  padding: 15px 25px; /* Increased from 10px 20px */
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.3rem; /* Increased from 1rem */
  transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
  background-color: var(--highlight-color);
  transform: scale(1.05);
}

.icon-btn {
  background-color: rgba(22, 33, 62, 0.5);
  color: var(--text-color);
  border: none;
  border-radius: 50%;
  width: 50px; /* Increased from 40px */
  height: 50px; /* Increased from 40px */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  padding: 10px; /* Increased from 8px */
}

.icon-btn:hover {
  background-color: var(--highlight-color);
  transform: scale(1.1);
}

.admin-icon {
  background-color: rgba(22, 33, 62, 0.5);
}

.admin-btn {
  background-color: var(--admin-color);
}

/* Main Content Styles */
main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  overflow-y: auto;
}

/* Main horizontal layout section */
.main-section {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-bottom: 0;
}

/* Prayer times container (left side) */
.prayer-times-container {
  flex: 1;
  background-color: rgba(
    22,
    33,
    62,
    0.7
  ); /* More transparent to show background */
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  overflow-x: auto;
}

/* Info sidebar with stacked panels (right side) */
.info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 300px;
  min-width: 300px;
}

.countdown-container {
  background-color: rgba(22, 33, 62, 0.7);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

#next-prayer {
  font-size: 2.2rem; /* Increased from 1.8rem */
  font-weight: 700;
  margin: 10px 0;
}

#countdown {
  font-size: 3rem; /* Increased from 2.5rem */
  font-weight: 700;
  color: var(--countdown-color);
}

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

th,
td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid var(--accent-color);
}

th {
  font-size: 1.6rem; /* Increased from 1.3rem */
  font-weight: 700;
  background-color: rgba(28, 60, 86, 0.8);
  color: #ffffff;
  padding: 18px 15px; /* Increased padding */
}

td {
  font-size: 1.8rem; /* Increased from 1.5rem */
  background-color: rgba(22, 33, 62, 0.4); /* Very transparent table cells */
  padding: 18px 15px; /* Increased padding */
}

.next-prayer-row {
  background-color: rgba(119, 73, 54, 0.6); /* Semi-transparent highlight */
  font-weight: 700;
}

/* Jummah times container styling */
.jummah-container {
  background-color: rgba(11, 37, 69, 0.7);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  flex: 1;
}

.jummah-times {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.jummah-times-horizontal {
  flex-direction: row;
  justify-content: space-evenly;
}

.jummah-times-horizontal .jummah-time-item {
  border-bottom: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  flex: 1;
}

.jummah-times-horizontal .jummah-time-item:last-child {
  border-right: none;
}

.jummah-time-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.jummah-time-item:last-child {
  border-bottom: none;
}

.jummah-label {
  font-size: 1.5rem; /* Increased from 1.3rem */
  margin-bottom: 5px;
  color: var(--text-secondary);
}

.jummah-value {
  font-size: 2.2rem; /* Increased from 1.8rem */
  font-weight: 700;
  color: var(--text-color);
}

.announcement-section {
  background-color: rgba(22, 33, 62, 0.7);
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.announcement-section h2,
.announcement-section h3,
.countdown-container h2 {
  font-size: 2.2rem; /* Increased from 1.8rem */
  margin-bottom: 15px;
  border-bottom: 2px solid var(--highlight-color);
  padding-bottom: 5px;
}

.jummah-container h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--highlight-color);
  padding-bottom: 5px;
}

.announcement-section h3 {
  font-size: 1.8rem; /* Increased from 1.5rem */
  margin-top: 20px;
  border-bottom-color: var(--countdown-color);
}

#announcements {
  font-size: 1.6rem; /* Increased from 1.4rem */
  line-height: 1.6;
  white-space: pre-line;
  margin-bottom: 20px;
}

.autoscroll-container {
  overflow: hidden;
  position: relative;
  max-height: 15vh;
}

/* .autoscroll-content {
  position: absolute;
  width: 100%;
  animation: scrollAnnouncements 20s linear infinite;
  animation-play-state: running;
}

@keyframes scrollAnnouncements {
  0% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(0);
  }
  55% {
    transform: translateY(calc(-100% + 15vh));
  }
  95% {
    transform: translateY(calc(-100% + 15vh));
  }
  100% {
    transform: translateY(0);
  }
} */

.scheduled-changes-section {
  margin-top: 20px;
}

#scheduled-changes {
  font-size: 1.5rem; /* Increased from 1.2rem */
}

.scheduled-change-item {
  background-color: var(--scheduled-change-bg);
  padding: 15px 20px; /* Increased from 10px 15px */
  border-radius: 5px;
  margin-bottom: 15px; /* Increased from 10px */
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.4rem; /* Added font size */
}

.change-date {
  font-weight: 700;
  color: var(--countdown-color);
  font-size: 1.3rem; /* Added font size */
}

/* Password Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: var(--primary-color);
  padding: 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-color);
  font-size: 2rem; /* Added larger font size */
}

.password-input-container {
  margin-bottom: 20px;
}

.password-input-container input {
  width: 100%;
  padding: 12px;
  font-size: 1.5rem; /* Increased from 1.1rem */
  background-color: rgba(22, 33, 62, 0.7);
  border: 1px solid var(--accent-color);
  border-radius: 5px;
  color: var(--text-color);
}

.password-error {
  color: #ff4d4d;
  margin-top: 10px;
  font-size: 1.2rem; /* Increased from 0.9rem */
}

.password-error.hidden {
  display: none;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.modal-buttons button {
  flex: 1;
  padding: 15px; /* Increased from 10px */
  font-size: 1.4rem; /* Added font size */
}

/* Admin Panel Styles */
.admin-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 450px;
  height: 100vh;
  background-color: rgba(13, 27, 42, 0.97);
  padding: 0 20px;
  overflow-y: auto;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  z-index: 100;
  transition: transform 0.3s ease;
}

.admin-panel.hidden {
  transform: translateX(100%);
}
.admin-logout-section {
  text-align: center;
  padding-bottom: 15px;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--admin-color);
  padding: 10px 0;
  position: sticky;
  top: 0;
  background-color: rgba(13, 27, 42, 0.97);
  z-index: 10;
}

.admin-section {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--accent-color);
  padding-bottom: 20px;
}

.admin-section:last-child {
  border-bottom: none;
}

.admin-section h3 {
  margin-bottom: 15px;
  font-size: 1.8rem; /* Increased from 1.5rem */
}

.admin-section h4 {
  margin: 20px 0 10px;
  font-size: 1.6rem; /* Increased from 1.3rem */
  color: var(--countdown-color);
}

.admin-prayer-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--accent-color);
}

.admin-prayer-section:last-child {
  border-bottom: none;
}

.jummah-section {
  background-color: rgba(255, 183, 3, 0.05);
  padding: 15px;
  border-radius: 8px;
}

.admin-note {
  font-size: 1.2rem; /* Increased from 0.9rem */
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-style: italic;
}

.maghrib-auto-info {
  display: flex;
  align-items: center;
  background-color: rgba(45, 191, 100, 0.1);
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
}

.maghrib-time-display {
  font-size: 1.5rem; /* Increased from 1.2rem */
  font-weight: 700;
  color: var(--highlight-color);
}

.maghrib-auto-info small {
  margin-left: 5px;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 1.2rem; /* Added font size */
}

.jummah-row {
  background-color: rgba(255, 255, 0, 0.1);
}

.jummah-iqama-cell {
  text-align: center;
  font-weight: 500;
}

input[type="time"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 15px; /* Increased from 10px */
  background-color: #71717c;
  border: 1px solid var(--accent-color);
  border-radius: 5px;
  color: var(--text-color);
  font-size: 1.4rem; /* Increased from 1.1rem */
  margin-bottom: 15px; /* Increased from 10px */
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center; /* Adjusted from 10px */
  background-size: 15px; /* Increased from 12px */
  padding-right: 40px; /* Increased from 30px */
}

label {
  display: block;
  margin-bottom: 8px; /* Increased from 5px */
  font-size: 1.5rem; /* Increased from 1.2rem */
}

.iqama-item {
  margin-bottom: 15px;
}

.input-group {
  margin-bottom: 15px;
}

.future-iqama-controls {
  margin-bottom: 15px;
}

.save-btn {
  background-color: var(--highlight-color);
  /* margin-top: 10px; */
  width: 100%;
}

.delete-btn {
  background-color: var(--delete-color);
  padding: 10px 15px; /* Increased from 5px 10px */
  font-size: 1.2rem; /* Increased from 0.9rem */
  margin-left: 15px; /* Increased from 10px */
}

.delete-btn:hover {
  background-color: darkred;
}

.scheduled-change-admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--primary-color);
  padding: 15px; /* Increased from 10px */
  border-radius: 5px;
  margin-bottom: 15px; /* Increased from 10px */
}

.scheduled-change-admin-text {
  flex: 1;
  font-size: 1.4rem; /* Added font size */
}

/* Responsive Styles */
@media (min-width: 1024px) {
  /* Desktop styles */
  .main-section {
    flex-direction: row;
  }

  .prayer-times-container {
    flex: 1;
  }

  .info-sidebar {
    width: 300px;
    flex-shrink: 0;
  }
}

@media (max-width: 1023px) and (min-width: 768px) {
  /* Tablet styles */
  .main-section {
    flex-direction: row;
  }

  .prayer-times-container {
    flex: 1;
  }

  .info-sidebar {
    width: 250px;
    flex-shrink: 0;
  }

  .jummah-label {
    font-size: 1.1rem;
  }

  .jummah-value {
    font-size: 1.6rem;
  }
}

@media (max-width: 767px) {
  /* Mobile styles */
  header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .logo-container {
    flex-direction: column;
  }

  h1 {
    font-size: 2rem;
  }

  .main-section {
    flex-direction: column;
  }

  .info-sidebar {
    width: 100%;
    gap: 15px;
  }

  .current-time {
    font-size: 1.2rem;
    margin: 10px 0;
  }

  #current-time {
    font-size: 1.5rem;
  }

  th,
  td {
    padding: 10px;
    font-size: 1.2rem;
  }

  .admin-panel {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  /* Small mobile styles */
  .container {
    padding: 10px;
  }

  .logo {
    max-height: 60px;
  }

  h1 {
    font-size: 1.5rem;
  }

  th,
  td {
    padding: 8px;
    font-size: 1rem;
  }

  .countdown-container,
  .prayer-times-container,
  .announcement-section,
  .jummah-container {
    padding: 15px;
  }

  #countdown {
    font-size: 2rem;
  }

  .scheduled-change-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .scheduled-change-item .change-date {
    margin-top: 5px;
  }
}
