/* ============================================
   Global Styles
   ============================================ */

body {
  font-family: sans-serif;
  text-align: center;
  padding: 20px;
  background-color: #f4f4f9;
}

/* ============================================
   Auth Loading State
   ============================================ */

/* Loading screen — visible by default, hidden once auth resolves */
#loading {
  position: fixed;
  inset: 0;
  background-color: #f4f4f9;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* App content — hidden by default, shown once auth resolves */
#app {
  display: none;
}

/* ============================================
   Buttons
   ============================================ */

/* Primary button — used for main actions */
.btn-primary {
  padding: 15px 30px;
  font-size: 1.2em;
  cursor: pointer;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  margin-bottom: 30px;
  width: 100%;
  transition: background 0.2s;
}

.btn-primary:hover {
  background-color: #45a049;
}

/* ============================================
   Family Tree Container
   ============================================ */

#familyTreeContainer {
  padding: 25px;
  border: 1px solid #ccc;
  background-color: white;
  max-width: 900px;
  margin: 0 auto;
}

/* ============================================
   Relationship Groups
   ============================================ */

.relationship-group {
  margin-bottom: 30px;
  padding: 15px;
  border-left: 4px solid #2196F3;
  background-color: #eaf7ff;
}

.relationship-group h3 {
  margin-top: 0;
  color: #1976D2;
}

/* ============================================
   Person Cards
   ============================================ */

.person-card {
  display: inline-block;
  background: #ffffff;
  border: 1px solid #ccc;
  padding: 10px 20px;
  margin: 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}

.person-card:hover {
  background: #ddd;
}

/* ============================================
   Login Page
   ============================================ */

.login-container {
  max-width: 400px;
  margin: 60px auto;
  padding: 25px;
  border: 1px solid #ccc;
  background-color: white;
  border-radius: 8px;
  text-align: left;
}

.login-container h1 {
  text-align: center;
  color: #1976D2;
  margin-bottom: 8px;
}

.login-container .subtitle {
  text-align: center;
  color: #666;
  font-size: 0.95em;
  margin-bottom: 24px;
}

.login-container input {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  box-sizing: border-box;
}

.login-container input:focus {
  outline: none;
  border-color: #2196F3;
}

.login-container .forgot-password {
  display: block;
  text-align: center;
  color: #1976D2;
  text-decoration: none;
  font-size: 0.9em;
  margin-top: 8px;
}

.login-container .forgot-password:hover {
  text-decoration: underline;
}

/* Status messages — used for errors and success feedback */
.message {
  text-align: center;
  font-size: 0.9em;
  margin-top: 12px;
  min-height: 20px;
}

.message.error {
  color: #d32f2f;
}

.message.success {
  color: #4CAF50;
}
