:root {
  /* Dark Theme Variables (Default) */
  --bg-color: #1a1a1a;
  --text-color: #f4fdf9;
  --header-bg: #111;
  --header-border: #00C244;
  --header-shadow: rgba(0, 194, 68, 0.2);
  --logo-color: #00C244;
  --container-bg: #2a2a2a;
  --container-border: rgba(0, 194, 68, 0.3);
  --container-shadow: rgba(0, 0, 0, 0.3);
  --heading-color: #00C244;
  --subheading-color: #f4fdf9;
  --input-bg: #111;
  --input-border: #333;
  --input-text-color: #00C244;
  --input-placeholder-color: rgba(0, 194, 68, 0.5);
  --quick-btn-bg: #333;
  --quick-btn-text: #f4fdf9;
  --quick-btn-hover-bg: #00C244;
  --quick-btn-shadow: rgba(0, 0, 0, 0.2);
  --quick-btn-hover-shadow: rgba(0, 194, 68, 0.4);
  --submit-btn-bg: #00C244;
  --submit-btn-text: white;
  --submit-btn-shadow: rgba(0, 194, 68, 0.4);
  --submit-btn-hover-bg: #00A637;
  --submit-btn-hover-shadow: rgba(0, 194, 68, 0.6);
  --icon-block-bg: #111;
  --icon-block-shadow: rgba(0, 0, 0, 0.2);
  --icon-block-hover-shadow: rgba(0, 194, 68, 0.3);
  --icon-block-text: #f4fdf9;
  --footer-bg: #111;
  --footer-text: #ccc;
  --footer-border: #00C244;
  --footer-shadow: rgba(0, 194, 68, 0.2);
  --toggle-bg: #333;
  --toggle-icon-color: #f4fdf9;
  --toggle-hover-bg: #555;
  --spinner-color-primary: #00C244;
  --spinner-color-secondary: rgba(0, 194, 68, 0.3);
}

body.light-theme {
  /* Light Theme Variables */
  --bg-color: #ffffff;
  --text-color: #333333;
  --header-bg: #f0f0f0;
  --header-border: #00C244;
  --header-shadow: rgba(0, 194, 68, 0.1);
  --logo-color: #00C244;
  --container-bg: #ffffff;
  --container-border: rgba(0, 194, 68, 0.2);
  --container-shadow: rgba(0, 0, 0, 0.15);
  --heading-color: #008000; /* Darker green for light theme */
  --subheading-color: #555555;
  --input-bg: #f9f9f9;
  --input-border: #cccccc;
  --input-text-color: #008000;
  --input-placeholder-color: rgba(0, 128, 0, 0.5);
  --quick-btn-bg: #e0e0e0;
  --quick-btn-text: #333333;
  --quick-btn-hover-bg: #00C244;
  --quick-btn-shadow: rgba(0, 0, 0, 0.1);
  --quick-btn-hover-shadow: rgba(0, 194, 68, 0.3);
  --submit-btn-bg: #00C244;
  --submit-btn-text: white;
  --submit-btn-shadow: rgba(0, 194, 68, 0.3);
  --submit-btn-hover-bg: #00A637;
  --submit-btn-hover-shadow: rgba(0, 194, 68, 0.5);
  --icon-block-bg: #f0f0f0;
  --icon-block-shadow: rgba(0, 0, 0, 0.1);
  --icon-block-hover-shadow: rgba(0, 194, 68, 0.2);
  --icon-block-text: #333333;
  --footer-bg: #f0f0f0;
  --footer-text: #666;
  --footer-border: #00C244;
  --footer-shadow: rgba(0, 194, 68, 0.1);
  --toggle-bg: #e0e0e0;
  --toggle-icon-color: #333;
  --toggle-hover-bg: #d0d0d0;
  --spinner-color-primary: #008000;
  --spinner-color-secondary: rgba(0, 128, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease; /* Smooth theme transition */
}

/* Splash Screen */
#splash-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--header-bg); /* Use theme variable */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  /* Changed transition for swipe effect */
  transition: transform 0.7s ease-out, opacity 0.7s ease-out, visibility 0.7s ease-out;
}

#splash-screen.hide {
  opacity: 0;
  visibility: hidden;
  /* Swipe left animation */
  transform: translateX(-100%);
  pointer-events: none;
}

.splash-title {
  font-size: 4vw; /* Responsive font size */
  font-weight: bold;
  color: var(--logo-color);
  margin-bottom: 20px; /* Space between title and logo */
  opacity: 0;
  transform: translateY(-50px);
  animation: fadeInDown 1.2s ease-out forwards;
}

.splash-logo {
  width: 150px;
  animation: zoomInBounce 1.5s ease-out forwards 0.5s; /* Enhanced animation */
  margin-bottom: 15px;
  opacity: 0;
}

