/*
 * App auxiliary bundle
 * Contains:
 * ui-login.css
 * theme-controls.css
 * fonts.css
 * preloader.css
 * responsive.css
 */

/* ui-login.css */
/* app/ui-login.css
   Scope: App login screen and login-related UI blocks
   Reviewed for live use: 2026-02-05
*/

/********************* LOG IN *******************/
/* Login screen styles */
.login-screen-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 30px 20px;
  color: white;
}

.login-back-button {
  margin-bottom: 30px;
}

.login-back-button a {
  color: #8ac6d1;
  text-decoration: none;
  font-size: 1.1em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.login-back-button a:hover {
  color: #b8e0e6;
}

/* Already logged in */
.already-logged-in {
  text-align: center;
  padding: 40px 20px;
  background:
    radial-gradient(
      ellipse at center,
      rgba(37, 58, 101, 0.85) 0%,
      rgba(20, 35, 70, 0.8) 40%,
      rgba(5, 10, 20, 0.9) 100%
    ),
    rgba(37, 58, 101, 0.3);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-section {
  text-align: center;
  padding: 40px 20px;
  background:
    radial-gradient(
      ellipse at center,
      rgba(37, 58, 101, 0.85) 0%,
      rgba(20, 35, 70, 0.8) 40%,
      rgba(5, 10, 20, 0.9) 100%
    ),
    rgba(37, 58, 101, 0.3);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/*.welcome-icon {
  font-size: 4em;
  margin-bottom: 20px;
  opacity: 0.8;
}*/

.already-logged-in h1 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--kerho-color-end);
  margin-top: 0.3rem;
}

.welcome-message {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.8);
}

.welcome-icon img {
  height: 70px !important;
  width: 70px !important;
  margin-bottom: -10px;
}


/* theme-controls.css */
/* app/theme-controls.css
   Scope: App theme/season buttons and filter controls
   Reviewed for live use: 2026-02-05
*/

/* =========================
   THEME BUTTON – BASE
   ========================= */
.theme-controls .theme-button,
.theme-filter button {
  background: transparent;
  color: #fff;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.2s ease;
  font-size: 0.9rem;
  padding: 6px 3px;
  min-width: 80px;
}

/* TALVI */
.theme-controls .theme-button.winter,
.theme-filter button[data-theme="talvi"] {
  border-color: #007bff;
}

/* KEVÄT */
.theme-controls .theme-button.spring,
.theme-filter button[data-theme="kevat"] {
  border-color: #4caf50;
}

/* KESÄ */
.theme-controls .theme-button.summer,
.theme-filter button[data-theme="kesa"] {
  border-color: #ffc107;
}

/* SYKSY */
.theme-controls .theme-button.autumn,
.theme-filter button[data-theme="syksy"] {
  border-color: #ff5722;
}

/* KALEVALA */
.theme-controls .theme-button.kalevala,
.theme-filter button[data-theme="kalevala"] {
  border-color: #fff;
}

/* ============================================================
   TEEMAT – AKTIIVINEN TILA (kaikki näkymät)
   ============================================================ */

/* TALVI */
.theme-controls .theme-button.selected.winter,
.theme-filter button.active[data-theme="talvi"] {
  background: linear-gradient(135deg, #1e90ff, #00bfff);
  border-color: #007bff;
}

/* KEVÄT */
.theme-controls .theme-button.selected.spring,
.theme-filter button.active[data-theme="kevat"] {
  background: linear-gradient(135deg, #32cd32, #90ee90);
  border-color: #4caf50;
}

/* KESÄ */
.theme-controls .theme-button.selected.summer,
.theme-filter button.active[data-theme="kesa"] {
  background: linear-gradient(135deg, #ff8c00, #ffd700);
  border-color: #ffc107;
}

/* SYKSY */
.theme-controls .theme-button.selected.autumn,
.theme-filter button.active[data-theme="syksy"] {
  background: linear-gradient(135deg, #8b4513, #d2691e);
  border-color: #ff5722;
}

/* KALEVALA */
.theme-controls .theme-button.selected.kalevala,
.theme-filter button.active[data-theme="kalevala"] {
  background: var(--kalevala-bg);
  border-color: #fff;
}

/* ============================================================
   AKTIIVISEN NAPIN YLEISET OMINAISUUDET
   ============================================================ */
.theme-controls .theme-button.selected,
.theme-filter button.active {
  transform: scale(1.05);
  pointer-events: none;
  transition: transform 0.2s ease;
}


/* fonts.css */
/* app/fonts.css
   Scope: App typography and font tokens
   Reviewed for live use: 2026-02-05
*/
/* app/fonts.css
   Scope: App typography and font tokens
   Reviewed for live use: 2026-02-05
*/

:root {
  --font-body: 'Nunito', system-ui, sans-serif;
  --font-alt: 'Baloo 2', fantasy;
  --font-display: 'Pangolin', 'Fredoka', sans-serif;
}

body,
.ui,
.icon-label {
  font-family: var(--font-body);
}

h1,
h2,
h3,
.game-title,
.video-title,
.home-hero-title {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.select-player,
.achievement-title {
  font-family: var(--font-alt);
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
  }
}


/* preloader.css */
/* app/preloader.css
   Scope: App preloader and loading states
   Reviewed for live use: 2026-02-05
*/

/* AJAX LOADER */
#bombo-loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(37, 58, 101, 1);
  background:
    radial-gradient(
      ellipse at center,
      rgba(37, 58, 101, 1) 0%,
      rgba(20, 35, 70, 1) 40%,
      rgba(5, 10, 20, 1) 100%
    ),
    rgba(37, 58, 101, 0.3);
  border-radius: 0;
  color: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.bombo-loader {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: white;
  text-align: center;
  animation: fadein 0.3s ease-in-out;
}

.bombo-loader .loader-logo {
  max-width: 100px;
  animation: dance 0.6s infinite ease-in-out;
  margin-bottom: -30px;
}

.loader-text {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

@keyframes dance {
  0%   { transform: translateY(0); }
  25%  { transform: translateY(-10px) rotate(-5deg); }
  50%  { transform: translateY(0); }
  75%  { transform: translateY(-10px) rotate(5deg); }
  100% { transform: translateY(0); }
}

.loader-progress {
  width: 80%;
  max-width: 300px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1em;
}

.loader-progress::after {
  content: '';
  display: block;
  width: 0;
  height: 100%;
  background: #3a7bd5;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% { width: 0; margin-left: 0; }
  50% { width: 100%; margin-left: 0; }
  100% { width: 0; margin-left: 100%; }
}

.bombo-loader h3 {
  color: #fff;
}

/* Kun sivu on ladattu */
body.loaded #bombo-preloader {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

/* Estää scrollauksen ennen kuin sivu on ladattu */
body:not(.loaded) {
  overflow: hidden;
}

/* Merged from app/ui-loader.css */
.game-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(37, 58, 101, 1);
  background:
    radial-gradient(
      ellipse at center,
      rgba(37, 58, 101, 1) 0%,
      rgba(20, 35, 70, 1) 40%,
      rgba(5, 10, 20, 1) 100%
    ),
    rgba(37, 58, 101, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

.loading-text {
  font-size: 18px;
  color: #fff;
  font-weight: bold;
}


/* responsive.css */
/* app/responsive.css
   Scope: Global app responsive overrides
   Reviewed for live use: 2026-02-05
*/
/* responsive.css */

@media (max-width: 768px) {
  .game-container {
    aspect-ratio: 9/16;
    height: 80vh;
    border-radius: 15px;
  }
}
