/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}

/* Body with explicit gradient and fallback */
body {
  font-family: "Inter", system-ui, sans-serif;
  /* strong, explicit gradient to show in all browsers */
  background: linear-gradient(
      135deg,
      #fffdef 0%,
      #ffedd5 50%,
      #fffdef 100%
    )
    no-repeat fixed;
  background-color: #fffdef; /* fallback */
  color: #381b00;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Basic page layout */
.site-header {
  padding: 20px 32px;
}
.logo {
  height: 42px;
  display: block;
}

.home-container {
  flex: 1;
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: center;
  padding: 48px 5%;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.home-left {
  flex: 1 1 50%;
  display: flex;
  justify-content: center;
}
.home-right {
  flex: 1 1 50%;
  max-width: 560px;
}

.swami-img {
  max-width: 420px;
  width: 100%;
  border-radius: 240px;
  background: radial-gradient(
    circle at center,
    #fce7c2 0%,
    transparent 70%
  );
}

h2.title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #000;
}
.highlight {
  color: #e26800;
  font-style: italic;
  margin-bottom: 12px;
  font-weight: 600;
}
p {
  color: #3a2405;
  margin-bottom: 14px;
  font-size: 1rem;
}

a {
  color: #e04b00;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.btn.primary {
  background: #e04b00;
  color: #fff;
  border: 0;
}
.btn.secondary {
  background: #fff;
  color: #e04b00;
  border: 2px solid #e04b00;
}

.site-footer {
  text-align: center;
  padding: 20px;
  color: #6b4a1e;
  font-size: 0.9rem;
  margin-top: auto;
}
/* Shared: center auth/main wrappers */
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 28px;
}

.auth-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #2b1500;
}
.auth-subtitle {
  text-align: center;
  color: #6b4a1e;
  margin-top: 6px;
  margin-bottom: 18px;
}

.auth-form {
  display: grid;
  gap: 16px;
}
.form-field label {
  display: block;
  font-weight: 600;
  color: #3a2405;
  margin-bottom: 8px;
}
.form-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #f0d9c2;
  background: #fff;
  color: #2b1500;
  border-radius: 12px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.form-field input:focus {
  border-color: #ffc38c;
  box-shadow: 0 0 0 3px rgba(255, 163, 92, 0.25);
}

.input-with-icon {
  position: relative;
}

/* Ensure password input has right padding for eye button */
.input-with-icon input {
  padding-right: 35px;
}

.icon-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: 0px;
  height: 24px;
  width: 24px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  color: #c24f11;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 999;
  pointer-events: auto;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 0 1px rgba(194, 79, 17, 0.2);
}
.icon-btn.active {
  background: #ffe6d3;
}

.icon-btn:hover {
  background: #fff7f0;
}
.icon-btn svg { 
  width: 16px; 
  height: 16px; 
  fill: none; 
  stroke: currentColor; 
  stroke-width: 2; 
  pointer-events: none; /* Prevent SVG from interfering with clicks */
}
.icon-eye-open { display: inline; }
.icon-eye-off { display: none; }
.icon-btn.active .icon-eye-open { display: none; }
.icon-btn.active .icon-eye-off { display: inline; }

/* Mobile-specific improvements for eye button */
@media (max-width: 768px) {
  .input-with-icon input {
    padding-right: 40px;
  }
  .icon-btn {
    height: 24px;
    width: 24px;
    margin-top: 0px;
    right: 12px;
  }
  .icon-btn svg {
    width: 18px;
    height: 18px;
  }
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3a2405;
}
.link-small {
  color: #e04b00;
  text-decoration: none;
  font-weight: 600;
}
.link-small:hover { text-decoration: underline; }

.btn.btn-block { width: 100%; }

