@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

/* Home page styles moved from newstyle.css */
body.home {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #e9f8f1;
  color: #1a1a1a;
  display: block;
}

body.home header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #006d5b;
  padding: 1rem 2rem;
  color: white;
  border-radius: 0;
}

body.home nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

body.home nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

body.home main {
  padding: 2rem;
  display: flex;
  justify-content: center;
}

body.home .intro-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  max-width: 700px;
  text-align: center;
}

body.home .intro-card h2 {
  background-color: #006d5b;
  color: white;
  padding: 1rem;
  border-radius: 0.75rem;
  margin-top: 0;
}

body.home .button-group {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

body.home .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  color: white;
}

body.home .btn.red { background-color: #e74c3c; }
body.home .btn.purple { background-color: #8e44ad; }
body.home .btn.blue { background-color: #3498db; }

body.home .btn:hover {
  opacity: 0.85;
}

@media (max-width: 600px) {
  body.home header {
    flex-direction: column;
    align-items: flex-start;
  }

  body.home nav ul {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
  }

  body.home nav ul li {
    width: 100%;
  }

  body.home nav ul li a {
    display: block;
    padding: 0.5rem 0;
  }

  body.home .button-group {
    flex-direction: column;
    align-items: stretch;
  }
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #e9fef7, #f0fdfb);
  margin: 0;
  padding: 0;
  color: #222;
  display: flex;
  justify-content: center;
}

.app-card {
  max-width: 420px;
  width: 100%;
  background: white;
  border-radius: 28px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
  padding: 1rem;
  margin: 1rem;
}

header h1 {
  text-align: center;
  margin: 0.5rem 0;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: white;
}

header {
  background-color: #00695c;
  border-radius: 20px;
  padding: 1rem;
}

.vuorossa-kortti {
  background: #e0f2f1;
  border: 2px solid #00695c;
  border-radius: 14px;
  padding: 1rem;
  margin: 1.2rem 0;
  text-align: center;
}

.vuorossa-nimi {
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.vuorossa-pisteet {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.5rem;
}

.pisteet-iso {
  font-size: 2.5rem;
  font-weight: bold;
  min-width: 40px;
}

.vuorossa-pisteet input {
  width: 50px;
  padding: 0.4rem;
  font-size: 1rem;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.vuorossa-pisteet button {
  padding: 0.5rem 0.8rem;
  background-color: #00796b;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.vuorossa-pisteet button:hover {
  background-color: #004d40;
}

.pelaajakortit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
}

.player-card {
  border-radius: 18px;
  padding: 1rem 0.5rem;
  color: white;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
}

.player-card p {
  font-size: 2rem;
  margin: 0.2rem 0 0.6rem;
}

.player-card button {
  background-color: rgba(0,0,0,0.1);
  border: none;
  padding: 0.4rem;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  color: white;
  font-size: 1rem;
  width: 100%;
}

.toiminnot {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toiminnot input {
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.toiminnot button {
  background-color: #00695c;
  color: white;
  border: none;
  padding: 0.6rem;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
}

.toiminnot button:hover {
  background-color: #004d40;
}

#playerCards {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
  scroll-behavior: smooth;
}

#notification {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #00796b;
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1rem;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 90vw;
}

#notification.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1.02);
}

#notification.center {
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Responsiivisuus */

@media screen and (max-width: 500px) {
  .app-card { margin: 0.5rem; padding: 0.5rem; border-radius: 16px; }
  header h1 { font-size: 1.4rem; }
  .vuorossa-pisteet { flex-direction: column; gap: 0.5rem; }
  .pisteet-iso { font-size: 2rem; }
  .vuorossa-pisteet input, .vuorossa-pisteet button { width: 100%; }
  .pelaajakortit { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; }
}

@media screen and (min-width: 601px) and (max-width: 1024px) {
  .app-card { max-width: 700px; }
  .vuorossa-pisteet { gap: 1rem; }
  .pelaajakortit {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }
}

@media screen and (min-width: 1025px) {
  .app-card { max-width: 900px; }
  .vuorossa-pisteet { gap: 1.2rem; }
  .pelaajakortit {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
  }
}

/* Navigaatiovalikko */

.navbar {
  position: relative;
  width: 100%;
  background-color: #00695c;
  padding: 0.5rem 1rem;
  border-radius: 0 0 15px 15px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar #navLinks a {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  font-weight: 500;
}

.navbar #navLinks a:hover {
  background-color: #004d40;
  border-radius: 10px;
}

.navbar .hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* Responsiivinen mobiilivalikko */
@media (max-width: 600px) {
  .navbar .hamburger {
    display: block;
  }

  .navbar #navLinks {
    position: absolute;
    top: 60px;
    right: 10px;
    background-color: #00695c;
    width: 200px;
    flex-direction: column;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    display: none;
  }

  .navbar #navLinks a {
    display: block;
    padding: 0.8rem;
    border-radius: 8px;
  }
}





/* Yksinkertainen pelinavigaatio */
.pelinav {
  background-color: #00695c;
  padding: 0.75rem 1rem;
  text-align: center;
  border-radius: 0 0 16px 16px;
  margin-bottom: 1rem;
}

.pelinav a {
  color: white;
  text-decoration: none;
  margin: 0 0.5rem;
  font-weight: bold;
}

.pelinav a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

/* Tumma teema toggle (esimerkkiluokka, ei JS-toiminnallisuutta mukana) */
.dark-mode {
  background: #121212;
  color: #f0f0f0;
}

.dark-mode .app-card {
  background: #1e1e1e;
  color: #f0f0f0;
}

.dark-mode .vuorossa-kortti {
  background: #2a2a2a;
  border-color: #4caf50;
}

.dark-mode .toiminnot button,
.dark-mode .vuorossa-pisteet button {
  background-color: #4caf50;
}

.dark-mode .toiminnot button:hover,
.dark-mode .vuorossa-pisteet button:hover {
  background-color: #388e3c;
}

.dark-mode .pelinav {
  background-color: #333;
}

.dark-mode .pelinav a {
  color: #f0f0f0;
}

/* Dark mode toggle button */
.theme-toggle {
  margin-top: 0.5rem;
  background-color: #00695c;
  color: #fff;
  border: none;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.dark-mode .theme-toggle {
  background-color: #4caf50;
}
