/* ================================================
   LernenXanders – Login-Seite TimeMaster
   ================================================ */

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

body {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #1a1a4e 0%, #2c6fad 50%, #4a90d9 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Sterne im Hintergrund */
body::before {
  content: '⭐ ✨ 🌟 ⭐ ✨ 🌟 ⭐ ✨ 🌟 ⭐';
  position: fixed;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.2rem;
  opacity: 0.15;
  letter-spacing: 24px;
  pointer-events: none;
}

/* ---- Seiten-Layout ---- */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 420px;
}

/* ---- Karte ---- */
.card {
  background: white;
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  width: 100%;
  text-align: center;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ---- Eule ---- */
.owl-wrap {
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
  animation: bobble 3s ease-in-out infinite;
}

@keyframes bobble {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-6px); }
}

/* ---- Titel ---- */
.title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1a1a4e;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 28px;
}

/* ---- Formular ---- */
.form-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
}

.code-input {
  font-family: 'Nunito', monospace;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  padding: 14px 16px;
  border: 3px solid #ddd;
  border-radius: 14px;
  outline: none;
  color: #1a1a4e;
  background: #f8f9ff;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.code-input:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.2);
  background: white;
}

.code-input::placeholder {
  color: #bbb;
  letter-spacing: 2px;
}

/* ---- Button ---- */
.btn {
  background: linear-gradient(135deg, #4a90d9, #2c6fad);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  box-shadow: 0 4px 15px rgba(74, 144, 217, 0.4);
  margin-top: 4px;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 217, 0.5);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ---- Hinweis ---- */
.hint {
  font-size: 0.8rem;
  color: #888;
  line-height: 1.5;
  margin-top: 4px;
}

.hint a {
  color: #4a90d9;
  text-decoration: none;
  font-weight: 700;
}

.hint a:hover { text-decoration: underline; }

/* ---- Fehlermeldung ---- */
.error-msg {
  background: #fff3f3;
  border: 2px solid #e74c3c;
  border-radius: 12px;
  padding: 12px 16px;
  color: #c0392b;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 8px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0);   }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px);  }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px);  }
}

/* ---- Erfolgsmeldung ---- */
.success-msg {
  background: #f0fff4;
  border: 2px solid #27ae60;
  border-radius: 12px;
  padding: 16px;
  color: #1e8449;
  font-size: 1rem;
  font-weight: 800;
  margin-top: 8px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1);    }
}

/* ---- Footer ---- */
.footer {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

/* ---- Mobile ---- */
@media (max-width: 420px) {
  .card { padding: 30px 24px; }
  .title { font-size: 1.8rem; }
  .code-input { font-size: 1.3rem; letter-spacing: 3px; }
}
