@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #8B5CF6;
  --primary-hover: #7C3AED;
  --text-white: #FFFFFF;
  --text-light: rgba(255, 255, 255, 0.8);
  --text-dark: #333333;
  --text-gray: #666666;
  --bg-light: #FFFFFF;
  --bg-dark: #F7F7F7;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(255, 255, 255, 0.2);
  --wordle-green: #6AAA64;
  --wordle-yellow: #C9B458;
  --wordle-gray: #787C7E;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  width: 100%;
}

html {
  overflow-x: hidden; /* Also prevent horizontal scrolling at the html level */
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5em;
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

@media (min-width: 640px) {
  .container {
    padding: 0 30px;
  }
}

@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
}

/* Header Styles */
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background-color: transparent;
}

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

/* Logo styles */
.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-white);
  padding: 0.5rem;
  transition: filter 300ms;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}

.desktop-menu {
  display: none;
}

.nav-link, .mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-light);
  transition: color 0.2s;
}

.nav-link:hover, .mobile-nav-link:hover {
  color: var(--text-white);
}

.icon {
  width: 1rem;
  height: 1rem;
}

.mobile-menu-button {
  color: var(--text-white);
  padding-right: 0.5rem;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu.show {
  display: block;
}

.mobile-menu-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.language-dropdown, .mobile-language-dropdown {
  position: relative;
}

.language-button, .mobile-language-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
  outline: none;
  font-size: 15px; /* Match the font size with other menu items */
}

.language-button:hover, .mobile-language-button:hover {
  color: var(--text-white);
}

.flag {
  border-radius: 2px;
}

.chevron {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  min-width: 16px;
}

.language-menu, .mobile-language-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 150px;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  margin-top: 8px;
  z-index: 100;
}

.language-menu.show, .mobile-language-menu.show {
  display: block;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  color: var(--text-white);
  transition: background-color 0.2s;
  border-radius: 4px;
  font-size: 15px; /* Match the font size with other menu items */
}

.language-option:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.language-option.active {
  background-color: rgba(255, 255, 255, 0.1);
  font-size: 15px; /* Ensure the active language has the same font size */
}

@media (min-width: 768px) {
  .nav-container {
    padding: 0 32px;
  }
  
  .logo {
    padding-left: 0;
  }
  
  .desktop-menu {
    display: flex;
    align-items: center;
    gap: 32px;
  }
  
  .mobile-menu-button {
    display: none;
  }
  
  .mobile-menu {
    display: none !important;
  }
}

/* Hero Section */
.hero-section {
  padding: 64px 0; /* Reduced from 96px to 64px */
  padding-top: 80px; /* Increased from 64px to 80px for mobile */
  padding-bottom: 96px;
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  width: 100%; /* Ensure it's not wider than viewport */
  overflow: hidden; /* Hide any overflow content */
}

.bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 0;
}

.hero-text {
  max-width: 768px;
  margin: 0 auto;
  text-align: center;
  margin-bottom: 48px;
  padding-top: 0px;
  position: relative;
  z-index: 10;
}

.wordle-main-title {
  font-size: 26px;
  color: white;
  font-weight: 700;
  margin-bottom: 24px;
  display: inline-block;
  white-space: normal;
  max-width: 100%;
  line-height: 1.0;
}

.hero-description {
  font-size: 15px;
  color: rgb(209, 213, 219);
  margin-bottom: 16px;
}

.game-container {
  margin-top: 24px;
  position: relative;
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  max-width: 768px;
  margin: 0 auto;
  z-index: 10;
}

.game-loading {
  position: absolute;
  inset: 0;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid var(--primary);
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.game-iframe {
  width: 100%;
  height: 600px;
  border: 0;
  background-color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-iframe.loaded {
  opacity: 1;
}

.fullscreen-button {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px;
  border-radius: 50%;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 20;
  transition: background-color 0.2s;
}

.fullscreen-button:hover {
  background-color: black;
}

@media (min-width: 768px) {
  .hero-section {
    padding-top: 80px; /* Reduced from 128px to 80px for medium screens */
  }
  
  .wordle-main-title {
    font-size: 40px; /* Updated from 50px to 40px as requested */
    white-space: nowrap;
  }
  
  .game-iframe {
    height: 700px;
  }
}

@media (min-width: 1024px) {
  .hero-section {
    padding-top: 96px; /* Reduced from 144px to 96px for large screens */
  }
}

@media (min-width: 1280px) {
  .hero-section {
    padding-top: 112px; /* Reduced from 160px to 112px for extra large screens */
  }
}

/* Wordle Info Section */
.wordle-section {
  padding: 80px 0;
  background-color: var(--bg-light);
  width: 100%;
  overflow: hidden;
}

.wordle-card {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.info-column {
  padding: 0 16px;
}

.wordle-heading {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: rgb(31, 41, 55);
}

.wordle-subheading {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  color: rgb(55, 65, 81);
}

.text-gray {
  color: rgb(75, 85, 99);
  margin-bottom: 16px;
}

.wordle-list {
  list-style: none;
  margin-bottom: 0;
  color: rgb(75, 85, 99);
}

.wordle-list li {
  margin-bottom: 12px;
}

.color-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 16px 0;
}

.color-box {
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: white;
}

.color-box.green {
  background-color: var(--wordle-green);
}

.color-box.yellow {
  background-color: var(--wordle-yellow);
}

.color-box.gray {
  background-color: var(--wordle-gray);
}

.color-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .color-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .wordle-card {
    padding: 32px;
  }
  
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
  }
}

/* Tips Section */
.tips-section-container {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
}

.tips-section {
  padding: 64px 0;
  color: white;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.tips-content {
  margin-bottom: 32px;
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.tips-heading {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
  text-align: left;
}

.check-icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
  margin-right: 12px;
  margin-top: 2px;
  flex-shrink: 0;
}

.text-primary {
  color: var(--primary);
}

.cta-container {
  margin-top: 40px;
  text-align: center;
}

.cta-text {
  font-size: 20px;
  font-weight: 600;
  color: white;
  margin-bottom: 24px;
}

.cta-button {
  background-color: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s;
}

.cta-button:hover {
  background-color: var(--primary-hover);
}

@media (min-width: 768px) {
  .tips-heading {
    font-size: 30px;
  }
}

/* Features Section */
.features-section {
  padding: 80px 0;
  background-color: var(--bg-light);
  width: 100%;
  overflow: hidden;
}

.features-heading {
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: rgb(31, 41, 55);
}

.features-subheading {
  text-align: center;
  color: rgb(82, 82, 82);
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.feature-card {
  background-color: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.feature-icon-container {
  background-color: rgba(139, 92, 246, 0.1);
  padding: 12px;
  border-radius: 8px;
}

.feature-icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.feature-title {
  font-size: 20px;
  font-weight: 600;
  color: rgb(31, 41, 55);
}

.feature-description {
  color: rgb(82, 82, 82);
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .features-heading {
    font-size: 36px;
  }
}

/* Footer */
.footer {
  position: relative;
  color: white;
  width: 100%;
  overflow: hidden;
}

.footer-content {
  padding: 32px 0;
  position: relative;
  z-index: 10;
  text-align: center;
}

.footer-text {
  color: #9ca3af;
}
