/* =========================
   1. GLOBAL LAYOUT & TYPOGRAPHY
   ========================= */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  position: relative;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #fcc9b5; 
  color: #111;
}

p {
  line-height: 1.6;
}

/* =========================
   2. NAVBAR & NAVIGATION
   ========================= */
.navbar {
  background-color: #e58d60;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #eee;
}

.navbar-nav {
  align-items: center;
}

.navbar .navbar-nav .nav-link {
  font-size: 1.35rem; 
  font-weight: 600;
  padding: 12px 18px;
  margin: 0 6px;
  border-radius: 20px;
  color: #000000;
  text-align: center;
  transition: background-color 0.2s ease;
}

.navbar .navbar-nav .nav-link:hover {
  background-color: #ffffff;
  color: #000000;
}

.navbar .navbar-nav .nav-link[aria-current="page"],
.nav-link.active {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  border-bottom: 2px solid #0d6efd;
  background: none;
}

.navbar-toggler {
  border: none;
}

.navbar .navbar-nav .nav-link:focus-visible,
.navbar-toggler:focus-visible,
.skip-link:focus {
  outline: 3px solid #000000;
  outline-offset: 2px;
}

@media (max-width: 576px) {
  .recovery-card {
    margin: 1rem;
    padding: 1.5rem;
  }

  /* Keep text large */
  .recovery-card label,
  .recovery-card .form-text,
  .recovery-card .recovery-code {
    font-size: 18px;
  }
}

/* =========================
   3. HEADINGS & FOOTER
   ========================= */
h3 {
  text-align: center;
}

.footer {
  width: 100%;
  background-color: #e58d60;
  color: black;
  text-align: center;
  padding: 1rem 0;
}

/* =========================
   4. IMAGES & SIZING
   ========================= */
.responsive-image {
  width: 80%;
  max-width: 500px;
  height: auto;
  display: block;
}

.center {
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.home-hero-img {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
}

.games {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0 0 10px 10px;
}

.panel-gif {
  max-width: 120px;
  max-height: 120px;
  width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
}

img {
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (orientation: landscape) and (max-width: 992px) {
  .home-hero-img {
    max-height: 45vh;
  }
}

/* =========================
   5. CARDS & ACCESSIBILITY
   ========================= */
.card {
  border: none;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  transition: transform 0.2s ease-in-out;
}

.card:hover {
  transform: scale(1.03);
}

.skip-link {
  position: absolute;
  top: -50px;
  left: 12px;
  background: #ffffff;
  color: #000000;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 9999;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* =========================
   6. HIGH CONTRAST MODE
   ========================= */
body.high-contrast {
  background-color: #000 !important;
  color: #fff !important;
}

body.high-contrast *:focus-visible {
  outline: 3px solid #ffffff !important;
  outline-offset: 3px !important;
}

body.high-contrast .navbar,
body.high-contrast .footer {
  background-color: #000 !important;
  color: #fff !important;
  border: 1px solid #fff;
}

body.high-contrast .navbar .nav-link {
  color: #fff !important;
}

body.high-contrast .navbar .nav-link:hover {
  background-color: #fff !important;
  color: #000 !important;
}

body.high-contrast .card,
body.high-contrast .alert,
body.high-contrast .container {
  background-color: #000 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
  box-shadow: none !important;
}

body.high-contrast .form-select,
body.high-contrast .form-control,
body.high-contrast .form-check-input {
  background-color: #000 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}

body.high-contrast .form-check-input:checked {
  background-color: #fff !important;
}

body.high-contrast .text-muted,
body.high-contrast .form-text,
body.high-contrast .small {
  color: #e0e0e0 !important;
}

body.high-contrast .btn {
  border: 2px solid #fff !important;
  color: #fff !important;
  background-color: transparent !important;
}

body.high-contrast .btn:hover {
  background-color: #fff !important;
  color: #000 !important;
}

body.high-contrast img {
  border: 1px solid #fff;
}

/* =========================
   7. SYSTEM PREFERENCE (AUTO)
   ========================= */
@media (prefers-contrast: more) {
  body:not(.high-contrast) { }
}

/* =========================
   8. REDUCED MOTION
   ========================= */
body.reduced-motion * {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

body.reduced-motion .card:hover {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .card:hover {
    transform: none !important;
  }
}

/* =========================
   9. GENERAL UI ELEMENTS
   ========================= */
.display-5 {
  letter-spacing: -0.5px;
}

.btn-primary {
  border-radius: 10px;
  padding: 10px 20px;
}

.navbar {
  border-bottom: 1px solid #eee;
}

/* =========================
   10. RECOVERY PAGE SPECIFIC STYLES
   ========================= */

.recovery-card {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  line-height: 1.6; /* improves readability */
}

/* Labels */
.recovery-card label {
  font-size: 18px;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

/* Supporting text */
.recovery-card .form-text {
  font-size: 18px;
  color: #333;
}

/* Recovery code display */
.recovery-card .recovery-code {
  font-size: 22px;
  font-weight: bold;
  color: #000;
  margin-bottom: 1rem;
  word-break: break-all;
  letter-spacing: 2px; /* improves readability */
}

/* Buttons */
.recovery-card .btn,
.recovery-card .btn-primary,
.recovery-card .btn-outline-secondary {
  font-size: 18px;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  min-height: 44px; /* better touch targets */
}

/* Primary button styling */
.recovery-card .btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.recovery-card .btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

/* Input fields */
.recovery-card input.form-control {
  font-size: 18px;
  padding: 0.5rem 0.75rem;
}

/* Placeholder text */
.recovery-card input::placeholder {
  color: #666;
}

/* Focus state (important for accessibility) */
.recovery-card input.form-control:focus {
  outline: 3px solid #1a73e8 !important;
  outline-offset: 2px;
  box-shadow: none !important;
}

/* Error messages */
.recovery-card .alert {
  font-size: 18px;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* =========================
   11. RESPONSIVE ADJUSTMENTS 
   ========================= */

@media (max-width: 576px) {
  .recovery-card {
    margin: 1rem;
    padding: 1.5rem;
  }

  /* KEEP text large for accessibility */
  .recovery-card label,
  .recovery-card .form-text,
  .recovery-card .recovery-code {
    font-size: 18px;
  }

  .recovery-card .btn,
  .recovery-card .btn-primary,
  .recovery-card .btn-outline-secondary {
    font-size: 18px;
    padding: 0.6rem 1.2rem;
  }
}