/* ===================================================
   Mroczna Elegancja - Nowy Styl dla LoveTouch
================================================== */

/* --- Import czcionek z Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:wght@700&display=swap');

/* --- Animacje --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* --- Podstawowe style --- */
body {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 1rem;
  color: #e0e0e0;
  background-color: #121828;
  background-image:
    radial-gradient(circle at 25px 25px, rgba(223, 115, 255, 0.1) 2%, transparent 0%),
    radial-gradient(circle at 75px 75px, rgba(75, 121, 255, 0.1) 2%, transparent 0%);
  background-size: 100px 100px;
  transition: background-color 0.5s ease, color 0.5s ease;
  box-sizing: border-box;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 0 10px rgba(223, 115, 255, 0.3);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

/* --- Główne przyciski menu --- */
.auth-button,
a[href="index.html"] { /* Poprawka dla przycisków Menu */
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 1.2rem;
  text-decoration: none;
  color: #e0e0e0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
  border: 1px solid rgba(223, 115, 255, 0.2);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin: 0.5rem 0;
  width: 90%;
  max-width: 350px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box; /* Dodano dla pewności */
}

.auth-button:hover,
a[href="index.html"]:hover { /* Poprawka dla przycisków Menu */
  transform: translateY(-3px);
  border-color: rgba(223, 115, 255, 0.6);
  box-shadow: 0 0 20px rgba(223, 115, 255, 0.3), 0 6px 20px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

/* Opcjonalny modyfikator dla przycisku resetowania, jeśli potrzebne będą inne kolory */
.auth-button.reset {
  /* Dziedziczy wszystkie style z .auth-button */
}

/* --- Karty (Tinder, Auth, Compare) --- */
.card {
  background: rgba(23, 29, 46, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(223, 115, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 400px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.card p {
  font-size: 1.6em;
  font-weight: 400;
  color: #fff;
  margin-bottom: 2rem;
}

/* --- Przyciski akcji na kartach (Tinder) --- */
.action-button {
  font-size: 2.5em;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, text-shadow 0.2s ease;
  padding: 10px;
  -webkit-tap-highlight-color: transparent;
}

.action-button:hover {
  transform: scale(1.2);
  text-shadow: 0 0 15px currentColor;
}

/* --- Listy preferencji --- */
ul#list {
  list-style: none;
  padding: 0;
  width: 90%;
  max-width: 500px;
}

ul#list li {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1em;
  border: 1px solid rgba(223, 115, 255, 0.1);
  transition: all 0.3s ease;
}

ul#list li:hover {
  border-color: rgba(223, 115, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

ul#list li .delete-button {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.3s ease;
}

ul#list li .delete-button:hover {
  background: #c0392b;
}

/* --- Formularze (Auth, Compare) --- */
.card#auth-container input,
.card#compare-container input {
  width: calc(100% - 24px);
  padding: 12px;
  margin-bottom: 1rem;
  border: 1px solid rgba(223, 115, 255, 0.2);
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 1em;
  transition: border-color 0.3s ease;
}

.card#auth-container input:focus,
.card#compare-container input:focus {
  outline: none;
  border-color: rgba(223, 115, 255, 0.8);
}

.card#auth-container button,
#compare-container .input-button-group button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(145deg, #df73ff, #9f62ff);
  color: white;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(223, 115, 255, 0.2);
}

.card#auth-container button:hover,
#compare-container .input-button-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(223, 115, 255, 0.4);
}

/* POPRAWKA DLA LINKÓW W FORMULARZU LOGOWANIA */
.card#auth-container p {
    font-size: 0.9em;
    color: #9facbe;
    margin-top: 1.5rem;
    margin-bottom: 0;
}
.card#auth-container a {
    color: #9f62ff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.card#auth-container a:hover {
    color: #df73ff;
}

/* ===================================================
   KREATYWNE STYLE MODALI v3 ("Holographic Interface")
================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(18, 24, 40, 0.8);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: transparent;
  border-radius: 12px;
  padding: 3rem 2.5rem 2.5rem 2.5rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  animation: scaleIn 0.4s ease-out;
  position: relative;
  border: none;
}

/* Generowanie świecących narożników */
.modal-content::before,
.modal-content::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: #9f62ff;
  border-style: solid;
  transition: all 0.3s ease;
}

