/**
 * ============================================================================
 * LANDING.CSS - Halaman Awal, Login Guru, dan Halaman MODE IFP Siswa
 * ============================================================================
 */

/* 1. HALAMAN AWAL (LANDING HERO) DENGAN LATAR BELAKANG PEMANDANGAN WATANG PULU */
.landing-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: url('../assets/images/landing_bg.jpg') no-repeat center center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.landing-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.12);
  pointer-events: none;
  z-index: 1;
}

/* Dekorasi Multi-Layer Latar Belakang Tropikal Lama (dinonaktifkan agar gambar pemandangan tampil bersih) */
.landing-bg-decor {
  display: none !important;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* Langit, Matahari & Awan di Bagian Atas */
.landing-sky-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 48%;
  pointer-events: none;
}

/* Matahari Tropis Berkilau */
.landing-sun-glow {
  position: absolute;
  top: 30px;
  right: 12%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, #fff3b0 0%, #ffd166 45%, rgba(255, 209, 102, 0.4) 70%, transparent 100%);
  border-radius: 50%;
  filter: drop-shadow(0 0 45px #ffd166);
  animation: sunGlowPulse 4s ease-in-out infinite alternate;
}

@keyframes sunGlowPulse {
  0% { transform: scale(0.95); opacity: 0.85; }
  100% { transform: scale(1.1); opacity: 1; }
}

/* Awan Putih Lembut Melayang */
.landing-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 50px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

.landing-cloud::before, .landing-cloud::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 50%;
}

.cloud-1 {
  top: 45px;
  left: -120px;
  width: 160px;
  height: 50px;
  animation: cloudDrift 28s linear infinite;
}
.cloud-1::before { width: 70px; height: 70px; top: -30px; left: 25px; }
.cloud-1::after { width: 55px; height: 55px; top: -20px; left: 80px; }

.cloud-2 {
  top: 110px;
  left: -200px;
  width: 220px;
  height: 65px;
  animation: cloudDrift 38s linear infinite 12s;
  opacity: 0.75;
}
.cloud-2::before { width: 90px; height: 90px; top: -40px; left: 40px; }
.cloud-2::after { width: 75px; height: 75px; top: -30px; left: 115px; }

.cloud-3 {
  top: 75px;
  left: -160px;
  width: 140px;
  height: 45px;
  animation: cloudDrift 22s linear infinite 5s;
  opacity: 0.85;
}
.cloud-3::before { width: 60px; height: 60px; top: -25px; left: 20px; }
.cloud-3::after { width: 50px; height: 50px; top: -15px; left: 65px; }

@keyframes cloudDrift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 300px)); }
}

/* Burung Camar Melayang di Langit */
.landing-seagull {
  position: absolute;
  width: 28px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M0 10 Q10 0 20 10 Q30 0 40 10 Q30 4 20 14 Q10 4 0 10 Z' fill='%23ffffff' opacity='0.85'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  animation: gullFly 18s linear infinite;
}

.gull-1 { top: 65px; left: -50px; animation-duration: 20s; }
.gull-2 { top: 125px; left: -80px; animation-duration: 25s; animation-delay: 8s; transform: scale(0.75); }

@keyframes gullFly {
  0% { transform: translate(0, 0); }
  50% { transform: translate(60vw, 15px); }
  100% { transform: translate(calc(100vw + 100px), -10px); }
}

/* Siluet Pulau Tropis di Garis Horison */
.landing-island-silhouette {
  position: absolute;
  bottom: 0;
  left: 6%;
  width: 220px;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60'%3E%3Cpath d='M0 60 Q40 40 90 48 Q140 35 200 60 Z' fill='%230077b6' opacity='0.5'/%3E%3Cpath d='M65 48 Q70 20 85 10 M85 10 Q70 5 60 12 M85 10 Q95 5 100 15 M85 10 Q90 25 75 35' stroke='%230077b6' stroke-width='3' fill='none' opacity='0.6'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: contain;
}

/* Lapisan Ombak Laut Multi-Tier */
.landing-waves-wrapper {
  position: absolute;
  top: 44%;
  left: 0;
  width: 100%;
  height: 120px;
  pointer-events: none;
  overflow: hidden;
}

.landing-wave {
  position: absolute;
  left: 0;
  width: 200%;
  height: 100%;
  background-repeat: repeat-x;
}

.wave-back {
  top: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C150,90 350,0 500,50 C650,100 900,10 1200,60 L1200,120 L0,120 Z' fill='%230096c7' opacity='0.6'%3E%3C/path%3E%3C/svg%3E");
  background-size: 800px 100px;
  animation: waveScroll 14s linear infinite;
}

.wave-mid {
  top: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,30 C200,85 400,-10 600,45 C800,100 1000,5 1200,40 L1200,120 L0,120 Z' fill='%230077b6' opacity='0.75'%3E%3C/path%3E%3C/svg%3E");
  background-size: 700px 95px;
  animation: waveScroll 10s linear infinite reverse;
}

