/* ChirpWord.fun Shared CSS Stylesheet */

/* Global Reset & Base Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #2c3e50, #3498db);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #ffffff;
}

/* Typography */
h1 {
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  text-align: center;
}

h2 {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  margin-top: 30px;
  margin-bottom: 15px;
  color: #1abc9c;
}

p, li {
  line-height: 1.8;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.9);
}

ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #1abc9c;
}

/* Navbar Styles */
.navbar {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(52, 152, 219, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar-brand:hover .navbar-logo {
  transform: rotate(-5deg) scale(1.1);
  box-shadow: 0 4px 18px rgba(52, 152, 219, 0.8);
}

.navbar-menu {
  display: flex;
  gap: 20px;
}

.navbar-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.navbar-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Layout */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Container Cards (Glassmorphism) */
.game-container, 
.about-container, 
.container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  color: #ffffff;
}

.game-container {
  padding: clamp(15px, 5vw, 25px);
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-sizing: border-box;
}

.about-container {
  padding: 30px;
  width: 100%;
  max-width: 800px;
  text-align: center;
}

.container {
  width: 100%;
  padding: 40px;
}

/* Container Modifiers */
.contact-container {
  max-width: 600px;
}

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

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #1abc9c;
  font-weight: 500;
  text-align: left;
}

input, textarea {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: inherit;
  transition: all 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 15px rgba(52, 152, 219, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

input::placeholder, textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Button System */
button, .btn {
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

button svg, .btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

button:disabled, .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Button Theme Colors */
.btn-success {
  background: #27ae60;
}

.btn-success:hover:not(:disabled) {
  background: #2ecc71;
  transform: translateY(-2px);
}

.btn-warning {
  background: #f39c12;
}

.btn-warning:hover:not(:disabled) {
  background: #e67e22;
  transform: translateY(-2px);
}

.btn-danger {
  background: #e74c3c;
}

.btn-danger:hover:not(:disabled) {
  background: #c0392b;
  transform: translateY(-2px);
}

.btn-primary {
  background: #3498db;
}

.btn-primary:hover:not(:disabled) {
  background: #5dade2;
  transform: translateY(-2px);
}

/* SVGs / Icons */
.icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  margin-right: 8px;
  vertical-align: middle;
}

/* Button Containers */
.btn-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 25px;
  flex-wrap: wrap;
}

/* Micro-animations */
.pulse {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
/* ==========================================================================
   Page Specific Components
   ========================================================================== */

/* Game Page Components */
.game-container h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin-bottom: 15px;
}

.game-container .stats-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 10px;
}

.game-container .stat-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 12px;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#timer {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f39c12;
  margin: 0;
}

#remaining-attempts {
  font-size: 1rem;
  color: #e74c3c;
  margin: 0;
  font-weight: 500;
}

#word-display {
  font-size: clamp(1.2rem, 5.5vw, 1.8rem);
  font-weight: 600;
  letter-spacing: clamp(2px, 1.2vw, 5px);
  padding: 12px clamp(8px, 3%, 15px);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  margin: 15px 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-all;
  flex-wrap: wrap;
}

.hint-container {
  background: rgba(241, 196, 15, 0.1);
  border: 1px solid rgba(241, 196, 15, 0.3);
  border-radius: 12px;
  padding: 10px;
  margin: 10px 0;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hint-display {
  font-size: 0.9rem;
  color: #f1c40f;
  font-style: italic;
  text-align: center;
  line-height: 1.3;
}

#meaning-display {
  font-size: 0.9rem;
  color: #1abc9c;
  margin-top: 10px;
  font-style: italic;
  background: rgba(26, 188, 156, 0.1);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(26, 188, 156, 0.3);
  line-height: 1.3;
}

.input-container {
  margin: 15px 0;
}

#guess-input {
  text-align: center;
}

.button-container {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

/* About Page Components */
.section {
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.section h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #f1c40f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.section p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.feature-card h3 {
  font-size: 1.2rem;
  color: #07f6c4;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.about-container .stats-container {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  flex-wrap: wrap;
  gap: 15px;
}

.about-container .stat-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex: 1;
  min-width: 150px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #e74c3c;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 5px;
}

/* Contact Page Components */
.subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
}

.contact-info {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item svg {
  width: 24px;
  height: 24px;
  fill: #1abc9c;
  flex-shrink: 0;
}

.contact-item div {
  flex: 1;
}

.contact-item h3 {
  color: #1abc9c;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.contact-item p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.contact-item a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s;
}

.contact-item a:hover {
  color: #1abc9c;
}

/* Privacy & Terms Components */
.last-updated {
  text-align: center;
  color: #f39c12;
  margin-bottom: 30px;
  font-size: 0.9rem;
}

/* Centering layout for legal page containers */
.legal-container {
  margin: 0 auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .navbar-menu {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .navbar-link {
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  .game-container, 
  .about-container, 
  .container {
    padding: 20px;
    margin: 10px;
  }

  h1 {
    font-size: 2rem;
  }

  /* Stack button containers */
  .button-container, 
  .btn-container {
    flex-direction: column;
  }

  button, .btn {
    width: 100%;
  }

  /* Game Specific Mobile Adjustments */
  /* Replaced by clamp() in global rules */

  .game-container .stats-container {
    flex-direction: column;
    gap: 10px;
  }

  .button-container {
    flex-direction: column;
    gap: 8px;
  }

  /* About Specific Mobile Adjustments */
  .about-container .stats-container {
    flex-direction: column;
    gap: 10px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* SEO Homepage Layout Styles */
.homepage-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 800px;
}

.seo-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  color: #ffffff;
  padding: 35px;
  width: 100%;
  text-align: left;
}

.seo-container h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  text-align: left;
}

.seo-container h2 {
  font-size: 1.4rem;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #1abc9c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.seo-container h3 {
  font-size: 1.1rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #f1c40f;
}

.seo-container p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.seo-intro {
  font-size: 1.05rem !important;
  line-height: 1.7 !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

@media (max-width: 768px) {
  .seo-container {
    padding: 20px;
  }
  .seo-container h1 {
    font-size: 1.6rem;
  }
  .seo-container h2 {
    font-size: 1.25rem;
  }
}

/* Collapsible SEO Accordion Styles */
.seo-details {
  width: 100%;
  max-width: 800px;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.seo-details[open] {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(26, 188, 156, 0.3);
}

.seo-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1abc9c;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.seo-summary::-webkit-details-marker {
  display: none;
}

.seo-summary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #07f6c4;
}

.seo-summary .chevron-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.seo-details[open] .seo-summary .chevron-icon {
  transform: rotate(180deg);
}

/* Override inner container padding and borders when nested */
.seo-details .seo-container {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 24px 24px 24px;
}

/* ==========================================================================
   Bird Mascot Animation
   ========================================================================== */

#bird-mascot {
  position: fixed;
  bottom: -150px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: bottom 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  pointer-events: none; /* Ignore clicks so it doesn't block UI */
}

#bird-mascot.bird-visible {
  bottom: 20px;
}

.bird-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

#bird-mascot.celebrate .bird-img {
  animation: bird-bounce 1s infinite;
}

@keyframes bird-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.speech-bubble {
  background: rgba(255, 255, 255, 0.95);
  color: #0a0f1e;
  padding: 10px 15px;
  border-radius: 15px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  transition-delay: 0.4s;
  text-align: center;
  max-width: 200px;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
  display: block;
  width: 0;
}

#bird-mascot.bird-visible .speech-bubble {
  opacity: 1;
  transform: translateY(0);
}