.modal-content::before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.modal-content::after {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

.modal-content p {
  font-family: 'Lato', sans-serif;
  font-size: 1.25em;
  line-height: 1.6;
  color: #e0e0e0;
  margin: 0 0 2.5rem 0;
  text-shadow: 0 0 5px rgba(159, 98, 255, 0.3);
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-buttons button {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 1em;
  padding: 12px 24px;
  border: 1px solid rgba(159, 98, 255, 0.4);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-grow: 1;
  background: transparent;
  color: #9f62ff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Przycisk główny (OK, Potwierdź) */
#modal-ok-btn,
#modal-confirm-btn {
  background-color: rgba(159, 98, 255, 0.15);
}

#modal-ok-btn:hover,
#modal-confirm-btn:hover {
  background-color: #9f62ff;
  color: #121828;
  box-shadow: 0 0 20px rgba(159, 98, 255, 0.5);
}

/* Przycisk drugorzędny (Anuluj) */
#modal-cancel-btn {
  color: #9facbe;
  border-color: rgba(159, 172, 190, 0.4);
}

#modal-cancel-btn:hover {
  background-color: rgba(159, 172, 190, 0.15);
  border-color: #9facbe;
}


/* --- Pozostałe --- */
#user-info {
  color: #9facbe;
  font-size: 0.9em;
  margin-bottom: 1rem;
  text-align: center;
}

#compare-container .input-button-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bottom-buttons-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===================================================
   POPRAWKI DLA URZĄDZEŃ MOBILNYCH
================================================== */
@media (max-width: 600px) {
  #compare-container .input-button-group {
    flex-direction: column;
  }

  /* Zmniejszenie narożników i paddingu modala na telefonach */
  .modal-content {
    width: auto; /* Szerokość dopasowuje się do zawartości */
    max-width: 90%; /* Maksymalna szerokość */
    padding: 2rem 1.8rem; /* Dopasowany padding */
  }

  .modal-content p {
    font-size: 1.1em;
    margin-bottom: 2rem;
  }

  .modal-content::before,
  .modal-content::after {
    width: 25px; /* Zmniejszone narożniki */
    height: 25px;
  }

  .modal-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }

  .modal-buttons button {
    flex-grow: 0;
    width: 100%;
    min-width: 200px; /* Minimalna szerokość dla estetyki */
  }
}

/* ===================================================
   KOMPLETNE STYLE DLA TRYBU JASNEGO
================================================== */
body.light {
  color: #495057;
  background-color: #f8f9fa;
  background-image: none;
}

body.light h1,
body.light h2,
body.light h3 {
  color: #343a40;
  text-shadow: none;
}

body.light .auth-button,
body.light a[href="index.html"] { /* Poprawka dla przycisków Menu */
  color: #495057;
  background: #ffffff;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.light .auth-button:hover,
body.light a[href="index.html"]:hover { /* Poprawka dla przycisków Menu */
  color: #212529;
  border-color: #adb5bd;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

body.light .card {
  background: #ffffff;
  backdrop-filter: none;
  border: 1px solid #e9ecef;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

body.light .card p {
  color: #212529;
}

/* POPRAWKA DLA LINKÓW W FORMULARZU LOGOWANIA W TRYBIE JASNYM */
body.light .card#auth-container a {
    color: #845ef7;
}
body.light .card#auth-container a:hover {
    color: #7048e8;
}

body.light .action-button:hover {
  text-shadow: none;
}

body.light ul#list li {
  background: #ffffff;
  border-color: #e9ecef;
  color: #495057;
}

body.light ul#list li:hover {
  border-color: #ced4da;
  background: #f8f9fa;
}

body.light .card#auth-container input,
body.light .card#compare-container input {
  background-color: #f1f3f5;
  border-color: #ced4da;
  color: #495057;
}

body.light .card#auth-container input:focus,
body.light .card#compare-container input:focus {
  border-color: #845ef7; /* Fioletowy akcent */
  box-shadow: 0 0 0 2px rgba(132, 94, 247, 0.2);
}

body.light .card#auth-container button,
body.light #compare-container .input-button-group button {
  background: linear-gradient(145deg, #9775fa, #845ef7); /* Fioletowy gradient */
  box-shadow: 0 4px 15px rgba(132, 94, 247, 0.25);
}

body.light .card#auth-container button:hover,
body.light #compare-container .input-button-group button:hover {
  box-shadow: 0 6px 20px rgba(132, 94, 247, 0.35);
}

body.light .modal-overlay {
  background-color: rgba(248, 249, 250, 0.8);
}

