/* Global variables */
:root {
  --green: #1aa36f;
  --light-green: #e9f7f1;
  --dark: #123024;
  --grey: #f5f5f5;
  --text: #222222;
  --radius: 14px;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, sans-serif;
  background: #ffffff;
  color: var(--text);
  line-height: 1.6;
}

/* Header */
header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.header-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-logo {
  height: 48px;
}

.header-lang {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid #cccccc;
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
}

.lang-btn {
  border: none;
  padding: 0.35rem 1rem;
  background: transparent;
  color: #666666;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--green);
  color: #ffffff;
}

/* Banner */
.banner-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 1.7rem auto 3.5rem auto;
}

.banner {
  width: 100%;
  border-radius: 16px;
  display: block;
}

.badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #e53935;
  padding: 0.45rem 0.9rem;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 700;
}

.flacon {
  position: absolute;
  bottom: -65px;
  right: 25px;
  width: 230px;
  max-width: 33%;
  pointer-events: none;
}

/* Main content */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

p {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

/* Hero */
.hero {
  background: var(--light-green);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 2.2rem;
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.3rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-list {
  list-style: none;
}

.hero-list li {
  padding-left: 1.4rem;
  margin-bottom: 0.45rem;
  position: relative;
}

.hero-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 700;
}

/* Titles */
h1 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

h2 {
  font-size: 1.45rem;
  margin: 1.7rem 0 0.9rem;
  font-weight: 700;
}

/* Grid of arguments */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.card {
  background: var(--grey);
  padding: 1rem;
  border-radius: var(--radius);
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

/* FAQ */
.faq-item {
  margin-bottom: 0.9rem;
}

.faq-item strong {
  display: block;
  margin-bottom: 0.2rem;
}

/* CTA box */
.cta-box {
  background: #f0faf6;
  padding: 1.3rem;
  border-radius: var(--radius);
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.cta-box a {
  background: var(--green);
  color: #ffffff;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
}

/* Footer */
footer {
  margin-top: 2.2rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #777777;
}

/* Game container */
.game-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.game-area {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.story-text {
  max-width: 600px;
  margin: 1rem auto;
}

/* Game instructions */
.game-instructions {
  background: #e9f7f1;
  border-radius: 12px;
  padding: 1.2rem;
  max-width: 600px;
  margin: 1.5rem auto;
}

.instruction-item {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #d7eae0;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.7rem;
  text-align: left;
  font-size: 1rem;
}

/* Game buttons */
.start-btn,
.restart-btn {
  background: var(--green);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1.5rem;
  margin-top: 1rem;
  font-size: 1rem;
  cursor: pointer;
}

/* Game info */
.game-info {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 0.8rem;
}

.game-info div {
  background: var(--green);
  color: #ffffff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

/* Game canvas and cells */
.game-canvas {
  position: relative;
  margin: 0 auto;
  background: #f5f5f5;
  border-radius: 8px;
}

.game-cell {
  position: absolute;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
}

.wall {
  background: #d9eee4;
  border-radius: 6px;
}

/* Mobile controls */
.mobile-controls {
  margin-top: 1rem;
  display: none;
}

.controls-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 0.5rem;
}

.control-btn {
  width: 60px;
  height: 60px;
  background: var(--green);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 26px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 700px) {
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-center {
    justify-content: flex-start;
  }

  .header-lang {
    position: static;
    transform: none;
  }

  .flacon {
    width: 180px;
    bottom: -40px;
  }

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

  .mobile-controls {
    display: block;
  }
}
