:root {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-color: #e0e0e0;
  --accent-color: #bb86fc;
  --hover-bg: #2c2c2c;
  --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  margin: 0;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

p.subtitle {
  font-size: 1.2rem;
  color: #a0a0a0;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
}

.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: translateY(-5px);
  background-color: var(--hover-bg);
}

.card h2 {
  margin-top: 0;
  font-size: 1.5rem;
  color: var(--accent-color);
}

.card p {
  font-size: 1rem;
  line-height: 1.5;
  color: #cccccc;
}

.card .arrow {
  align-self: flex-end;
  margin-top: 1rem;
  font-size: 1.2rem;
  color: var(--accent-color);
}

footer {
  margin-top: 4rem;
  color: #777;
  font-size: 0.9rem;
}

/* Auth Panel Styles */
#authPanel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

#authPanel.hidden {
  opacity: 0;
  pointer-events: none;
}

.auth-modal {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 400px;
}

.auth-modal h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #333;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form input {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.auth-form input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.auth-form button {
  padding: 0.75rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.auth-form button:hover {
  background: #0056b3;
}

.auth-form button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.auth-message {
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.auth-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.auth-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.auth-message.loading {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

#mainContent {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Tabbed auth UI (match Supabase1 look) */
.auth-modal {
  width: 92%;
  max-width: 420px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.btn-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #000;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-tab.active {
  background: var(--card-bg);
  border-color: rgba(186, 186, 186, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) inset;
  color: #eaeaea;
}

/* Keep the signup tab label color consistent with other tabs */
.btn-tab[data-tab="signup"] {
  color: #000;
}

.btn-tab[data-tab="signup"].active {
  color: #eaeaea;
}

.form-control {
  display: block;
  width: 100%;
  /* Use symmetric padding and box-sizing so left/right spacing is equal */
  box-sizing: border-box;
  padding: 0.75rem;
  margin-bottom: 0.6rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #222;
  font-size: 0.95rem;
}

.form-control::placeholder {
  color: #999;
}

.btn-block {
  display: inline-block;
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: #111;
  color: #fff;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.btn-block:hover {
  background: #0b0b0b;
}

.auth-msg {
  color: #999;
}

#authLoggedIn p {
  color: #ddd;
}

/* Make the Create account button text white (restore default) */
#signupSubmit {
  color: #fff;
}

#mainContent.visible {
  opacity: 1;
  pointer-events: auto;
}

.logout-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  z-index: 999;
}

.logout-btn:hover {
  background: #c82333;
}

.user-info {
  position: fixed;
  top: 1rem;
  left: 1rem;
  color: var(--accent-color);
  font-size: 0.9rem;
  z-index: 999;
}

hr.solid {
  border-top: 3px solid var(--accent-color);
  margin-top: 10px;
  margin-bottom: 10px;
}

.Text {
  font-family: inherit;
  font-size: 2rem;
  color: var(--accent-color);
  line-height: 1.5;
  font-weight: bolder;
}

.Text p {
  font-size: 1rem;
  color: var(--accent-color);
  line-height: 1.5;
}
