/* ============================================================
   style.css - Tema WebGL Kaca Kuning untuk CFG Pantun Validator
   ============================================================ */

:root {
  --clr-primary: #CCFF00;
  /* Lime green */
  --clr-primary-dark: #b3e600;
  --clr-secondary: #0038FF;
  /* Solid blue */
  --clr-accent: #ffffff;
  --clr-bg: #0038FF;
  --clr-card: #F8F9FA;
  --clr-text-body: #ffffff;
  --clr-text: #000000;
  /* For cards */
  --clr-muted: rgba(0, 0, 0, 0.6);
  --gradient-main: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-dark) 100%);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

.climate-crisis {
  font-family: "Climate Crisis", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "YEAR" 1979;
}

.averia-libre-light {
  font-family: "Averia Libre", system-ui;
  font-weight: 300;
  font-style: normal;
}

.averia-libre-regular {
  font-family: "Averia Libre", system-ui;
  font-weight: 400;
  font-style: normal;
}

.averia-libre-bold {
  font-family: "Averia Libre", system-ui;
  font-weight: 700;
  font-style: normal;
}

.averia-libre-light-italic {
  font-family: "Averia Libre", system-ui;
  font-weight: 300;
  font-style: italic;
}

.averia-libre-regular-italic {
  font-family: "Averia Libre", system-ui;
  font-weight: 400;
  font-style: italic;
}

.averia-libre-bold-italic {
  font-family: "Averia Libre", system-ui;
  font-weight: 700;
  font-style: italic;
}

.honk-title {
  font-family: "Honk", system-ui;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "MORF" 15, "SHLN" 50;
}

body {
  font-family: "Averia Libre", system-ui;
  font-weight: 400;
  font-size: 1.1rem;
  background-color: var(--clr-bg) !important;
  color: var(--clr-text-body) !important;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 4rem 4rem;
  pointer-events: none;
  z-index: -1;
}

main {
  flex: 1;
}

.text-muted {
  color: var(--clr-muted) !important;
}

/* ---------------- Navbar ---------------- */
.app-navbar {
  background: transparent !important;
  border-bottom: none;
  box-shadow: none;
}

.app-navbar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  transition: all 0.25s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
  color: var(--clr-primary) !important;
  background: transparent !important;
}

/* ---------------- Footer ---------------- */
.app-footer {
  background: rgba(15, 12, 25, 0.6) !important;
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: none;
}

/* ---------------- Cards ---------------- */
.card {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 2rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: var(--clr-card);
  color: var(--clr-text);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(234, 179, 8, 0.25);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--clr-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* ---------------- Buttons ---------------- */
.btn-gradient {
  background: var(--gradient-main);
  color: #000;
  border: none;
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn-gradient:hover {
  filter: brightness(1.08);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(234, 179, 8, 0.35);
}

.btn-outline-gradient {
  border: 2px solid var(--clr-primary);
  color: var(--clr-primary);
  font-weight: 600;
  background: transparent;
}

.btn-outline-gradient:hover {
  background: var(--gradient-main);
  color: #000;
  border-color: transparent;
}

/* ---------------- Section titles ---------------- */
.section-title {
  font-weight: 700;
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
  color: #fff;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-main);
}

.section-title+.text-muted {
  color: var(--clr-primary) !important;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ---------------- Validate Page ---------------- */
.pantun-textarea {
  font-family: "Averia Libre", system-ui;
  font-size: 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
  background: rgba(255, 255, 255, 0.8) !important;
  color: var(--clr-text) !important;
}

.pantun-textarea:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 0.2rem rgba(204, 255, 0, 0.4);
  outline: none;
  background: #ffffff !important;
  color: var(--clr-text) !important;
}

.status-badge {
  font-size: 1.1rem;
  padding: 0.6rem 1.3rem;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.status-valid {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  animation: popIn 0.4s ease;
}

.status-invalid {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  animation: popIn 0.4s ease;
}

@keyframes popIn {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.baris-row {
  border-left: 4px solid var(--clr-secondary);
  background: rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  animation: slideFade 0.4s ease;
  color: var(--clr-text);
}

.baris-row.invalid-line {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

@keyframes slideFade {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.trace-step {
  border-left: 3px dashed var(--clr-secondary);
  padding-left: 1rem;
  margin-bottom: 0.75rem;
  position: relative;
  color: rgba(255, 255, 255, 0.85);
}

.trace-step::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--clr-secondary);
}

/* ---------------- Animations ---------------- */
@keyframes glowPulse {
  0% {
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  }

  100% {
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
  }
}

/* ---------------- Mobile Responsiveness & Performance ---------------- */
@media (max-width: 768px) {
  .app-navbar .navbar-brand {
    font-size: 1.5rem !important;
  }

  .app-navbar .navbar-brand i {
    font-size: 1.1rem !important;
  }

  .card {
    padding: 1.25rem !important;
  }

  .pantun-textarea {
    font-size: 1rem;
    padding: 0.8rem;
  }

  .btn {
    padding: 0.5rem 1rem !important;
  }

  /* Disable glow pulse on mobile to save GPU */
  .card,
  .nav-link-gsap,
  .btn {
    animation: none !important;
    box-shadow: none !important;
    transition: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- Grammar Page ---------------- */
.grammar-box {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--clr-text);
  font-family: 'Courier New', monospace;
  border-radius: 14px;
  padding: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.9;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
}

.rule-code {
  background: rgba(0, 0, 0, 0.05);
  color: #000;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
}

/* ---------------- History Table ---------------- */
.table {
  color: var(--clr-text) !important;
}

.table thead {
  background: rgba(0, 0, 0, 0.05);
  color: #000;
}

.table th,
.table td {
  background: transparent !important;
  color: var(--clr-text) !important;
  border-color: rgba(0, 0, 0, 0.05);
}

.badge-status-valid {
  background: #10b981;
}

.badge-status-invalid {
  background: #ef4444;
}

/* ---------------- About Page ---------------- */
.tech-pill {
  background: rgba(0, 0, 0, 0.05);
  color: #000;
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
  margin: 0.25rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ---------------- Utilities ---------------- */
.fade-in-up {
  animation: fadeInUp 0.6s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}