/* Base styles */

:root {
  --header-height: 72px;
  /* Fixed header height */
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Site background mesh gradient and section cards */
.site-bg {
  /* Gentle multi-layer mesh gradient */
  background:
    radial-gradient(1200px 500px at 100% 0%, rgba(59,130,246,0.10), transparent 60%),
    radial-gradient(900px 400px at 0% 0%, rgba(99,102,241,0.10), transparent 65%),
    radial-gradient(1000px 500px at 50% 100%, rgba(236,72,153,0.08), transparent 60%),
    linear-gradient(180deg, #f9fbff 0%, #ffffff 40%, #f7fbff 100%);
  background-attachment: fixed;
}

/* Reusable soft card style for sections */
.section-card {
  background: rgba(255, 255, 255, 0.70);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

/* Main layout structure */
main {
  flex: 1 0 auto;
  padding-top: 3rem;
  padding-top: var(--header-height);
}

footer {
  flex-shrink: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

#app {
  max-width: 1200px;
  margin: auto;
  position: relative;
}

#containerProfile {
  padding-top: 0rem;
}

/* Typography */
.text-center {
  text-align: center;
}

.text-gray-700 {
  color: #374151;
}

.logo-style {
  font-family: 'Fredoka One', sans-serif;
  font-size: 24px;
  font-weight: normal;
  color: black;
  letter-spacing: 1px;
  margin: 0;
  align-items: center;
}

#title,
#answer {
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 2px;
}

/* Header and Navigation */
#mainHeader {
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

#mainHeader.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
}

.nav {
  margin: 0 auto;
}

.back-arrow {
  font-size: 12px;
  font-weight: bold;
  color: #0000005f;
  margin-right: 6px;
  line-height: 24px;
  display: flex;
  align-items: center;
}

/* Buttons and interactive elements */
.btn {
  padding: 0.375rem 0.75rem;
  margin-left: 5px;
}

.btn,
a[href^="/login"],
a[href^="/register"] {
  transition: all 0.2s ease;
}

.btn:hover,
a[href^="/login"]:hover,
a[href^="/register"]:hover {
  transform: translateY(-1px);
}

.hover\:text-blue-600:hover {
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

/* Dropdown styles */
.dropdown {
  margin-left: 10px;
}

#userDropdown {
  transform-origin: top right;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: scale(0.95);
}

#userDropdown:not(.hidden) {
  opacity: 1;
  transform: scale(1);
}

/* Game board layout */
#board,
#example {
  width: 350px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
}

#example {
  height: 70px;
}

.tile {
  border: 2px solid lightgrey;
  width: 60px;
  height: 60px;
  margin: 2.5px;
  color: black;
  font-size: 36px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Game state colors */
.correct,
.present,
.absent {
  color: white;
  border-color: white;
}

.correct {
  background-color: #6aaa64;
}

.present {
  background-color: #c98458;
}

.absent {
  background-color: #787c7e;
}

/* Keyboard layout */
.keyboard-row-topbottom,
.keyboard-row-middle {
  width: 400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
}

.keyboard-row-middle {
  width: 360px;
}

.key-tile,
.enter-key-tile {
  border: 1px solid lightgrey;
  border-radius: 0.25em;
  margin: 1px;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

.key-tile {
  width: 36px;
  height: 40px;
}

.enter-key-tile {
  width: 76px;
  height: 40px;
}

/* Game content sections */
.game-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  justify-content: center;
}

.game-content h2,
.game-content p,
.game-content .button-container {
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Flex utilities */
.flex.items-center.space-x-4 {
  gap: 0.75rem;
}

.flex.items-center.gap-3 {
  gap: 0.75rem;
}

/* Animations */
@keyframes streak-pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Remove automatic hover pulsing from all 2xl bold headings site-wide */
.text-2xl.font-bold {
  transition: color 0.2s ease; /* keep color transitions only */
}

.text-2xl.font-bold:hover {
  animation: none; /* stop size/scale changes on hover */
}

/* Footer styles */
footer .d-flex {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

footer ul {
  list-style-type: none;
  padding: 0;
}

footer ul li {
  padding: 0.5rem 0;
}

footer a {
  color: inherit;
  text-decoration: none;
}

/* Mobile navigation */
#mobileNav {
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
  background-color: #fff;
  width: 100%;
  position: absolute;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#mobileNav:not([style*="display: none"]) {
  opacity: 1;
  transform: translateY(0);
}

#mobileNav ul {
  width: 100%;
}

#mobileNav ul li a {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  color: #374151;
  transition: all 0.2s ease;
}