.wave-front {
  top: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,20 C180,75 360,5 540,55 C720,105 900,20 1200,35 L1200,120 L0,120 Z' fill='%23023e8a' opacity='0.85'%3E%3C/path%3E%3Cpath d='M0,22 C180,77 360,7 540,57 C720,107 900,22 1200,37' stroke='%23ffffff' stroke-width='2.5' fill='none' opacity='0.7'%3E%3C/path%3E%3C/svg%3E");
  background-size: 600px 90px;
  animation: waveScroll 7s linear infinite;
}

@keyframes waveScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Sinar Cahaya Bawah Laut */
.landing-sunrays {
  position: absolute;
  top: 48%;
  left: 0;
  width: 100%;
  height: 52%;
  background: repeating-linear-gradient(
    65deg,
    rgba(255, 255, 255, 0.08) 0px,
    rgba(255, 255, 255, 0.08) 40px,
    transparent 80px,
    transparent 160px
  );
  animation: sunraysShimmer 6s ease-in-out infinite alternate;
}

@keyframes sunraysShimmer {
  0% { opacity: 0.5; transform: skewX(-3deg); }
  100% { opacity: 0.9; transform: skewX(3deg); }
}

/* Ikan Lucu Berenang di Latar Belakang */
.landing-swimming-fish {
  position: absolute;
  font-size: 2.2rem;
  opacity: 0.65;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  animation: fishSwimAcross 16s linear infinite;
}

.fish-bg-1 {
  bottom: 18%;
  left: -80px;
  animation-duration: 22s;
  animation-delay: 1s;
}

.fish-bg-2 {
  bottom: 28%;
  right: -80px;
  transform: scaleX(-1);
  animation: fishSwimReverse 18s linear infinite 7s;
}

.fish-bg-3 {
  bottom: 10%;
  left: -80px;
  animation-duration: 26s;
  animation-delay: 12s;
}

@keyframes fishSwimAcross {
  0% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(30vw) translateY(-15px); }
  50% { transform: translateX(55vw) translateY(10px); }
  75% { transform: translateX(80vw) translateY(-10px); }
  100% { transform: translateX(calc(100vw + 120px)) translateY(0); }
}

@keyframes fishSwimReverse {
  0% { transform: scaleX(-1) translateX(0) translateY(0); }
  50% { transform: scaleX(-1) translateX(-50vw) translateY(-20px); }
  100% { transform: scaleX(-1) translateX(calc(-100vw - 120px)) translateY(0); }
}

/* Gelembung Udara Mengkilap (Glassmorphism Spheres) */
.decor-bubble {
  position: absolute;
  bottom: -50px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.85) 0%, rgba(186, 230, 253, 0.4) 60%, rgba(56, 189, 248, 0.25) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: inset 0 -4px 6px rgba(14, 116, 144, 0.3), 0 0 12px rgba(255, 255, 255, 0.6);
  animation: bubbleAscend 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.decor-bubble::before {
  content: '';
  position: absolute;
  top: 18%;
  left: 22%;
  width: 25%;
  height: 25%;
  background: #ffffff;
  border-radius: 50%;
  filter: blur(0.5px);
}

.bubble-1 { width: 36px; height: 36px; left: 8%; animation-duration: 7s; animation-delay: 0.3s; }
.bubble-2 { width: 58px; height: 58px; left: 24%; animation-duration: 9.5s; animation-delay: 2.2s; }
.bubble-3 { width: 28px; height: 28px; left: 45%; animation-duration: 6s; animation-delay: 1s; }
.bubble-4 { width: 48px; height: 48px; left: 72%; animation-duration: 8.5s; animation-delay: 3.5s; }
.bubble-5 { width: 34px; height: 34px; left: 88%; animation-duration: 7.2s; animation-delay: 1.8s; }
.bubble-6 { width: 64px; height: 64px; left: 93%; animation-duration: 11s; animation-delay: 4.5s; }

@keyframes bubbleAscend {
  0% { transform: translateY(0) translateX(0) scale(0.7); opacity: 0; }
  15% { opacity: 0.9; }
  50% { transform: translateY(-50vh) translateX(15px) scale(0.95); opacity: 0.85; }
  85% { opacity: 0.75; }
  100% { transform: translateY(-115vh) translateX(-15px) scale(1.15); opacity: 0; }
}

/* KARTU HERO KACA MODERN & GLOWING */
.landing-card {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
  border: 4px solid rgba(255, 255, 255, 0.95);
  padding: 48px 42px;
  max-width: 680px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(2, 62, 138, 0.35), 0 8px 0 rgba(0, 0, 0, 0.15);
  animation: heroFloat 4s ease-in-out infinite alternate;
}

