*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #1f2937;
}

/* HEADER */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.header-inner {
  position: relative;
}

.site-logo {
  height: 40px;
  width: auto;
}

.site-title {
  color: #f9fafb;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
}

.site-title:hover {
  color: #e5e7eb;
}

/* Desktop Nav */

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.desktop-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.desktop-more {
  margin-left: auto;
}

.nav-link {
  color: #f9fafb;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: #bbf7d0;
  transform: translateY(-1px);
}

/* Dropdown */

.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #f9fafb;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.dropdown-toggle:hover {
  color: #bbf7d0;
  transform: translateY(-1px);
}

.dropdown-content {
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  padding: 6px 0;
  display: none;
  overflow: hidden;
  animation: fadeInDown 0.25s ease;
  z-index: 999;
}

.dropdown-content a {
  display: block;
  padding: 10px 18px;
  color: #4b5563;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background: #16a34a;
  color: #ffffff;
  padding-left: 24px;
}

.dropdown.open .dropdown-content {
  display: block;
}

/* Mobile Menu */

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid #9ca3af;
  border-radius: 9999px;
  padding: 4px 10px;
  color: #f9fafb;
  font-size: 1.2rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  background: #16a34a;
  color: #ffffff;
  padding: 10px 1.5rem 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transform-origin: top;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu a {
  display: block;
  padding: 8px 0;
  color: #ecfdf5;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(22, 163, 74, 0.5);
  font-size: 0.95rem;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  color: #f9fafb;
  transform: translateX(3px);
}

.mobile-menu.open {
  display: block;
  max-height: 420px;
}

/* PAGE HEADER */

.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 70px 1.25rem 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 60%),
              radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.25), transparent 60%);
  opacity: 0.8;
  pointer-events: none;
}

.page-header h1 {
  position: relative;
  z-index: 1;
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  animation: slideInDown 0.5s ease;
}

.page-header p {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  max-width: 720px;
  margin: 0 auto;
  opacity: 0.96;
  animation: slideInUp 0.5s ease;
}

.pulse-animation {
  position: relative;
  z-index: 1;
  animation: pulse 2s ease-in-out infinite;
}

/* MAIN GAME LAYOUT */

.game-container {
  max-width: 1400px;
  margin: -40px auto 60px;
  padding: 0 1.25rem;
  position: relative;
  z-index: 10;
}

.game-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
}

/* CARD */

.game-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.25);
  animation: slideUp 0.45s ease;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #4f46e5;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Forms & Inputs */

.input-group {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-weight: 600;
  color: #4f46e5;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.input-field {
  width: 100%;
  border-radius: 10px;
  border: 2px solid #6366f1;
  padding: 12px 11px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  outline: none;
  transition: all 0.2s ease;
  background-color: #ffffff;
}

.input-field:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
  transform: translateY(-1px);
}

/* Buttons */

.game-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.game-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.4);
}

.game-btn.secondary {
  background: linear-gradient(135deg, #fb7185 0%, #f97316 100%);
}

.game-btn:disabled {
  opacity: 0.6;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

/* Wordle Board */

.wordle-board {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
  justify-content: center;
}

.wordle-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 64px));
  gap: 8px;
}

.wordle-tile {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 3px solid #d1d5db;
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: all 0.15s ease;
}

.wordle-tile.filled {
  border-color: #4f46e5;
  animation: pop 0.1s ease;
}

.wordle-tile.correct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #059669;
  color: #ffffff;
  animation: flip 0.4s ease;
}

.wordle-tile.present {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #d97706;
  color: #ffffff;
  animation: flip 0.4s ease;
}

.wordle-tile.absent {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  border-color: #4b5563;
  color: #ffffff;
  animation: flip 0.4s ease;
}

/* Keyboard */

.keyboard {
  display: grid;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}

.keyboard-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.key {
  min-width: 40px;
  height: 54px;
  border-radius: 6px;
  border: none;
  background: #d1d5db;
  color: #111827;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  user-select: none;
}

.key:hover {
  background: #9ca3af;
  transform: translateY(-2px);
}

.key.wide {
  min-width: 66px;
  font-size: 0.7rem;
}

.key.correct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
}

.key.present {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
}

.key.absent {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: #ffffff;
}

/* Stats */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 900;
}

/* Players */

