/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif);
  background-color: var(--background-color, #ffffff);
  color: var(--text-color, #000000);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* Main container for user-facing pages */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Large green checkmark SVG */
.checkmark {
  margin-bottom: 1.5rem;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.checkmark svg {
  width: 100px;
  height: 100px;
}

/* Support photo */
.support-photo {
  margin-bottom: 1.5rem;
}

.support-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color, #0c8b2f);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Main headline - extra large for reassurance */
.main-headline {
  font-size: var(--headline-font-size, 36px);
  font-weight: 700;
  color: var(--text-color, #000000);
  margin-bottom: 2rem;
  line-height: 1.3;
}

/* Page headline for info page */
.page-headline {
  font-size: var(--headline-font-size, 32px);
  font-weight: 700;
  color: var(--text-color, #000000);
  margin-bottom: 2rem;
  line-height: 1.3;
}

/* Reassurance bullet points */
.reassurance-list {
  list-style: none;
  margin: 0 0 3rem 0;
  padding: 0;
  text-align: left;
  width: 100%;
  max-width: 500px;
}

.reassurance-list li {
  font-size: var(--body-font-size, 20px);
  font-weight: 500;
  color: var(--text-color, #1a1a1a);
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  position: relative;
  line-height: 1.5;
}

.reassurance-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  font-size: 28px;
  color: var(--bullet-color, #0c8b2f);
  font-weight: bold;
}

/* Info page list */
.info-list {
  list-style: none;
  margin: 0 0 3rem 0;
  padding: 0;
  text-align: left;
  width: 100%;
  max-width: 500px;
}

.info-list li {
  font-size: var(--body-font-size, 20px);
  font-weight: 500;
  color: var(--text-color, #1a1a1a);
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  position: relative;
  line-height: 1.5;
}

.info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3E%3C/path%3E%3Cline x1='12' y1='9' x2='12' y2='13'%3E%3C/line%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* Action buttons container */
.action-buttons {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Game button - black background for contrast */
.action-button-game {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #000000 !important;
}

/* Action buttons - large and prominent */
.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  background-color: var(--primary-color, #0c8b2f);
  color: #ffffff !important; /* Always white text on green buttons for maximum contrast */
  font-size: 28px; /* Larger text for elderly users */
  font-weight: 700;
  text-decoration: none;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}

.action-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-button svg {
  flex-shrink: 0;
}

/* Extra button variant - slightly different styling */
.action-button-extra {
  background-color: var(--text-color, #333333);
  opacity: 0.85;
}

.action-button-extra:hover {
  opacity: 1;
}

/* Secondary link - more prominent for elderly visibility */
.secondary-link {
  display: block;
  color: #ffffff;
  background-color: var(--primary-color, #0c8b2f);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 1rem;
  padding: 1.25rem 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  opacity: 0.9;
}

.secondary-link:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  opacity: 1;
}

/* Exit button - subtle and at bottom */
.exit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 500px;
  background-color: transparent;
  color: #666666;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  padding: 1rem;
  border: 2px solid #cccccc;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.exit-button:active {
  background-color: #f0f0f0;
  border-color: #999999;
  color: #333333;
}

/* Admin container */
.admin-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
}

/* Admin header */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-headline {
  font-size: 28px;
  font-weight: 700;
  color: #000000;
  margin: 0;
}

.section-heading {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e0e0e0;
}

/* Admin form */
.admin-form {
  background-color: #f5f5f5;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 0.5rem;
}

.form-group small {
  display: block;
  font-size: 13px;
  color: #666666;
  margin-top: 0.25rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="color"],
.form-group select,
.form-group textarea {
  width: 100%;
  font-size: 16px;
  padding: 0.75rem;
  border: 2px solid #cccccc;
  border-radius: 6px;
  font-family: inherit;
  background-color: #ffffff;
}

.form-group input[type="color"] {
  width: 80px;
  height: 50px;
  padding: 0.25rem;
  cursor: pointer;
}

.color-preview {
  width: calc(100% - 90px) !important;
  margin-left: 10px;
  font-family: monospace;
  background-color: #f9f9f9 !important;
  cursor: default;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0c8b2f;
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.5;
}

/* Form row for side-by-side inputs */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Admin buttons */
.admin-button {
  background-color: #0c8b2f;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
}

.admin-button:hover {
  background-color: #0a6e25;
}

.admin-button:active {
  background-color: #085a1f;
}

.logout-button {
  background-color: #dc3545;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.logout-button:hover {
  background-color: #c82333;
}

.admin-links {
  text-align: center;
  margin-top: 2rem;
}

/* Tutorial box */
.tutorial-box {
  background-color: #e7f3ff;
  border: 2px solid #2196f3;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.tutorial-box h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1565c0;
  margin: 0 0 1rem 0;
}

.tutorial-box p {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 0.75rem;
}

.tutorial-box p:last-child {
  margin-bottom: 0;
}

.section-description {
  font-size: 14px;
  color: #666;
  margin: -0.5rem 0 1rem 0;
}

.current-photo {
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: #ffffff;
  border-radius: 6px;
  text-align: center;
}

/* AI Helper box */
.ai-helper-box {
  background-color: #f5f3ff;
  border: 2px solid #7c3aed;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.ai-helper-box h2 {
  font-size: 20px;
  font-weight: 700;
  color: #7c3aed;
}

.ai-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #7c3aed;
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s;
  width: 100%;
}

.ai-button:hover {
  background-color: #6d28d9;
}

.ai-button:active {
  background-color: #5b21b6;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Messages */
.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  border: 1px solid #c3e6cb;
  font-weight: 600;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  border: 1px solid #f5c6cb;
  font-weight: 600;
}

/* Mobile adjustments */
@media (min-width: 768px) {
  .main-headline {
    font-size: calc(var(--headline-font-size, 36px) + 4px);
  }
  
  .page-headline {
    font-size: calc(var(--headline-font-size, 32px) + 4px);
  }
  
  .admin-headline {
    font-size: 32px;
  }
}

/* Ensure tap targets are large enough */
@media (pointer: coarse) {
  .action-button,
  .secondary-link {
    min-height: 60px;
  }
}