.splash-text {
  font-size: 28px;
  font-weight: bold;
  color: var(--logo-color); /* Use theme variable */
  animation: fadeInScale 1.5s ease-out forwards 1s; /* Enhanced animation */
  opacity: 0;
}

/* Splash Screen Animations (for elements within the splash screen) */
@keyframes fadeInDown {
  0% { transform: translateY(-50px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes zoomInBounce {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

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


/* Header */
header {
  background: var(--header-bg);
  color: var(--text-color);
  padding: 15px 0;
  border-bottom: 3px solid var(--header-border);
  box-shadow: 0 4px 10px var(--header-shadow);
  position: relative;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--logo-color);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease-in-out; /* Smooth transition for hover */
}

.logo:hover {
  transform: scale(1.05) rotate(-2deg); /* Subtle animation on hover */
  color: var(--submit-btn-hover-bg); /* Change color on hover */
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--toggle-bg);
  color: var(--toggle-icon-color);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  background: var(--toggle-hover-bg);
  transform: scale(1.1);
}

/* Theme Toggle Icon Display */
.theme-toggle .fa-sun {
  display:block /* Default to sun icon */
}

.theme-toggle .fa-moon {
  display: none; /* Hide moon icon by default */
}

body.light-theme .theme-toggle .fa-sun {
  display: none; /* Hide sun icon in light theme */
}

body.light-theme .theme-toggle .fa-moon {
  display: block; /* Show moon icon in light theme */
}


/* Main Container */
.container {
  max-width: 900px;
  margin: 50px auto;
  padding: 30px;
  background: var(--container-bg);
  border-radius: 15px;
  box-shadow: 0 8px 20px var(--container-shadow);
  border: 1px solid var(--container-border);
  text-align: center;
  animation: fadeIn 1s ease-out forwards;
}

/* Animation for theme change on main content */
.container.theme-change-animation {
  animation: themeFadeScale 0.6s ease-in-out;
}

@keyframes themeFadeScale {
  0% { opacity: 0.8; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.01); }
  100% { opacity: 1; transform: scale(1); }
}

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

h1 {
  color: var(--heading-color);
  margin-bottom: 10px;
  font-size: 2.5em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

h5 {
  color: var(--subheading-color);
  margin-bottom: 30px;
  font-size: 1.1em;
}

/* Payment Icons Section */
.payment-icons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.icon-block {
  background: var(--icon-block-bg);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 10px var(--icon-block-shadow);
  text-align: center;
  width: 100px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.icon-block:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 6px 15px var(--icon-block-hover-shadow);
}

.icon-block img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 8px;
  border-radius: 8px; /* Slightly rounded images */
}

.icon-block span {
  display: block;
  font-size: 0.9em;
  font-weight: bold;
  color: var(--icon-block-text);
}

/* Form Styles */
#depositForm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Amount Input Field - Rounded and Professional */
.amount-input-rounded {
  width: 60%;
  padding: 15px 20px;
  border: 2px solid var(--input-border);
  background: var(--input-bg);
  color: var(--input-text-color);
  border-radius: 30px; /* Fully rounded corners */
  font-size: 1.2em;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.amount-input-rounded::placeholder {
  color: var(--input-placeholder-color);
}

.amount-input-rounded:focus {
  border-color: var(--heading-color);
  box-shadow: 0 0 0 3px rgba(0, 194, 68, 0.3);
}

/* Validation styling for input */
.amount-input-rounded.invalid-input {
  border-color: red !important;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.3) !important;
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}


/* Quick Buttons - Circular Design */
.quick-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px; /* Adjust gap for better spacing */
  width: 80%;
  margin-top: 10px;
}

.quick-circle {
  background: var(--quick-btn-bg);
  color: var(--quick-btn-text);
  border: none;
  border-radius: 50%; /* Make it circular */
  width: 70px; /* Fixed width and height for perfect circle */
  height: 70px; /* Fixed width and height for perfect circle */
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px var(--quick-btn-shadow);
  transition: all 0.3s ease;
  flex-shrink: 0; /* Prevent shrinking on smaller screens */
}

.quick-circle:hover {
  background: var(--quick-btn-hover-bg);
  box-shadow: 0 6px 12px var(--quick-btn-hover-shadow);
  transform: translateY(-3px) scale(1.05); /* Pop effect on hover */
}

/* Submit Button */
.submit-btn {
  background: var(--submit-btn-bg);
  color: var(--submit-btn-text);
  padding: 15px 30px;
  border: none;
  border-radius: 30px; /* Rounded button */
  font-size: 1.3em;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 15px var(--submit-btn-shadow);
  transition: all 0.3s ease;
  width: 70%; /* Adjust width */
  max-width: 300px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.submit-btn:hover {
  background: var(--submit-btn-hover-bg);
  box-shadow: 0 8px 20px var(--submit-btn-hover-shadow);
  transform: translateY(-2px);
}

.submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px var(--submit-btn-shadow);
}


