* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    background: #0a0e27;
    color: white;
    text-align: center;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
  }
  
  /* Animated floating globes in background */
  body::before,
  body::after {
    content: '🌍';
    position: fixed;
    font-size: 120px;
    animation: float 20s infinite ease-in-out;
    opacity: 0.08;
    z-index: 0;
  }
  
  body::before {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
  }
  
  body::after {
    top: 60%;
    right: 8%;
    font-size: 90px;
    animation-delay: 5s;
  }
  
  @keyframes float {
    0%, 100% {
      transform: translateY(0) rotate(0deg);
    }
    50% {
      transform: translateY(-30px) rotate(180deg);
    }
  }
  
  .container {
    position: relative;
    z-index: 10;
  }
  
  header {
    text-align: center;
    padding: 1.5rem 1rem 1rem;
    color: white;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  header h1 {
    font-size: 56px;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
    letter-spacing: 1px;
  }
  
  header p {
    font-size: 18px;
    opacity: 0.7;
    font-weight: 300;
  }
  
  main {
    flex: 1;
    margin-top: 0;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 1rem;
    width: 100%;
  }
  
  .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
  }
  
  .game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(20, 30, 60, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 2.5rem 1.5rem;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    min-height: 200px;
  }
  
  .game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(100, 150, 255, 0.3);
    border-color: rgba(100, 150, 255, 0.5);
    background: rgba(30, 40, 70, 0.8);
  }
  
  .game-card h2 {
    font-size: 28px;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    font-weight: 600;
  }
  
  .game-card p {
    font-size: 15px;
    position: relative;
    z-index: 1;
    opacity: 0.8;
    font-weight: 300;
  }
  
  footer {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 10;
    font-size: 11px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  /* Top 10 Game Specific Styles */
  .category-title {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
    width: 100%;
  }
  
  .score {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #4a9eff;
    margin-bottom: 1rem;
    width: 100%;
  }
  
  .top-10-list {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.75rem;
    width: 100%;
    max-width: 600px;
  }
  
  .top-10-item {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fafafa;
  }
  
  .top-10-item:last-child {
    margin-bottom: 0;
  }
  
  .top-10-item.revealed {
    background-color: #e8f5e9;
    border-color: #4CAF50;
  }
  
  .rank {
    font-size: 16px;
    font-weight: bold;
    color: #4a9eff;
    margin-right: 0.75rem;
    min-width: 30px;
  }
  
  .country-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
  }
  
  .country-name.blank {
    color: #999;
    font-style: italic;
  }
  
  .input-section {
    text-align: center;
    margin-bottom: 0.5rem;
    width: 100%;
    max-width: 600px;
  }
  
  .input-section input {
    padding: 0.5rem;
    width: 220px;
    font-size: 14px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 0.5rem;
  }
  
  .input-section button {
    padding: 0.5rem 1rem;
    font-size: 14px;
    background-color: #4a9eff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .input-section button:hover {
    background-color: #3a8eef;
  }
  
  .giveup-btn {
    background-color: #f44336;
    margin-left: 0.5rem;
  }
  
  .giveup-btn:hover {
    background-color: #da190b;
  }
  
  .message {
    text-align: center;
    font-size: 14px;
    min-height: 20px;
    color: white;
    width: 100%;
    max-width: 600px;
  }
  
  .message.correct {
    color: #4CAF50;
  }
  
  .message.incorrect {
    color: #f44336;
  }
  
  .message.duplicate {
    color: #FF9800;
  }
  
  /* Wordle Game Styles */
  .wordle-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  
  .row {
    display: flex;
    gap: 0.3rem;
  }
  
  .box {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
  }
  
  .correct {
    background: #2e8b57;
  }
  
  .present {
    background: #f0ad4e;
  }
  
  .absent {
    background: #555;
  }
  
  .empty {
    background: rgba(255, 255, 255, 0.1);
    color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
  }
  
  .input-area {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }
  
  .input-area input {
    padding: 0.75rem;
    width: 250px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    color: white;
  }
  
  .input-area input::placeholder {
    color: rgba(255, 255, 255, 0.4);
  }
  
  .input-area button {
    padding: 0.75rem 1.5rem;
    font-size: 16px;
    background-color: #4a9eff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .input-area button:hover {
    background-color: #3a8eef;
  }
  
  .input-area button:disabled {
    background-color: #444;
    cursor: not-allowed;
  }
  
  .button-group {
    display: flex;
    gap: 0.5rem;
  }
  
  #giveup {
    background-color: #f44336;
  }
  
  #giveup:hover {
    background-color: #da190b;
  }
  
  #message {
    margin-top: 1rem;
    font-size: 18px;
    font-weight: bold;
    color: white;
  }
  
  .back-link {
    display: inline-block;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: normal;
    font-size: 14px;
    transition: color 0.3s;
  }
  
  .back-link:hover {
    color: white;
    text-decoration: none;
  }
  
  #guessed {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 20px 0;
  }
  
  #guessed .box {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.2);
  }
  
  /* Difficulty selection styles */
  #difficulty-selection {
    text-align: center;
    margin-top: 0;
    width: 100%;
  }
  
  #difficulty-selection h2 {
    margin-bottom: 1rem;
  }
  
  .difficulty-btn {
    display: block;
    width: 200px;
    padding: 0.75rem 1.5rem;
    font-size: 18px;
    margin: 0.75rem auto;
    background-color: #4a9eff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .difficulty-btn:hover {
    background-color: #3a8eef;
  }
  
  #game-area {
    display: none;
    width: 100%;
    max-width: 600px;
  }
  
  /* Game box for flag game */
  .game-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
  }
  
  #flag {
    display: none;
    width: 320px;
    height: auto;
    border: 2px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  #loading {
    color: #666;
    font-style: italic;
    font-size: 18px;
  }
  
  #tries {
    font-weight: bold;
    font-size: 18px;
    color: #333;
  }
  
  #result {
    font-size: 20px;
    font-weight: bold;
    min-height: 30px;
    color: #333;
  }
  
  .game-box input {
    padding: 0.75rem;
    width: 250px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 4px;
    text-align: center;
  }
  
  .game-box button {
    padding: 0.75rem 1.5rem;
    font-size: 16px;
    background-color: #4a9eff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .game-box button:hover {
    background-color: #3a8eef;
  }
  
  .game-box #giveup {
    background-color: #f44336;
  }
  
  .game-box #giveup:hover {
    background-color: #da190b;
  }
  
  .game-box button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
  }