/* Top-Left Slim Menu - Positioned in top-left corner */
.sidebar-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 8px; /* Made even slimmer */
  z-index: 1000;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  display: flex;
  gap: 6px; /* Reduced gap further */
  align-items: center;
  transform: none; /* Remove any centering transforms */
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 6px 10px; /* Made slimmer */
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
  background-color: rgba(255, 255, 255, 0.05);
}

.parent-menu {
  font-weight: 600;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px); /* Reduced hover effect */
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.menu-icon {
  margin-right: 5px; /* Reduced margin */
  font-size: 12px; /* Smaller icon */
}

.menu-text {
  color: white;
  font-weight: 500;
  text-decoration: none;
  font-size: 11px; /* Smaller text */
}

.dropdown-arrow {
  color: white;
  font-size: 8px; /* Smaller arrow */
  margin-left: 5px; /* Reduced margin */
  transition: transform 0.3s ease;
}

.dropdown-arrow.rotated {
  transform: rotate(180deg);
}

/* Submenu Styles - Changed to dropdown */
.submenu {
  position: absolute;
  top: 100%; /* Position below the parent menu item */
  left: 0; /* Align with the left edge of the parent menu item */
  background-color: rgba(30, 30, 30, 0.95); /* Darker background for visibility */
  border-radius: 6px;
  padding: 6px 0;
  min-width: 160px; /* Smaller width */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px); /* Adjust initial position for dropdown animation */
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.submenu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0); /* Final position for dropdown animation */
}

.submenu-item {
  display: flex;
  align-items: center;
  padding: 8px 12px; /* Made slimmer */
  cursor: pointer;
  transition: all 0.3s ease;
  color: white; /* Changed text color to white for contrast */
}

.submenu-item:hover {
  background-color: rgba(102, 126, 234, 0.3); /* Adjusted hover background for dark menu */
  color: white; /* Keep text white on hover */
}

.submenu-icon {
  margin-right: 6px;
  font-size: 12px; /* Smaller icon */
  min-width: 12px;
  text-align: center;
}

.submenu-text {
  font-size: 11px; /* Smaller text */
  font-weight: 500;
  color: white; /* Ensure submenu text is white */
}

/* Toast Notification Styles */
.toast-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 3000;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  min-width: 300px;
  opacity: 0;
  animation: fadeInOut 3s ease-in-out forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

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

.donate-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  color: white;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #ff6b6b;
}

.donate-content h2 {
  margin-bottom: 20px;
  text-align: center;
  font-size: 24px;
}

/* Improved Donation Amount Buttons */
.donation-amounts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 25px 0;
}

.amount-btn {
  padding: 15px 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  color: white;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.amount-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.amount-btn.selected {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  border-color: #4CAF50;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.amount-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.amount-btn:hover::before {
  left: 100%;
}

/* Custom Amount Input */
.custom-amount-section {
  margin: 25px 0;
  text-align: center;
}

.custom-amount {
  width: 100%;
  max-width: 250px;
  padding: 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 16px;
  text-align: center;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.custom-amount:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 1);
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.custom-amount::placeholder {
  color: rgba(0, 0, 0, 0.6);
  font-style: italic;
}

/* Donation Buttons */
.donate-btn-main {
  background: linear-gradient(135deg, #FF6B6B 0%, #ff5252 100%);
  color: white !important;
  padding: 15px 30px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  min-width: 200px;
  position: relative;
  overflow: hidden;
}

.donate-btn-main:hover {
  background: linear-gradient(135deg, #ff5252 0%, #f44336 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.donate-btn-main:active {
  transform: translateY(0);
}

.donate-btn-main:disabled {
  background: linear-gradient(135deg, #ccc 0%, #999 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading spinner */
.loading-spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid white;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar-menu {
    top: 10px;
    left: 10px;
    gap: 4px;
    padding: 3px 6px;
  }
  
  .menu-item {
    padding: 5px 8px;
  }
  
  .menu-text {
    font-size: 10px;
  }
  
  .menu-icon {
    font-size: 11px;
    margin-right: 4px;
  }
  
  .submenu {
    min-width: 140px;
  }
  
  .donate-content {
    width: 95%;
    padding: 20px;
  }
  
  .toast-notification {
    min-width: 250px;
    font-size: 14px;
    padding: 15px 20px;
  }
  
  .donation-amounts {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .amount-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .custom-amount {
    max-width: 200px;
    padding: 12px;
    font-size: 14px;
  }
  
  .donate-btn-main {
    min-width: 150px;
    padding: 12px 20px;
    font-size: 14px;
  }
}