.landing-card-glow {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: calc(var(--radius-lg) + 4px);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.6) 0%, rgba(255, 159, 28, 0.4) 50%, rgba(46, 196, 182, 0.6) 100%);
  z-index: -1;
  filter: blur(12px);
  opacity: 0.7;
}

@keyframes heroFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.landing-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #ff9f1c 0%, #ffbf69 100%);
  color: #ffffff;
  padding: 9px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(255, 159, 28, 0.4);
  margin-bottom: 18px;
  border: 2px solid #ffffff;
}

.landing-title {
  font-size: 3.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #023e8a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
  margin-bottom: 8px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.08));
}

.landing-subtitle {
  font-size: 1.4rem;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 34px;
  letter-spacing: 1px;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 10px;
}

.btn-entrance-guru {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-bottom: 6px solid #075985;
}

.btn-entrance-guru:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  transform: translateY(-2px);
}

.btn-entrance-siswa {
  background: linear-gradient(135deg, #2ec4b6 0%, #16a34a 100%);
  color: #ffffff;
  border-bottom: 6px solid #15803d;
}

.btn-entrance-siswa:hover {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  transform: translateY(-2px);
}

.landing-footer-note {
  margin-top: 22px;
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
}

/* Identitas Sekolah & Guru Penyusun di Bagian Bawah */
.landing-school-credit {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px dashed rgba(2, 132, 199, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.landing-school-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0369a1;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(3, 105, 161, 0.12);
}

.landing-teacher-name {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.5px;
}

/* 2. LOGIN GURU DENGAN LATAR LAUT ELEGAN */
.login-screen-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #70d6ff 0%, #0077b6 60%, #023e8a 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-screen-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(75deg, rgba(255, 255, 255, 0.05) 0px, transparent 60px, transparent 140px);
  pointer-events: none;
}

.login-box {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  border: 4px solid #ffffff;
  box-shadow: 0 20px 45px rgba(2, 62, 138, 0.35);
  padding: 44px;
  width: 100%;
  max-width: 450px;
  text-align: center;
}

.login-header-icon {
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0284c7;
  font-size: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 4px solid #ffffff;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.25);
}

.login-box h2 {
  font-size: 2.1rem;
  color: #0f172a;
  margin-bottom: 6px;
}

.login-box p {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.form-group {
  text-align: left;
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
  background: #ffffff;
}

.form-control:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.18);
}

/* 6. MODE IFP SISWA / PILIH GAME DENGAN LATAR BELAKANG ARCADE SAMUDRA */
.ifp-screen-container {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 15%, #38bdf8 0%, #0077b6 45%, #023e8a 80%, #03045e 100%);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.ifp-screen-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(70deg, rgba(255, 255, 255, 0.06) 0px, transparent 80px, transparent 160px);
  pointer-events: none;
}

.ifp-top-header {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  padding: 16px 28px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.ifp-title-wrap h1 {
  font-size: 2.6rem;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.ifp-title-wrap p {
  font-size: 1.15rem;
  color: #e0f2fe;
  font-weight: 500;
}

.game-cards-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  width: 100%;
  max-width: 1200px;
}

.game-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 4px solid #ffffff;
  box-shadow: 0 16px 36px rgba(2, 62, 138, 0.35);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 24px 45px rgba(2, 62, 138, 0.45);
}

.game-card-active {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
}

.game-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.3);
}

.game-card-icon {
  font-size: 5.5rem;
  margin: 16px 0 12px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
  animation: iconPulse 3s ease-in-out infinite alternate;
}

@keyframes iconPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.game-card-title {
  font-size: 2.1rem;
  color: #0f172a;
  margin-bottom: 8px;
}

.game-card-desc {
  font-size: 1.05rem;
  color: #475569;
  margin-bottom: 24px;
  line-height: 1.45;
  flex-grow: 1;
}

.game-play-modes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-game-mode {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.1rem;
}

/* Kartu Game Segera Hadir */
.game-card-locked {
  background: rgba(241, 245, 249, 0.88);
  border-color: #cbd5e1;
  opacity: 0.85;
  cursor: not-allowed;
}

.game-card-locked:hover {
  transform: none;
  box-shadow: 0 16px 36px rgba(2, 62, 138, 0.2);
}

.game-card-locked .game-card-badge {
  background: #64748b;
}

.game-card-locked .game-card-icon {
  filter: grayscale(85%);
  animation: none;
}

.locked-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e2e8f0;
  color: #475569;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  width: 100%;
  justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
  .landing-title { font-size: 2.6rem; }
  .landing-card { padding: 32px 22px; }
  .landing-school-name { font-size: 1.08rem; }
  .landing-teacher-name { font-size: 0.95rem; }
  .ifp-title-wrap h1 { font-size: 2.1rem; }
  .ifp-top-header { flex-direction: column; gap: 16px; text-align: center; }
}
