.welcome-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--size-xl);
  position: relative;
}

.clouds-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 60px;
  width: 100%;
  max-width: 900px;
  margin-bottom: var(--size-xl);
  position: relative;
  z-index: 1;
}

.plane {
  position: relative;
  width: 320px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
}

.plane-body {
  width: 240%;
  height: 240%;
  object-fit: contain;
  position: absolute;
}

.plane-gif {
  width: 70px;
  height: 70px;
  object-fit: contain;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  position: relative;
  transform: translateX(-25px) translateY(15px);
}

.cloud {
  position: relative;
  width: 220px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
}

.cloud::before {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  background: #ffffff;
  border-radius: 50%;
  top: 0;
  left: 0;
  box-shadow: 55px 0 0 9px #ffffff, 110px 0 0 5px #ffffff, 27px -18px 0 13px #ffffff, 82px -13px 0 11px #ffffff;
}

.cloud::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 45px;
  background: #ffffff;
  border-radius: 50px;
  bottom: 0;
  left: 0;
}

.cloud-gif {
  width: 120px;
  height: 80px;
  object-fit: contain;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  position: relative;
}

.gif-with-halo {
  position: relative;
  display: inline-block;
}

.gif-with-halo::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 15px;
  border: 2px solid rgba(255, 215, 0, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  z-index: 5;
}

.welcome-card {
  width: min(900px, 100%);
  border-radius: var(--border-radius-lg);
  border: var(--border-width) solid var(--color-border);
  background: var(--color-bg-main);
  padding: var(--size-xl-padding);
  box-shadow: var(--shadow-md);
}

h1 {
  margin: 0 0 var(--size-xs);
  color: var(--color-text-primary);
  font-size: var(--heading-h1);
}

p {
  margin: 0 0 var(--size-lg);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--size-xl-gap);
}

.mode {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: var(--size-lg-padding);
  text-align: left;
  display: grid;
  gap: var(--size-xs);
}

.mode span {
  font-size: 1.15rem;
  color: var(--color-text-primary);
}

.mode small {
  color: var(--color-text-primary);
  opacity: 0.9;
}

.mode-active {
  background: var(--color-secondary-mint);
  cursor: pointer;
}

.mode-active:hover:enabled {
  background: var(--color-secondary-blue);
}

.mode-disabled {
  background: var(--color-bg-card);
  opacity: 0.75;
}

.error {
  color: var(--color-text-primary);
  font-weight: 700;
  margin-top: var(--size-xl);
}

.plane-left {
  animation: float 3s ease-in-out infinite;
}

.cloud-left {
  animation: float 3s ease-in-out infinite;
  animation-delay: 0.25s;
}

.cloud-right {
  animation: float 3s ease-in-out infinite;
  animation-delay: 0.5s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@media (max-width: 768px) {
  .welcome-shell {
    padding: var(--size-lg);
  }

  .clouds-container {
    gap: 30px;
    margin-bottom: var(--size-lg);
  }

  .plane {
    width: 240px;
    height: 110px;
  }

  .plane-gif {
    width: 55px;
    height: 55px;
    transform: translateX(-20px) translateY(12px);
  }

  .cloud {
    width: 170px;
    height: 75px;
  }

  .cloud::before {
    width: 65px;
    height: 65px;
    box-shadow: 40px 0 0 7px #ffffff, 80px 0 0 3px #ffffff, 20px -13px 0 10px #ffffff, 60px -10px 0 8px #ffffff;
  }

  .cloud::after {
    width: 170px;
    height: 38px;
  }

  .cloud-gif {
    width: 90px;
    height: 80px;
  }

  .gif-with-halo::before {
    top: -8px;
    width: 80px;
    height: 12px;
    border: 1.5px solid rgba(255, 215, 0, 0.7);
  }

  .welcome-card {
    padding: var(--size-xl);
  }

  h1 {
    font-size: var(--heading-h1-mobile);
  }

  p {
    font-size: 0.875rem;
    margin: 0 0 var(--size-lg);
  }

  .mode-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--size-md-gap);
  }

  .mode {
    padding: var(--size-md-padding);
    gap: var(--size-xs-gap);
  }

  .mode span {
    font-size: 1rem;
  }

  .mode small {
    font-size: 0.7rem;
  }

  .error {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .welcome-shell {
    padding: var(--size-sm);
  }

  .welcome-card {
    padding: var(--size-lg-padding);
    border-radius: var(--border-radius-md);
  }

  h1 {
    font-size: var(--heading-h1-small);
    margin: 0 0 var(--size-xs);
  }

  p {
    font-size: 0.8rem;
    margin: 0 0 var(--size-md);
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode {
    padding: var(--size-md-padding);
  }

  .mode span {
    font-size: 0.95rem;
  }
}

.difficulty-selector {
  grid-column: 1 / -1;
  background: var(--color-bg-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: var(--size-lg-padding);
  margin: var(--size-md) 0;
}

.difficulty-selector p {
  margin: 0 0 var(--size-md);
  font-weight: 600;
}

.difficulty-buttons {
  display: flex;
  gap: var(--size-md-gap);
  flex-wrap: wrap;
}

.difficulty-btn {
  flex: 1;
  min-width: 80px;
  padding: var(--size-md-padding);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.difficulty-btn.easy {
  background: var(--color-success-light, #d4edda);
  color: var(--color-text-primary);
}

.difficulty-btn.easy:hover:enabled {
  background: var(--color-success, #28a745);
  color: white;
}

.difficulty-btn.medium {
  background: var(--color-warning-light, #fff3cd);
  color: var(--color-text-primary);
}

.difficulty-btn.medium:hover:enabled {
  background: var(--color-warning, #ffc107);
  color: var(--color-text-primary);
}

.difficulty-btn.hard {
  background: var(--color-danger-light, #f8d7da);
  color: var(--color-text-primary);
}

.difficulty-btn.hard:hover:enabled {
  background: var(--color-danger, #dc3545);
  color: white;
}

.join-game-form {
  grid-column: 1 / -1;
  background: var(--color-bg-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: var(--size-lg-padding);
  margin: var(--size-md) 0;
}

.join-game-form p {
  margin: 0 0 var(--size-md);
  font-weight: 600;
}

.join-game-input-group {
  display: flex;
  gap: var(--size-md-gap);
  flex-wrap: wrap;
}

.join-game-input {
  flex: 1;
  min-width: 150px;
  padding: var(--size-md-padding);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-md);
  background: white;
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.join-game-input:focus {
  outline: none;
  border-color: var(--color-secondary-mint);
  box-shadow: 0 0 0 3px rgba(185, 218, 209, 0.2);
}

.join-game-input:disabled {
  background: var(--color-bg-card);
  opacity: 0.6;
}

.join-game-btn {
  padding: var(--size-md-padding) var(--size-lg);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.join-game-btn.join {
  background: var(--color-secondary-mint);
  color: var(--color-text-primary);
}

.join-game-btn.join:hover:enabled {
  background: var(--color-secondary-blue);
}

.join-game-btn.join:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.join-game-btn.cancel {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
}

.join-game-btn.cancel:hover:enabled {
  background: var(--color-border);
}

.join-game-btn.cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.difficulty-btn.hard:hover:enabled {
  background: var(--color-danger, #dc3545);
  color: white;
}

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