/* Payment Preloader Overlay - Enhanced Design */
.payment-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8); /* Darker overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  /* Initial state for swipe-in */
  transform: translateX(100%);
  transition: opacity 0.1s ease, visibility 0.3s ease, transform 0.3s ease-out; /* Added transform to transition */
}

.payment-preloader.show {
  opacity: 1;
  visibility: visible;
}

.payment-preloader.swipe-in {
  transform: translateX(0); /* Final state for swipe-in */
}


.preloader-content {
  background: var(--container-bg); /* Use theme background */
  padding: 40px 50px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: scale(0.9); /* Subtle scale-in effect */
  animation: preloaderPopIn 0.4s forwards;
}

@keyframes preloaderPopIn {
  from { transform: scale(0.9); opacity: 0.8; }
  to { transform: scale(1); opacity: 1; }
}

/* Spinner - Enhanced Design */
.spinner {
  border: 8px solid var(--spinner-color-secondary); /* Lighter part of the spinner */
  border-top: 8px solid var(--spinner-color-primary); /* Main color of the spinner */
  border-radius: 50%;
  width: 70px; /* Slightly larger spinner */
  height: 70px;
  animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite; /* More dynamic spin */
  margin: 0 auto 25px auto; /* Centered and more space below */
}

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

.payment-preloader p {
  font-size: 22px; /* Slightly larger text */
  font-weight: bold;
  color: var(--text-color); /* Use theme text color */
  margin-top: 15px;
}


/* Footer - Enhanced Design */
footer {
  background: linear-gradient(to right, var(--footer-bg), #00C2441A); /* Subtle gradient */
  color: var(--footer-text);
  text-align: center;
  padding: 25px; /* Increased padding */
  margin-top: 60px; /* More margin from main content */
  border-top: 3px solid var(--footer-border);
  box-shadow: 0 -6px 15px var(--footer-shadow); /* Enhanced shadow */
  border-radius: 10px 10px 0 0; /* Rounded top corners */
  position: relative;
  overflow: hidden; /* For subtle background animation if added */
}

footer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,194,68,0.1) 0%, transparent 70%);
  animation: footerPulse 10s infinite linear;
  z-index: 0;
  opacity: 0.3;
}

@keyframes footerPulse {
  0% { transform: scale(0.5) rotate(0deg); opacity: 0.3; }
  50% { transform: scale(1.2) rotate(180deg); opacity: 0.6; }
  100% { transform: scale(0.5) rotate(360deg); opacity: 0.3; }
}

footer p {
  position: relative;
  z-index: 1; /* Ensure text is above pseudo-element */
  font-size: 1.05em;
  letter-spacing: 0.5px;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
  .container {
    margin: 30px 15px;
    padding: 20px;
  }
  h1 {
    font-size: 2em;
  }
  h5 {
    font-size: 1em;
  }
  .quick-buttons {
    flex-direction: row; /* Keep row for better distribution */
    justify-content: center;
    gap: 10px; /* Smaller gap */
    width: 95%; /* Adjust width */
  }
  .quick-circle {
    width: 60px; /* Smaller circles */
    height: 60px;
    font-size: 0.9em;
  }
  .amount-input-rounded {
    width: 90%;
    font-size: 1.1em;
  }
  .submit-btn {
    width: 90%;
    font-size: 1.2em;
  }
  .payment-icons {
    gap: 15px;
  }
  .icon-block {
    width: 75px;
    padding: 10px;
  }
  .icon-block img {
    width: 45px;
    height: 45px;
  }
  .theme-toggle {
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .splash-title {
    font-size: 6vw; /* More responsive on small screens */
  }
  .splash-text {
    font-size: 24px;
  }
  .spinner {
    width: 60px;
    height: 60px;
  }
  .payment-preloader p {
    font-size: 18px;
  }
  footer {
    margin-top: 40px;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 10px;
  }
  .logo {
    font-size: 24px;
  }
  .container {
    margin: 20px 10px;
    padding: 15px;
  }
  h1 {
    font-size: 1.8em;
  }
  h5 {
    font-size: 0.9em;
  }
  .payment-icons {
    gap: 10px;
  }
  .icon-block {
    width: 70px;
    padding: 8px;
  }
  .icon-block img {
    width: 40px;
    height: 40px;
  }
  .quick-buttons {
    gap: 8px;
  }
  .quick-circle {
    width: 55px;
    height: 55px;
    font-size: 0.85em;
  }
  .amount-input-rounded {
    font-size: 1em;
    padding: 12px 15px;
  }
  .submit-btn {
    font-size: 1.1em;
    padding: 12px 20px;
  }
  .splash-title {
    font-size: 8vw;
  }
  .splash-logo {
    width: 120px;
  }
  .splash-text {
    font-size: 20px;
  }
  footer {
    margin-top: 30px;
    padding: 15px;
  }
}
