/* Reset and global settings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* Base font size for responsive units */
}

body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  background: linear-gradient(to bottom, #2a0845, #6441a5);
  color: white;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Typography - using rem units for scalability */
h1 {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: rgba(255, 255, 255, 0.6);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* Layout */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 4rem 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Background animation */
.background {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -100px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  animation: floatUp linear infinite;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(1px);
}

@keyframes floatUp {
  0% {
      transform: translateY(0) scale(1);
      opacity: 0.3;
  }
  100% {
      transform: translateY(-110vh) scale(1.2);
      opacity: 0;
  }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem 0;
  z-index: 990; /* Changed from 1000 to 990 to make language button visible */
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar a, .language-btn {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  margin: 0 0.3rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.navbar a:hover, .language-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.language-btn {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-btn img {
  width: 20px;
  height: 14px;
  margin-right: 5px;
}

/* Hero Section */
#hero {
  text-align: center;
  padding-top: 6rem;
}

.hero-content {
  background: rgba(0, 0, 0, 0.3);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(5px);
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Team Section */
#team {
  text-align: center;
  padding-top: 5rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.member {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  border-radius: 15px;
  backdrop-filter: blur(5px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.member:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.member img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
  margin: 0 auto 1rem;
}

/* Game Section */
#game {
  text-align: center;
  padding-top: 5rem;
}

.game-container {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  border-radius: 15px;
  backdrop-filter: blur(5px);
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Download Section */
#download {
  text-align: center;
  padding-top: 5rem;
}

.download-container {
  background: rgba(0, 0, 0, 0.3);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(5px);
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.download-btn {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 30px;
  background: linear-gradient(135deg, #6441a5, #2a0845);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  margin-top: 1rem;
}

.download-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Footer */
footer {
  background-color: rgba(0, 0, 0, 0.7);
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  backdrop-filter: blur(5px);
}

/* CSS for Language Toggle Button (add to your front.css file) */
.language-floating-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001; /* Increased z-index to be higher than navbar */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.language-floating-btn:hover {
  background-color: rgba(50, 50, 50, 0.9);
  transform: scale(1.05);
}

.language-floating-btn:active {
  transform: scale(0.95);
}

/* For inline elements */
html[lang="fi"] span[lang="fi"],
html[lang="fi"] a[lang="fi"],
html[lang="fi"] button[lang="fi"] {
  display: inline-block;
}

/* Responsive Design - Mobile First Approach */

/* Small devices (phones) */
@media (max-width: 576px) {
  html {
      font-size: 14px;
  }

  .navbar {
      padding: 0.5rem 0;
      flex-wrap: wrap;
  }

  .navbar a, .language-btn {
      padding: 0.4rem 0.8rem;
      margin: 0.2rem;
      font-size: 0.9rem;
  }

  section {
      padding: 3rem 0;
      min-height: 80vh;
  }

  h1 {
      font-size: 2rem;
  }

  h2 {
      font-size: 1.6rem;
  }

  .hero-content,
  .game-container,
  .download-container {
      padding: 1.2rem;
  }

  .member img {
      width: 100px;
      height: 100px;
  }

  #hero, #team, #game, #download {
      padding-top: 4rem;
  }

  .team-grid {
      grid-template-columns: 1fr;
      gap: 1rem;
  }
}

/* Medium devices (tablets) */
@media (min-width: 577px) and (max-width: 768px) {
  .navbar a, .language-btn {
      padding: 0.5rem 0.9rem;
      margin: 0.25rem;
  }

  .team-grid {
      grid-template-columns: repeat(2, 1fr);
  }

  section {
      min-height: 90vh;
  }

  #hero, #team, #game, #download {
      padding-top: 4.5rem;
  }
}

/* Large devices (desktops) */
@media (min-width: 769px) and (max-width: 992px) {
  .team-grid {
      grid-template-columns: repeat(3, 1fr);
  }

  .hero-content {
      max-width: 90%;
      margin: 0 auto;
  }

  .game-container {
      max-width: 90%;
      margin: 0 auto;
  }

  .download-container {
      max-width: 80%;
      margin: 0 auto;
  }
}

/* Extra large devices (large desktops) */
@media (min-width: 993px) {
  html {
      font-size: 18px;
  }

  .hero-content {
      max-width: 80%;
      margin: 0 auto;
      padding: 2.5rem;
  }

  .game-container {
      max-width: 80%;
      margin: 0 auto;
  }

  .download-container {
      max-width: 60%;
      margin: 0 auto;
  }

  .team-grid {
      grid-template-columns: repeat(3, 1fr);
      max-width: 90%;
      margin: 2rem auto 0;
  }
}