
/* Font loading optimization */
@font-face {
  font-family: 'Open Sans';
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  font-display: swap;
}

/* Reset h1 to prevent H1UserAgentFontSizeInSection warning */
h1 {
  font-size: 32px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
background: radial-gradient(42.68% 135.13% at 50% 50.71%, #2F62A1 0%, #1B4165 100%);
min-height: 100vh;
/* Prevent CLS during font loading */
font-display: swap;
}

/* RTL Support */
[dir="rtl"] {
text-align: right;
}

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

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

#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: 10% 1rem 0;
}

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

.logo {
  width: 64px;
  height: 64px;
  margin-right: 16px;
  /* Prevent CLS by reserving space */
  display: block;
  flex-shrink: 0;
}

h1 {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  /* Prevent CLS by reserving space */
  min-height: 40px;
  line-height: 1.2;
}

.version-badge {
margin-left: 8px;
padding: 4px 8px;
font-size: 12px;
font-weight: 600;
color: white;
background: #2563eb;
border-radius: 9999px;
}

h2 {
font-size: 16px;
font-weight: normal;
color: white;
margin: 0 auto;
line-height: 1.5;
/* Prevent CLS by reserving space */
min-height: 24px;
}

.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: #2563eb;
    box-shadow: 0 3px 0 0 #002984;
    color: #ffffff;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* Prevent CLS by reserving space */
    min-height: 44px;
    display: inline-block;
    text-align: center;
}

.btn:hover {
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(167, 176, 200, 0.2);
}

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

.game-mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.play-1v1-container {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  justify-content: center;
}

.start-solo-btn {
  background: #ffca3a;
  color: #000000;
  box-shadow: 0 3px 0 0 #9e7400;
}

.private-room-checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: white;
  font-size: 14px;
  user-select: none;
}

.private-room-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #ffca3a;
}

.private-room-checkbox span {
  cursor: pointer;
}

.main-text {
  margin-top: 5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
  background: #1c4266;
  border-radius: 20px;
  padding: 30px 40px;
}

.main-text p {
  margin-bottom: 1rem;
}

.main-text p:last-child {
  margin-bottom: 0;
}

.main-text strong {
  font-weight: 600;
  color: white;
}

.main-text h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.main-text h2:first-child {
  margin-top: 0;
}

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

@media (max-width: 768px) {
  .main-text {
    margin-top: 2rem;
    font-size: 0.9375rem;
    padding: 0 1rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 15px;
  }
}

footer {
padding: 1.5rem 0;
margin: 40px 0 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;
}

@media (max-width: 640px) {
    .logo {
        width: 100px;
        height: 100px;
        margin-right: 0;
        margin-left: 0;
    }

    h1 {
        font-size: 1.875rem;
        flex-wrap: nowrap;
    }

    h2 {
        font-size: 0.875rem;
    }
    .logo-title {
        flex-direction: column;
        gap: 20px;
    }
    .locale-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
    .locale-links a {
        padding: 7px;
    }
    
    /* RTL mobile adjustments */
    [dir="rtl"] .logo {
        margin-right: 0;
        margin-left: 0;
    }
}