:root {
  --primary-color: #3a86ff;
  --secondary-color: #4cc9f0;
  --accent-color: #4361ee;
  --light-color: #f8f9fa;
  --text-color: #2b2d42;
  --white: #ffffff;
  --error-color: #f72585;
  --success-color: #4cc9f0;
  --card-bg: rgba(255, 255, 255, 0.9);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: linear-gradient(135deg, hsl(215, 100%, 86%), #3b97ff, #5c9bee);
  color: var(--text-color);
  min-height: 100vh;
  padding-top: 80px;
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Header styles */
.header-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  padding: 0 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid #fff;
  transition: all 0.3s ease;
}

.header-menu:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
}

.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.header-menu .navigation ul li {
  position: relative;
}

.header-menu .navigation ul li a {
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  padding: 22px 20px;
  display: block;
  transition: all 0.3s ease;
}

.header-menu .navigation ul li a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: var(--white);
}

#toggle,
.header-menu label {
  display: none;
  cursor: pointer;
}

.menu {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

@media (max-width: 950px) {
  .header-menu label {
    display: initial;
  }

  .header-menu {
    padding: 15px 10%;
  }

  .header-menu .navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-color);
    display: none;
    border-radius: 0 0 12px 12px;
  }

  .header-menu .navigation ul {
    flex-direction: column;
  }

  .header-menu .navigation ul li {
    width: 100%;
  }

  .header-menu .navigation ul li a {
    padding: 12px 20px;
  }

  #toggle:checked ~ .navigation {
    display: block;
    animation: slideDown 0.4s ease-out;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main content styles */
.main-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 20px;
}

h1 {
  text-align: center;
  color: white;
  margin-bottom: 40px;
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

h1:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgb(213, 252, 255), whitesmoke);
  border-radius: 2px;
}

.rules-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 25px;
}

.rule-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-left: 5px solid var(--primary-color);
}

.rule-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.rule-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.rule-number {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 15px;
  font-weight: 700;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rule-description {
  margin-bottom: 20px;
  line-height: 1.6;
  color: var(--text-color);
  font-size: 1.1rem;
}

.examples {
  background-color: rgba(58, 134, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  border-left: 3px solid var(--primary-color);
}

.example {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.example:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.base-verb {
  font-weight: 600;
  width: 120px;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.arrow {
  margin: 0 15px;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.ing-verb {
  color: var(--accent-color);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .rules-container {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }

  .rule-card {
    padding: 25px;
  }
}

@media (max-width: 600px) {
  .main-container {
    padding: 20px 15px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .rule-title {
    font-size: 1.3rem;
  }

  .rule-number {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .example {
    flex-direction: column;
    align-items: flex-start;
  }

  .base-verb {
    width: auto;
    margin-bottom: 5px;
  }

  .arrow {
    display: none;
  }

  .ing-verb {
    margin-left: 20px;
  }
}
