/* Custom Official Duolingo Light Theme Stylesheet */

/* Brand Color Variables */
:root {
  --duo-green: #58cc02;
  --duo-green-dark: #46a302;
  --duo-yellow: #ffc200;
  --duo-yellow-dark: #cc9b00;
  --duo-orange: #ff9600;
  --duo-eel: #4b4b4b;
  --duo-eel-dark: #3c3c3c;
  --duo-snow: #ffffff;
  --duo-light-gray: #f7f7f7;
  --duo-border: #e5e5e5;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  background-color: var(--duo-snow);
  color: var(--duo-eel);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--duo-light-gray);
}
::-webkit-scrollbar-thumb {
  background: var(--duo-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c0c0c0;
}

/* Duolingo Tactile Card styling (Thick border outline + bottom depth shadow) */
.glass-panel {
  background: var(--duo-snow);
  border: 2px solid var(--duo-border);
  border-bottom: 6px solid var(--duo-border);
  border-radius: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease-in-out;
}
.glass-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  border-color: #d8d8d8;
}

/* Duolingo Signature Flat-3D Primary Green Button */
.btn-primary {
  display: inline-block;
  background-color: var(--duo-green);
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.9rem 2.2rem;
  border-radius: 1.25rem;
  border: none;
  /* Thick 3D solid border shadow */
  border-bottom: 4px solid var(--duo-green-dark);
  transition: all 0.08s ease;
  cursor: pointer;
  position: relative;
  text-shadow: 0 1.5px 0px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(4px);
  border-bottom-width: 0px;
  margin-bottom: 4px;
}

/* Secondary Button (Duo Light Gray tactile button) */
.btn-secondary {
  display: inline-block;
  background-color: var(--duo-snow);
  color: var(--duo-eel);
  font-weight: 800;
  padding: 0.65rem 1.5rem;
  border-radius: 1.15rem;
  border: 2px solid var(--duo-border);
  border-bottom: 4px solid var(--duo-border);
  transition: all 0.08s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--duo-light-gray);
  border-color: #d8d8d8;
}

.btn-secondary:active {
  transform: translateY(3px);
  border-bottom-width: 0px;
  margin-bottom: 3px;
}

/* Tactile Stats Cards */
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  background: var(--duo-light-gray);
  border: 2px solid var(--duo-border);
  border-bottom: 4px solid var(--duo-border);
  border-radius: 1.25rem;
  transition: all 0.2s ease-in-out;
}
.stat-card:hover {
  background: var(--duo-snow);
  transform: translateY(-2px);
}
.stat-num {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.1;
}
.stat-label {
  font-size: 0.75rem;
  color: #777777;
  font-weight: 700;
  margin-top: 0.25rem;
}

/* Clean UI Form Styling */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.form-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--duo-eel);
  margin-bottom: 0.35rem;
  margin-left: 0.25rem;
}
.form-hint {
  font-size: 0.65rem;
  color: #888888;
  margin-top: 0.25rem;
  line-height: 1.4;
  margin-left: 0.25rem;
}
.form-input {
  background-color: var(--duo-light-gray);
  border: 2px solid var(--duo-border);
  border-bottom: 4px solid var(--duo-border);
  border-radius: 1rem;
  color: var(--duo-eel-dark);
  padding: 0.7rem 1rem;
  font-size: 1rem; /* min 16px to prevent iOS zoom */
  min-height: 48px;
  box-sizing: border-box;
  transition: all 0.15s ease-in-out;
  font-weight: 600;
}
.form-input::placeholder {
  color: #afafaf;
}
.form-input:focus {
  outline: none;
  background-color: var(--duo-snow);
  border-color: var(--duo-green);
  border-bottom-color: var(--duo-green-dark);
}

/* QR Code Laser scanning line keyframes */
@keyframes qr-scan {
  0% { top: 0%; opacity: 0.8; }
  50% { top: 100%; opacity: 1; }
  100% { top: 0%; opacity: 0.8; }
}
.scan-line {
  animation: qr-scan 2.5s ease-in-out infinite;
}

/* Image Hover Interactive Tilt Animation */
.hover-tilt {
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.hover-tilt:hover {
  transform: scale(1.02) rotate(1deg);
}

/* Dynamic Mobile bottom sticky bar adjustments */
#sticky-bar {
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
}
#sticky-bar.translate-y-full {
  transform: translateY(100%);
}
#join-modal {
  background-color: rgba(60, 60, 60, 0.5);
}
#join-modal.opacity-100 {
  opacity: 1;
}
