/* Reset + podstawy */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
  font-family: 'Russo One', sans-serif;
  color: #212529;
  overflow: hidden;
}

body {
  background-image: url("http://idl.felixcom-systems.pl/app/public/images/bg-wola2.jpg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  width: 100vw;
  height: 100vh;
  padding: 2vmin;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Przełącznik języka */
.lang-switch {
  position: absolute;
  top: 2vmin;
  right: 2vmin;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: white;
}

.lang-switch a {
  text-decoration: none;
  font-size: clamp(0.75em, 1vw, 3em);
    text-decoration: none;
    color: #990000;
    text-shadow: -2px -2px 0 #ccc, 2px -2px 0 #ccc, -2px 2px 0 #ccc, 2px 2px 0 #ccc, 0px -2px 0 #ccc, 0px 2px 0 #ccc, -2px 0px 0 #ccc, 2px 0px 0 #ccc;
}

.lang-switch a:hover {
  text-decoration: underline;
}

/* Nagłówek */
h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0;
  text-align: center;
  position: absolute;
  bottom: 2vmin;
  left: 2vmin;
  color: #4A4949;
}

/* Kontener kafelków */
.tiles {
  display: grid;
  width: 74vw;
  height: 74vh;
  gap: 2vmin;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
}

/* 2 kolumny tablet */
@media (max-width: 1024px) {
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 kolumna mobile */
@media (max-width: 600px) {
  .tiles {
    grid-template-columns: 1fr;
  }
}

/* Kafelek */
.tile {
  /* aspect-ratio: 1 / 1; */
  width: 100%;
  height: 100%;
  background: #5255529e;
  color: #990000;
  border: 4px solid #cccccc;
  border-radius: 1rem;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(2em, 1.85vw, 8em);
  text-align: center;
  text-shadow:
    -2px -2px 0 #ccc,
     2px -2px 0 #ccc,
    -2px  2px 0 #ccc,
     2px  2px 0 #ccc,
     0px -2px 0 #ccc,
     0px  2px 0 #ccc,
    -2px  0px 0 #ccc,
     2px  0px 0 #ccc;
  padding: 1rem;
  max-height: 18rem;
}

/* Link do logowania/wylogowania */
a.auth,
button.auth {
  background-color: unset;
  cursor: pointer;
  border: none;
  position: absolute;
  right: 2vmin;
  bottom: 2vmin;
  font-size: clamp(0.75em, 1vw, 3em);
  text-decoration: none;
  color: #990000;
  text-shadow:
    -2px -2px 0 #ccc,
     2px -2px 0 #ccc,
    -2px  2px 0 #ccc,
     2px  2px 0 #ccc,
     0px -2px 0 #ccc,
     0px  2px 0 #ccc,
    -2px  0px 0 #ccc,
     2px  0px 0 #ccc;
}

#loginModal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 1);
  color: white;
  z-index: 1000;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  min-width: 300px;
  max-width: 90vw;
  display: none;
  flex-direction: column;
  align-items: center;
}

#loginModal h2 {
  font-size: 1.45rem;
  margin-bottom: 2vmin;
  text-align: center;
}

#loginModal .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 2vmin;
}

#loginModal label {
  font-size: 1rem;
  margin-bottom: 0.5vmin;
}

#loginModal input {
  padding: 0.5rem;
  font-size: 1rem;
  border: none;
  background: #333;
  color: #fff;
  outline: none;
}

#loginModal input:focus {
  background: #444;
}

#loginModal .login-btn {
  width: 100%;
  padding: 8px;
  margin-top: 1vmin;
  background: #5255529e;
  color: white;
  border: 1px solid #ccc;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
}

#loginModal .login-btn:hover,
#loginModal button.close:hover {
  background: #666;
}
#loginModal form {
    padding: 2rem;
}

body.logged-in #loginModal {
  display: none;
}
#loginModal button.close {
    border: none;
    padding: 6px;
    background: #333333;
    align-self: flex-end;
    cursor: pointer;
}

#iframeContainer {
  position: absolute;
  inset: 0;
  background: black;
  z-index: 10000;
  display: flex;
  flex-direction: column;
}

#appFrame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
}

#backBtn {
  background: #525552;
  color: #fff;
  border: none;
  font-size: clamp(1rem, 2vw, 1.45rem);
  padding: 12px;
  cursor: pointer;
  text-align: left;
  border-bottom: 4px solid #ccc;
}