.player-list {
  margin-top: 12px;
}

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.player-item.active {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  transform: scale(1.02);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.45);
}

.player-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.player-score {
  font-size: 1.2rem;
  font-weight: 900;
}

/* Notification */

.notification {
  position: fixed;
  top: 90px;
  right: 18px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.45);
  z-index: 9999;
  animation: slideInRight 0.35s ease;
  max-width: 260px;
}

.notification.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  animation: fadeIn 0.25s ease;
}

.modal-content {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 520px;
  width: 92%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #4f46e5;
  margin-bottom: 16px;
  text-align: center;
}

/* Ads */

.adsense-container {
  margin: 24px 0;
  border-radius: 18px;
  border: 2px dashed #c7d2fe;
  padding: 18px;
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.adsense-placeholder {
  text-align: center;
  color: #4f46e5;
  font-size: 0.9rem;
}

/* Info Box */

.info-box {
  margin-top: 18px;
  border-radius: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border-left: 4px solid #4f46e5;
}

.info-box-title {
  font-weight: 700;
  color: #4f46e5;
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.info-box-text {
  font-size: 0.9rem;
  color: #6b21a8;
  line-height: 1.6;
}

/* Placeholder in game area */

.game-placeholder {
  text-align: center;
  padding: 50px 16px;
  color: #9ca3af;
}

.game-placeholder-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #4b5563;
}

.game-placeholder-text {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* Certificate text */

.certificate-text {
  font-size: 0.92rem;
  color: #4b5563;
  margin-bottom: 12px;
}

/* BLOG */

.blog-section {
  max-width: 1000px;
  margin: 60px auto 40px;
  padding: 0 1.25rem;
}

.blog-content {
  background: #ffffff;
  border-radius: 24px;
  padding: 48px 36px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.25);
  line-height: 1.8;
}

.blog-content h2 {
  font-size: 2.1rem;
  font-weight: 900;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.blog-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111827;
  margin-top: 28px;
  margin-bottom: 12px;
}

.blog-content p {
  font-size: 0.98rem;
  color: #4b5563;
  margin-bottom: 16px;
}

.blog-content ul {
  margin-left: 1.3rem;
  margin-bottom: 16px;
  color: #4b5563;
  font-size: 0.97rem;
}

.blog-content li {
  margin-bottom: 8px;
}

.blog-content a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 500;
}

.blog-content a:hover {
  text-decoration: underline;
}

/* Highlight / Example Boxes */

.highlight-box,
.example-box {
  border-radius: 14px;
  padding: 18px 18px 16px;
  margin: 22px 0;
}

.highlight-box {
  background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
  border-left: 4px solid #4f46e5;
}

.example-box {
  background: #eff6ff;
  border-left: 4px solid #7c3aed;
}

/* FAQ */

.faq-section {
  background: rgba(15, 23, 42, 0.03);
  padding: 40px 0 60px;
}

.faq-title {
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  color: #111827;
}

.faq-item {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

.faq-question {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.faq-answer {
  font-size: 0.95rem;
  color: #4b5563;
}

/* FOOTER */

.footer {
  background: linear-gradient(135deg, #111827 0%, #020617 100%);
  color: #e5e7eb;
  padding: 56px 0 22px;
  margin-top: 40px;
}

.footer-column h3 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 16px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 8px;
}

.footer-column a {
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.footer-column a:hover {
  color: #a5b4fc;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin-top: 36px;
  padding-top: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* ANIMATIONS */

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes flip {
  0% {
    transform: rotateX(0deg);
  }
  50% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0deg);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* MEDIA QUERIES */

@media (max-width: 1024px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .desktop-nav,
  .desktop-more {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .page-header {
    padding: 60px 1.25rem 70px;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .page-header p {
    font-size: 0.96rem;
  }

  .game-container {
    margin: -22px auto 50px;
  }

  .game-card {
    padding: 24px 20px;
  }

  .wordle-row {
    grid-template-columns: repeat(5, minmax(40px, 56px));
  }

  .key {
    min-width: 34px;
    height: 46px;
    font-size: 0.75rem;
  }

  .key.wide {
    min-width: 52px;
  }

  .stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-content {
    padding: 32px 20px;
  }

  .blog-content h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 0.95rem;
  }

  .game-card {
    border-radius: 20px;
  }

  .stat-value {
    font-size: 1.25rem;
  }
}