body.light .modal-content {
  background: #ffffff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.light .modal-content::before,
body.light .modal-content::after {
  border-color: #845ef7;
}

body.light .modal-content p {
  color: #212529;
  text-shadow: none;
}

body.light #modal-ok-btn,
body.light #modal-confirm-btn {
  background-color: #845ef7;
  color: white;
}

body.light #modal-ok-btn:hover,
body.light #modal-confirm-btn:hover {
  background-color: #7048e8;
  box-shadow: 0 4px 15px rgba(132, 94, 247, 0.3);
}

body.light #modal-cancel-btn {
  color: #6c757d;
  border-color: #ced4da;
}

body.light #modal-cancel-btn:hover {
  background-color: #f1f3f5;
  border-color: #adb5bd;
}

body.light #user-info {
  color: #6c757d;
}

/* === POPRAWKI DLA TOOLTIPA === */
.info-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  background-color: #9f62ff;
  color: white;
  font-weight: bold;
  font-size: 14px;
  cursor: help;
  margin-left: 10px;
  user-select: none;
}

.tooltip-text {
  visibility: hidden;
  position: absolute;
  background-color: #1a2033;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 10px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
  width: 90%;
  max-width: 300px;
  font-size: 0.9em;
  border: 1px solid rgba(223, 115, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tooltip-text.visible {
  visibility: visible;
  opacity: 1;
}

/* ===================================================
   SEKCJA SUGESTII (STRONA "O STRONIE")
================================================== */
#suggestion-box {
  width: 100%;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#suggestion-box h2 {
  margin-bottom: 0;
}

#suggestion-box textarea {
  width: calc(100% - 24px);
  padding: 12px;
  border: 1px solid rgba(223, 115, 255, 0.2);
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 1em;
  font-family: 'Lato', sans-serif;
  transition: border-color 0.3s ease;
  resize: vertical;
  min-height: 80px;
}

#suggestion-box textarea:focus {
  outline: none;
  border-color: rgba(223, 115, 255, 0.8);
}

#suggestion-box button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(145deg, #df73ff, #9f62ff);
  color: white;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(223, 115, 255, 0.2);
}

#suggestion-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(223, 115, 255, 0.4);
}

/* --- Style dla trybu jasnego --- */
body.light #suggestion-box textarea {
  background-color: #f1f3f5;
  border-color: #ced4da;
  color: #495057;
}

body.light #suggestion-box textarea:focus {
  border-color: #845ef7;
  box-shadow: 0 0 0 2px rgba(132, 94, 247, 0.2);
}

body.light #suggestion-box button {
  background: linear-gradient(145deg, #9775fa, #845ef7);
  box-shadow: 0 4px 15px rgba(132, 94, 247, 0.25);
}

body.light #suggestion-box button:hover {
  box-shadow: 0 6px 20px rgba(132, 94, 247, 0.35);
}

/* ===================================================
   STYLE DLA PRZYCISKU LOGOWANIA GOOGLE
================================================== */

.google-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(223, 115, 255, 0.2);
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px; /* Odstęp między ikoną a tekstem */
}

.google-btn:hover {
  border-color: rgba(223, 115, 255, 0.8);
}

.google-icon {
  width: 20px;
  height: 20px;
}

.separator {
  display: flex;
  align-items: center;
  text-align: center;
  color: #9facbe;
  margin: 20px 0;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(223, 115, 255, 0.2);
}

.separator:not(:empty)::before {
  margin-right: .5em;
}

.separator:not(:empty)::after {
  margin-left: .5em;
}


/* --- Style dla trybu jasnego --- */

body.light .google-btn {
  background-color: #f1f3f5;
  border-color: #ced4da;
  color: #495057;
}

body.light .google-btn:hover {
  border-color: #845ef7;
  background-color: #fff;
}

body.light .separator {
  color: #6c757d;
}

body.light .separator::before,
body.light .separator::after {
  border-color: #dee2e6;
}
.auth-button.disabled {
  color: #6c757d;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(223, 115, 255, 0.1);
  cursor: not-allowed;
  opacity: 0.6;
}

.auth-button.disabled:hover {
  transform: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #6c757d;
  border-color: rgba(223, 115, 255, 0.1);
}

/* --- Style dla trybu jasnego --- */

body.light .auth-button.disabled {
  color: #adb5bd;
  background: #f1f3f5;
  border-color: #dee2e6;
}

body.light .auth-button.disabled:hover {
  color: #adb5bd;
  border-color: #dee2e6;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
/* --- Style dla stopki (footer) --- */
footer {
  width: 100%;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  color: #9facbe;
  font-size: 0.9em;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

footer a {
  color: #df73ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #fff;
}