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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #ECFEE8;
  color: #331E36;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header */
header {
  background-color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #C2EFEB;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-img {
  height: 75px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links li {
  list-style: none;
}

.login-btn {
  padding: 0.75rem 3.5rem;
  background-color: #6EA4BF;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
}

.login-error {
  background-color: #ffe6e6; /* light red background */
  color: #cc0000; /* red text */
  border: 1px solid #cc0000;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
}

.burger {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
}

/* Hero */
.hero {
  position: relative;
  height: 80vh;
  background-image: url('assets/hero-img.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

/* Add padding around hero-overlay, so it doesn't touch edges */
.hero-padding-container {
  padding: 0 1.5rem; /* horizontal padding outside black overlay */
}

/* Keep hero-overlay width controlled, center it */
.hero-overlay {
  background-color: rgba(0, 0, 0, 0.45);
  padding: 3rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 12px;
  box-sizing: border-box; /* to make padding consistent */
}

.hero h1 {
  font-size: 2.8rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
}

.hero-overlay h1 span {
  display: block;
}

.hero-overlay .line1 {
  margin-bottom: 2rem; /* bigger space after "Want to play?" */
}

.hero-overlay .line2 {
  margin-bottom: 2rem; /* bigger space after rackets */
}


/* Fix hero image cut-off on small screens by using background-size: contain and adjusting height */
@media (max-width: 768px) {
  .hero {
    height: 60vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
  }

  .hero h1 {
    font-size: 1.8rem;
  }
}

/* How It Works Section */
.how-it-works {
  padding: 2rem 1rem;
}

.how-it-works-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.how-it-works-heading h2 {
  font-size: 2.5rem;
  font-weight: 600;
}

/* Step section wrapper */
.step-section {
  background-color: #C2EFEB;
  padding: 3rem 2rem;
  border-radius: 30px;
  margin: 2rem auto;
  max-width: 1200px;
}

/* Step container inside step section */
.step-container {
  display: flex;
  flex-direction: column; /* stacked on mobile */
  align-items: center;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  /* Height set dynamically with JS */
}

.step-circle {
  flex: 0 0 auto;
  background-color: #ffffff;
  color: #6EA4BF;
  font-weight: 600;
  font-size: 1.2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(110, 164, 191, 0.3);
  margin-bottom: 1rem;
}

.step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

.step-text {
  max-width: 600px;
}

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

.step-img {
  width: auto;
  height: auto;
  max-width: 100%;
  margin: auto;
  display: block;
}

/* On smaller screens, reduce step images proportionally */
@media (max-width: 768px) {
  .step-img {
    max-width: 250px;
    max-height: 180px;
  }
}

/* Footer */
footer {
  padding: 2rem;
  text-align: center;
  background-color: #ECFEE8;
  font-size: 0.9rem;
}

.footer-info {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer-contact {
  margin-top: 1rem;
}

.contact-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: #7FB77E;
  color: white;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.contact-btn:hover {
  background-color: #5A9367;
}

/* Responsive */

/* Tablet and smaller (mobile) */
@media (max-width: 767px) {
  /* Stack steps vertically */
  .step-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .step-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .step-text, .step-visual {
    max-width: 100%;
  }

  .step-circle {
    align-self: center;
    margin-bottom: 1rem;
  }

  .hero {
    height: 60vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 2rem;
    flex-direction: column;
    gap: 0.5rem;
    background-color: white;
    padding: 1rem;
    border-radius: 5px;
  }

  .nav-links.active {
    display: flex;
  }

  .burger {
    display: block;
  }
}

/* Desktop and tablet landscape */
@media (min-width: 768px) {
  .step-container {
    display: flex;
    flex-direction: row;
    align-items: stretch; /* stretch content to equal height */
    text-align: left;
  }

  .step-circle {
    margin-right: 1.5rem;
    align-self: center;
  }

.step-content {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  flex: 1;
}

.step-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.step-visual {
  flex: 2; /* makes image area bigger */
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-img {
  max-height: 220px;
  object-fit: contain;
}

@media (max-width: 767px) {
  .step-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 350px; /* force same height */
    text-align: center;
  }
}
}

.contact-page {
  max-width: 600px;
  margin: 5rem auto;
  padding: 2rem;
  text-align: center;
}

.contact-page h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: #333;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.contact-form button {
  background-color: #000;
  color: white;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #333;
}


.auth-page {
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-container {
  max-width: 600px;
  margin: 5rem auto;
  padding: 2rem;
  text-align: center;
  background-color: #fff; /* clean white */
  border: 2px solid #C2EFEB; /* your soft teal border */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(102, 112, 124, 0.1);
}

.auth-container h2 {
  color: #331E36; /* Your dark purple */
  margin-bottom: 2rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form input {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.auth-form button {
  background-color: #6EA4BF; /* Your main blue */
  color: white;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.auth-form button:hover {
  background-color: #5489a1; /* Darker blue on hover */
}

.auth-actions {
  text-align: right;
}

.auth-actions a {
  color: #6EA4BF;
  font-size: 0.9rem;
  text-decoration: none;
}

.auth-actions a:hover {
  text-decoration: underline;
}

.signup-prompt {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: #331E36;
}

.signup-prompt a {
  color: #6EA4BF;
  text-decoration: none;
  font-weight: 600;
}

.signup-prompt a:hover {
  text-decoration: underline;
}


.about-page {
  max-width: 800px;
  margin: 0rem auto;
  padding: 1rem;
  text-align: center;
  color: #331E36;
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem; /* slightly bigger gap */
}

.about-img {
  max-width: 90%;      /* make image a bit bigger */
  height: auto;
  border-radius: 0;    /* remove rounding */
  box-shadow: none;    /* remove shadow */
  max-height: none;    /* remove max height to let it grow */
}

.about-content p {
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
  margin-top: 0; /* remove any top margin if it exists */
}

.register-auth h2 {
  margin-bottom: 0.5rem;
}

.register-auth p {
  margin-top: 0;
  margin-bottom: 2rem;
}

.about-title {
  font-size: 2.5rem;
  font-weight: 600;
  text-align: center;
  margin: 0rem;
  max-width: 800px;
  color: #222;
}