#mobileNav ul li a:hover {
  background-color: #EFF6FF;
  color: #2563EB;
}
/* Responsive styles */
@media (min-width: 577px) and (max-width: 991px) {
  .col-lg-6 img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
  }

  .text-lg-start {
    text-align: center !important;
  }

  .btn-lg {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .game-content {
    text-align: center;
  }

  .game-content .button-container {
    justify-content: center;
  }
}

@media (min-width: 992px) {
  .col-lg-6 img {
    max-width: 100%;
    height: auto;
  }

  .text-lg-start {
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .text-center {
    text-align: left;
  }
}

@media (max-width: 530px) {
  .nav-item-middle {
    display: none;
  }

  .wordness-solo-link {
    display: none;
  }
}

@media (max-width: 576px) {
  .col-10.col-sm-8.col-lg-6 {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .text-lg-start {
    text-align: center !important;
  }

  .btn-lg {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .flex.items-center.gap-3 {
    gap: 0.25rem;
  }

  a[href^="/login"],
  a[href^="/register"] {
    padding: 0.5rem 1rem;
  }

  footer .md\:flex {
    display: block;
  }

  footer .md\:w-1\/2 {
    width: 100%;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  .flex.items-center.gap-3 {
    gap: 0.5rem;
  }
}

@media (max-width: 780px) {
  .navbar-toggler {
    display: block;
  }

  .navbar-collapse {
    display: none;
  }

  .navbar-collapse.collapse.show {
    display: block;
  }

  .navbar-nav {
    display: flex;
    flex-direction: column;
  }

  .navbar-nav .nav-link {
    padding: 10px;
    border-bottom: 0px;
  }

  .nav-item-middle {
    display: none;
  }

  .wordness-solo-link {
    display: block;
  }
}

/* Custom styles for navbar and images */
#menuToggle {
  margin-left: 0.5rem;
}

.navbar-toggler {
  border: none;
}

.navbar-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%280, 0, 0, 1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.col-10.col-sm-8.col-lg-6.d-flex.justify-content-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Reusable soft hero and section styles (shared with index/dashboard) */
.hero-soft {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(1000px 400px at 10% 0%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(900px 300px at 90% 10%, rgba(99, 102, 241, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.86) 100%);
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.08);
}

.section-enhanced {
  position: relative;
  overflow: hidden;
}

.section-enhanced::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: float 20s infinite linear;
}

@keyframes float {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Icon circle used above headings */
.icon-enhanced {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  padding: 16px;
  border-radius: 50%;
  display: inline-flex;
  margin-bottom: 1.0rem;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  color: #fff;
}

.icon-enhanced:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4);
}

/* Subtle hover for cards */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* Small utility for gradient title text */
.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced button */
.btn-enhanced {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-enhanced:hover::before {
  left: 100%;
}

/* Stats card helpers */
.stat-label {
  color: #6b7280; /* tailwind gray-500 */
  font-size: 0.875rem;
}

.stat-value {
  font-weight: 800;
  font-size: 1.75rem;
  color: #111827; /* gray-900 */
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #EEF2FF; /* indigo-50 */
  color: #4F46E5;      /* indigo-600 */
}
/* End reusable UI */
footer .d-flex {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

footer ul {
  list-style-type: none;
  padding: 0;
}

footer ul li {
  padding: 0.5rem 0;
}

footer a {
  color: inherit;
  text-decoration: none;
}

/* Mobile navigation */
#mobileNav {
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
  background-color: #fff;
  width: 100%;
  position: absolute;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#mobileNav:not([style*="display: none"]) {
  opacity: 1;
  transform: translateY(0);
}

#mobileNav ul {
  width: 100%;
}

#mobileNav ul li a {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  color: #374151;
  transition: all 0.2s ease;
}

#mobileNav ul li a:hover {
  background-color: #EFF6FF;
  color: #2563EB;
}

/* Image lazyload utility */
img.lazyload {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

img.lazyload.loaded {
  opacity: 1;
}

/* Shared animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}