/* Main container styles */
#main-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding-bottom: 8% !important;
}

#login-wrapper {
  position: relative !important;
  width: 90% !important;
  max-width: 400px !important;
  z-index: 1000 !important;
  margin-bottom: 20px !important;
  animation: float 6s ease-in-out infinite !important;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.form-group.submit-group {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
}

/* Button loading state */
.input-button-group {
  display: flex;
  align-items: center;
  position: relative;
  gap: 10px;
  width: 100%;
}

.input-button-group .input-wrapper {
  flex: 1;
  position: relative;
}

#loginButton {
  position: relative;
  min-width: auto;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(90deg, #1e90ff 0%, #00bfff 100%);
  z-index: 1;
  color: white;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(30, 144, 255, 0.4);
  border: none;
  flex-shrink: 0;
}

#loginButton svg {
  transition: transform 0.3s ease;
  width: 22px;
  height: 22px;
}

#loginButton .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin: 0;
  padding: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -9px;
  margin-top: -9px;
}

#loginButton.loading {
  pointer-events: none !important;
}

#loginButton.loading .btn-text {
  visibility: hidden !important;
}

#loginButton.loading .spinner {
  display: block !important;
}

#loginButton::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #1e90ff, #00bfff, #00ffff, #1e90ff);
  background-size: 400%;
  z-index: -1;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 14px;
}

#loginButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(30, 144, 255, 0.5);
  background: linear-gradient(90deg, #00bfff 0%, #1e90ff 100%);
}

#loginButton:hover::before {
  opacity: 0.7;
  animation: glowing 2s linear infinite;
}

#loginButton:hover svg {
  transform: translateX(2px);
}

#loginButton:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(30, 144, 255, 0.4);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Login Container */
.login-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: block !important;
  overflow-y: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white;
  z-index: 1;
  overflow: hidden;
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../img/bg_login.webp") no-repeat center center;
  background-size: cover;
  opacity: 0.8;
  z-index: -1;
  animation: backgroundAnimation 30s ease-in-out infinite alternate;
}

@keyframes backgroundAnimation {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

.login-card {
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 18px !important;
  padding: 1.5rem 2.5rem 1rem !important;
  width: 100% !important;
  max-width: 400px !important;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  transform: translateY(0) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  position: relative !important;
  display: block !important;
}

.login-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.login-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  padding: 0.3rem 0 0;
  margin-top: 0.5rem;
}

.form-group {
  margin-bottom: 0.7rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.form-control {
  width: 100%;
  padding: 0.8rem 2.5rem 0.8rem 1rem; /* Added right padding for clear button */
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #eeff00;
  transition: all 0.3s ease;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  margin-bottom: 0;
  height: 48px;
  box-sizing: border-box;
}

.clear-input {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #ff4d4d; /* Red color */
  font-size: 20px;
  font-weight: bold;
  display: none; /* Hidden by default */
  z-index: 2;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.clear-input:hover {
  background: rgba(255, 77, 77, 0.2); /* Reddish background on hover */
  color: #ff0000; /* Brighter red on hover */
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.25);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: normal;
  font-size: 16px;
}

/* Error message container styles below */

/* Modal Overlay */
.modal-overlay {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

/* Tampilkan modal saat aktif */
.modal-overlay[style*="display: flex"] {
  opacity: 1;
  visibility: visible;
}

/* Modal Content */
.modal-content {
  background: rgba(22, 33, 62, 0.95); /* #16213e with opacity */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 25px;
  width: 100%;
  max-width: 400px; /* Lebar maksimal agar tidak terlalu lebar di desktop */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  color: white;
  display: flex;
  flex-direction: column;
  position: relative; /* Untuk positioning error banner absolute jika perlu */
}

/* Animasi modal content saat muncul */
.modal-overlay[style*="display: flex"] .modal-content {
  transform: translateY(0);
}

/* Styling pesan modal */
#modal-message {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
  text-align: center;
  color: #e0e0e0;
}

/* Tombol Modal */
.modal-btn {
  background: #ffd700;
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
  min-width: 80px;
}

.modal-btn:hover {
  background: #ffe44d;
  transform: translateY(-1px);
}

.modal-btn:active {
  transform: translateY(1px);
}

/* Buttons Container */
#modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  width: 100%;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ramadan Countdown Styles */
.ramadan-countdown {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  margin-bottom: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ramadan-title {
  color: #ffd700; /* Gold */
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 6px;
  border-radius: 6px;
  min-width: 45px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.countdown-item span.days,
.countdown-item span.hours,
.countdown-item span.minutes,
.countdown-item span.seconds {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.countdown-item span.label {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  margin-top: 2px;
}

.ramadan-greeting {
  color: #ffd700;
  font-size: 1.5rem;
  font-weight: bold;
  animation: pulse 2s infinite;
}

.ramadan-date {
  margin-top: 8px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Quick Links Styles - Restored */
.quick-links {
  display: flex;
  justify-content: center; /* Center the group horizontally */
  gap: 2rem; /* Consistent spacing between items */
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.icon-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: white;
  transition: transform 0.3s ease;
  width: 80px; /* Fixed width for perfect centering */
}

.icon-button:hover {
  transform: translateY(-3px);
}

.icon-circle {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.icon-button:hover .icon-circle {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.icon-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Point Reward Button Styles */
.reward-container {
  text-align: center;
  margin-top: 15px;
  padding-bottom: 5px;
}

.reward-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  background: linear-gradient(45deg, #ffd700, #ffa500);
  color: #1a1a2e;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.reward-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
  background: linear-gradient(45deg, #ffa500, #ffd700);
}

.reward-btn .icon-star {
  font-size: 1.1rem;
}