.auth-alt {
  text-align: center;
  margin-top: 16px;
}
.auth-alt a { color: #e04b00; font-weight: 700; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

/* Admin signup list */
.signup-list { display: grid; gap: 10px; }
.signup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: #fff;
  border: 1px solid #f3dfcd;
  border-radius: 12px;
  padding: 12px 14px;
}
.signup-user { display: flex; flex-direction: column; gap: 4px; }
.signup-user span { color: #6b4a1e; font-size: 0.95rem; }
.signup-date { color: #6b4a1e; font-weight: 600; font-size: 0.95rem; }

/* Main page layout */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.header-right { font-weight: 800; color: #2b1500; }
/* Make username premium orange and semibold */
.header-right { font-weight: 600; color: #e04b00; }

/* User menu */
.user-menu { position: relative; }
.user-trigger { background: transparent; border: 0; cursor: pointer; font: inherit; }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid #f3dfcd; border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.12); padding: 6px; min-width: 140px; }
.user-dropdown[hidden] { display: none; }
.dropdown-item { width: 100%; text-align: left; background: #fff7f0; color: #c24f11; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; font-weight: 600; }
.dropdown-item:hover { background: #ffe6d3; }

.main-content { max-width: 1440px; margin: 0 auto; padding: 16px 24px 48px; }
.hero-title {
  text-align: center;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 600; /* semibold */
  line-height: 1.35;
  color: #2b1500;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.hero-sub { text-align: center; color: #6b4a1e; margin: 10px 0 24px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 350px);
  justify-content: center;
  gap: 18px;
}
.sun-card {
  position: relative;
  height: auto;
  aspect-ratio: 1 / 1; /* keep square; image will fill */
  border-radius: 16px;
  border: 0;
  cursor: pointer;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
}
.sun-card span { text-shadow: 0 2px 8px rgba(0,0,0,.25); font-size: 1.15rem; font-weight: 600; }

/* Sunset gradients */
.g1 { background: linear-gradient(180deg, #f9a3c3, #f68e59, #e9b152); }
.g2 { background: linear-gradient(180deg, #ff6aa4, #ff3b3b, #ff9f5a); }
.g3 { background: linear-gradient(180deg, #ff9a7a, #ff784e, #ffb86c); }
.g4 { background: linear-gradient(180deg, #ff7043, #ff5e3a, #ff8a65); }
.g5 { background: linear-gradient(180deg, #ff7043, #ff8a65, #ffb74d); }
.g6 { background: linear-gradient(180deg, #ff6f91, #ff9671, #ffc75f); }
.g7 { background: linear-gradient(180deg, #ff758c, #ff7eb3, #ffb199); }
.g8 { background: linear-gradient(180deg, #ff7e5f, #feb47b, #ffd194); }
.g9 { background: linear-gradient(180deg, #ff8456, #ff5f6d, #ffc371); }
.g10{ background: linear-gradient(180deg, #f857a6, #ff5858, #ffc371); }

@media (max-width: 1400px) {
  .card-grid { grid-template-columns: repeat(3, 350px); }
}
@media (max-width: 1100px) {
  .card-grid { grid-template-columns: repeat(2, 350px); }
}
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 1.6rem; max-width: 680px; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: minmax(260px, 1fr); }
}

/* Header tweaks on small screens */
@media (max-width: 700px) {
  .app-header { padding: 12px 16px; }
  .header-right { font-size: 0.95rem; }
  .logo { height: 36px; }
}

/* Modal */
.modal { position: fixed; inset: 0; display: block; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.modal-content {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(920px, 96vw);
  background: #fff;
  border-radius: 16px;
  padding: 24px 24px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-close { position: absolute; right: 10px; top: 10px; border: 0; background: transparent; font-size: 24px; cursor: pointer; }
.modal-title { font-weight: 800; margin-bottom: 8px; color: #2b1500; }
.modal-body { color: #3a2405; }

/* Card checked badge and image-mode */
.sun-card.checked { overflow: hidden; padding: 0; }
.sun-card.checked .card-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.sun-card img.card-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.sun-card .badge { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: #ff7a2f; color: #fff; display: none; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.sun-card.checked .badge,
.sun-card.visited .badge { display: inline-flex; }
.sun-card .badge svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 3; }

/* Responsive */
@media (max-width: 900px) {
  .home-container {
    flex-direction: column;
    padding: 36px 20px;
    gap: 28px;
    text-align: center;
  }
  .home-right {
    max-width: 100%;
  }
  .swami-img {
    max-width: 260px;
  }
}

/* Large screens: keep centered and readable */
@media (min-width: 1400px) {
  .home-right {
    max-width: 640px;
  }
  h2.title {
    font-size: 1.25rem;
  }
}

/* Tablet and below: center action buttons */
@media (max-width: 700px) {
  .btn-group {
    justify-content: center;
  }
}

/* Success and Error Messages */
.success-message {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  text-align: center;
}

.error-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  text-align: center;
}

.success-message p,
.error-message p {
  margin-bottom: 8px;
}

.success-message small {
  display: block;
  margin-top: 8px;
  font-size: 0.9em;
  opacity: 0.8;
}

/* Additional button styles for messages */
.success-message .btn,
.error-message .btn {
  margin-top: 12px;
}


