body {
  margin: 0;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(42.68% 135.13% at 50% 50.71%, #485283 0%, #202642 100%);
  min-height: 100vh;
}

* {
  box-sizing: border-box;
}

#landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.landing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.logo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.logo,
.logo-image {
  width: 64px;
  height: 64px;
  margin-right: 1rem;
}

h1 {
  font-family: 'Manrope', sans-serif;
  color: white;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 2.5rem;
}

.version-badge {
  margin-left: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  background: #2563eb;
  border-radius: 9999px;
}

h2 {
  font-size: 1rem;
  font-weight: normal;
  color: white;
  margin: 0 auto;
  line-height: 1.5;
}

.difficulty-selector {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.difficulty-selector label {
  display: block;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.difficulty-selector select {
  font-size: 1rem;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Open Sans', sans-serif;
  padding: 0 5px;
}

.difficulty-selector select:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.difficulty-selector select:focus {
  outline: none;
  border-color: none;
}

.btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 17px;
  line-height: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  background: #ffca3a;
  color: #000000;
  font-family: 'Open Sans', sans-serif;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 202, 58, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loader {
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid #ffca3a;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
}

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

footer {
  padding: 1.5rem 0;
  text-align: center;
}

.locale-links {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.locale-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s;
}

.locale-links a:hover {
  color: white;
}

.locale-links a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .btn {
    padding: 10px 20px;
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .logo-title {
    flex-direction: column;
    gap: 20px;
  }
  .logo, .logo-image {
    width: 100px;
    height: 100px;
    margin-right: 0;
    margin-left: 0;
  }
  .locale-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
  .locale-links a {
    padding: 7px;
  }

  h1 {
    font-size: 1.875rem;
    justify-content: center;
    gap: 10px;
  }

  h2 {
    font-size: 0.875rem;
  }
}

/* RTL Support for Arabic, Persian, and Hebrew */
[dir="rtl"] {
  direction: rtl;
}

[dir="rtl"] .landing-content {
  text-align: right;
}

[dir="rtl"] .landing-main h1,
[dir="rtl"] .landing-main h2 {
  text-align: right;
}

[dir="rtl"] .difficulty-selector {
  text-align: right;
}

[dir="rtl"] .difficulty-selector label {
  text-align: right;
  display: block;
  margin-bottom: 8px;
}

[dir="rtl"] .difficulty-selector select {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .logo {
  margin-right: 0;
  margin-left: 1rem;
}

[dir="rtl"] .logo-image {
  margin-right: 0;
  margin-left: 1rem;
}

[dir="rtl"] .version-badge {
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .footer-links {
  direction: ltr;
  text-align: center;
}

[dir="rtl"] .footer-links a {
  direction: ltr;
}

.footer-links a {
  white-space: nowrap !important;
  display: inline-block !important;
}

/* Specific fix for Vietnamese language name */
.footer-links a[href="/vi"] {
  white-space: nowrap !important;
  display: inline-block !important;
  unicode-bidi: normal !important;
}

/* Alternative approach - use non-breaking space */
.footer-links a[href="/vi"]::before {
  content: "";
}

/* RTL adjustments for responsive design */
@media (max-width: 768px) {
  [dir="rtl"] .landing-main h1,
  [dir="rtl"] .landing-main h2 {
    text-align: right;
  }
  
  [dir="rtl"] .difficulty-selector {
    text-align: right;
  }
}

