/* General body styling */
body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background-color: #f3faff;
  color: #333;
  margin: 0;
  padding: 0;
}

/* Main content padding to avoid nav blocking */
.webapps-page {
    padding-top: 120px;
    padding-bottom: 2rem;
}

/* Container for the main content (webapps specific) */
.webapps-page .container {
  max-width: 960px;
  margin: auto;
  text-align: center;
  padding: 0 2rem;
}

/* Header styles */
h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
}

/* Credits section styling */
.credits-section {
  background: linear-gradient(135deg, #f3e7ff 0%, #e7f0ff 100%);
  border: 2px solid #d4c5f9;
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin: 2rem auto 3rem;
  max-width: 700px;
  box-shadow: 0 4px 12px rgba(147, 112, 219, 0.1);
}

.credits-text {
  font-size: 1.05rem;
  color: #4a4a4a;
  line-height: 1.8;
  margin: 0;
}

.credits-text i {
  color: #9370db;
  font-size: 1.3rem;
  vertical-align: middle;
  margin-right: 0.3rem;
}

.credits-text strong {
  color: #6b46c1;
  font-weight: 600;
}

.discord-humor {
  font-size: 0.9rem;
  color: #7b68a3;
  font-style: italic;
  opacity: 0.85;
}

/* Grid layout for app cards */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* App card styling */
.app-card {
  background: #ffffff;
  border: 1px solid #d4e9f2;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.app-card h2 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: #2b506e;
}

.app-card p {
  font-size: 0.95rem;
  color: #555;
}

.app-card a {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background-color: #2b506e;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.app-card a:hover {
  background-color: #1e3a54;
}

/* Account panel styling */
.account-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

/* Login button styling */
#login-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

#login-button:hover {
  background-color: #0056b3;
}

/* User icon button styling */
.user-icon {
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Dropdown menu styling */
.dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 10px;
  width: 200px;
  text-align: center;
  z-index: 1000;
}

.dropdown.hidden {
  display: none;
}

.dropdown-dp {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.dropdown p {
  margin: 5px 0;
  font-weight: bold;
}

.dropdown hr {
  margin: 10px 0;
  border: none;
  border-top: 1px solid #ddd;
}

.dropdown button {
  background: #f44336;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
}

.dropdown button:hover {
  background: #d32f2f;
}

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

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 90%; /* Adjust width for responsiveness */
  max-width: 400px; /* Set a maximum width */
  box-sizing: border-box; /* Include padding in width calculation */
}

.modal-content h2 {
  margin-bottom: 10px;
}

.modal-content input {
  width: 100%; /* Make input fields fit the modal width */
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  box-sizing: border-box; /* Include padding in width calculation */
}

.modal-content button {
  width: 100%; /* Make buttons fit the modal width */
  padding: 10px;
  margin: 10px 0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

#auth-action-button {
  background-color: #007bff;
  color: white;
}

#auth-action-button:hover {
  background-color: #0056b3;
}

#google-login-button {
  background-color: #4285f4;
  color: white;
}

#google-login-button:hover {
  background-color: #357ae8;
}

#close-modal-button {
  background-color: #f44336;
  color: white;
}

#close-modal-button:hover {
  background-color: #d32f2f;
}

#toggle-auth-mode {
  color: #007bff;
  cursor: pointer;
  text-decoration: underline;
}

#toggle-auth-mode:hover {
  color: #0056b3;
}

.error-message {
  color: #f44336;
  font-size: 14px;
  margin-bottom: 10px;
}

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

/* Fallback message styling */
#fallbackMessage {
  position: absolute;
  background-color: #f8d7da;
  color: #721c24;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}