@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@400;700&display=swap');

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

html, body {
  width: 100%; min-height: 100vh;
  font-family: 'League Spartan', sans-serif;
  background: transparent;
  overflow-x: hidden;
}

#login-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  background-color: #000E26; /* fallback hvis vanta ikke loader */
}

#home-button {
  position: absolute;
  top: 20px;
  left: 20px;
  font-family: 'League Spartan', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #00cc88;
  text-decoration: none;
  z-index: 10;
  transition: color 0.3s;
}

#home-button:hover {
  color: #00ffaa;
}

.form-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  padding: 2rem;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  text-align: center;
  color: #fff;
}

h2 { margin-bottom: 1.5rem; font-weight: 700; }

.tabs {
  display: flex; margin-bottom: 1rem;
}

.tab {
  flex: 1; padding: .75rem; cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: none; color: #fff;
  transition: background .3s;
}

.tab.active { background: #00cc88; color: #000; }

input {
  width: 100%; margin-bottom: 1rem;
  padding: .75rem; background: rgba(255,255,255,0.1); border: none;
  border-radius: 8px; color: #fff; font-size: 1rem;
}

input::placeholder { color: rgba(255,255,255,0.7); }

.btn {
  width: 100%; padding: .75rem; font-weight: 700; font-size: 1rem; cursor: pointer;
  border: none; border-radius: 8px; transition: transform .2s;
}

.btn-login { background: #0077ff; color: #fff; margin-top: 1rem; }
.btn-signup { background: #00cc88; color: #fff; margin-top: 1rem; }

.btn:hover { transform: scale(1.02); }

.forgot {
  display: block; margin-top: .75rem;
  color: #aaa; font-size: 0.9rem; text-decoration: underline;
  cursor: pointer;
}

.hidden { display: none; }

.loader {
  margin: 1rem auto; width: 40px; height: 40px; border: 4px solid #fff;
  border-top: 4px solid #00cc88; border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader.done {
  border: 4px solid #00cc88;
  border-top: 4px solid #00cc88;
  animation: none;
  background: url('https://cdn-icons-png.flaticon.com/512/845/845646.png') center/cover no-repeat;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.message {
  margin-top: 1rem; color: #ff6666; font-size: 0.95rem;
}

/* Hjælpebobler */
.bubbles {
  position: fixed;
  top: 50%;
  left: 80%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  pointer-events: none;
  z-index: 999;
}

.bubble {
  background: rgba(255,255,255,0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  color: #fff;
  backdrop-filter: blur(4px);
  animation: float 4s ease-in-out infinite alternate;
}

@keyframes float {
  from { transform: translateY(0) translateX(0); }
  to { transform: translateY(-10px) translateX(5px); }
}

/* Mobilvenlig */
@media(max-width: 400px) {
  #home-button {
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
  }

  .form-container {
    position: static;
    transform: none;
    margin: 80px auto 20px;
    width: 90%;
    padding: 1.5rem;
  }

  .tabs {
    flex-direction: column;
  }

  .tab {
    margin-bottom: 0.5rem;
  }

  .bubbles {
    position: static;
    transform: none;
    margin-top: 1rem;
    padding: 1rem;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}
