@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Outfit:wght@500;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --blue: #3b4cca !important;
  --dark-blue: #2a3a9e !important;
  --red: #ee1515 !important;
  --dark-red: #c00d0d !important;
  --poke-yellow: #ffde00;
  --poke-yellow-dark: #b3a125;
  --poke-dark: #1e2024;
  --surfacePrimary: #ffffff !important;
  --iconPrimary: #ee1515 !important;
  --action: #ee1515 !important;
}

/* Global Font styling */
body {
  font-family: "Outfit", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  background-color: #f4f6f9;
}

/* Pokéball Wobble Animation */
@keyframes pokeball-wobble {
  0% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-18deg) scale(1.05); }
  40% { transform: rotate(18deg) scale(1.05); }
  60% { transform: rotate(-10deg) scale(1.02); }
  80% { transform: rotate(10deg) scale(1.02); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes pokeball-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(238, 21, 21, 0.4)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 222, 0, 0.7)); }
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
#login {
  background: radial-gradient(circle at center, #2e3340 0%, #15171e 100%) !important;
  position: relative;
  overflow: hidden;
}

#login::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  min-width: 350px;
  min-height: 350px;
  background-image: url("/static/img/logo.svg");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.05;
  pointer-events: none;
  animation: pokeball-wobble 8s ease-in-out infinite;
}

#login form {
  background: #ffffff !important;
  padding: 2.2em 2em !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), 0 0 0 3px #1e2024 !important;
  border-top: 8px solid #ee1515 !important;
  width: 90% !important;
  max-width: 22em !important;
}

#login img {
  width: 5.5em !important;
  height: 5.5em !important;
  margin: 0 auto 0.5em auto !important;
  animation: pokeball-glow 3s infinite ease-in-out;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#login img:hover {
  animation: pokeball-wobble 0.6s ease-in-out;
}

#login h1 {
  font-family: "Press Start 2P", cursive !important;
  font-size: 1.15em !important;
  line-height: 1.4 !important;
  letter-spacing: 0.05em;
  color: #1e2024 !important;
  text-align: center !important;
  margin: 0.5em 0 1.2em 0 !important;
  text-transform: uppercase;
}

#login h1::after {
  content: "TRAINER AUTHENTIFIZIERUNG";
  display: block;
  font-family: "Outfit", sans-serif !important;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: #888;
  margin-top: 6px;
  font-weight: 700;
}

#login input {
  font-family: "Outfit", sans-serif !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  border: 2px solid #dcdfe6 !important;
  padding: 0.7em 1em !important;
  transition: all 0.2s ease !important;
}

#login input:focus {
  border-color: #ee1515 !important;
  box-shadow: 0 0 0 3px rgba(238, 21, 21, 0.2) !important;
  outline: none !important;
}

#login input[type="submit"],
#login button[type="submit"] {
  font-family: "Press Start 2P", cursive !important;
  font-size: 0.8rem !important;
  background: linear-gradient(180deg, #ee1515 0%, #c00d0d 100%) !important;
  color: #ffffff !important;
  border: 2px solid #1e2024 !important;
  border-radius: 8px !important;
  padding: 0.9em 1em !important;
  margin-top: 1.2em !important;
  cursor: pointer !important;
  box-shadow: 0 4px 0 #1e2024, 0 6px 12px rgba(0,0,0,0.2) !important;
  transition: all 0.15s ease !important;
  text-shadow: 1px 1px 0 #000;
}

#login input[type="submit"]:hover,
#login button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1e2024, 0 8px 16px rgba(238, 21, 21, 0.4) !important;
  background: linear-gradient(180deg, #ff2a2a 0%, #d41111 100%) !important;
}

#login input[type="submit"]:active,
#login button[type="submit"]:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1e2024 !important;
}

#login .wrong {
  background: #c00d0d !important;
  font-family: "Press Start 2P", cursive !important;
  font-size: 0.65rem !important;
  line-height: 1.5 !important;
  border-radius: 8px !important;
  border: 2px solid #1e2024 !important;
  margin-bottom: 1em !important;
}

/* ==========================================================================
   HEADER / NAVIGATION BAR
   ========================================================================== */
header {
  background: linear-gradient(90deg, #ee1515 0%, #d30f0f 70%, #aa0000 100%) !important;
  border-bottom: 4px solid #1e2024 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  color: #ffffff !important;
}

header title,
header .title {
  font-family: "Press Start 2P", cursive !important;
  font-size: 0.9rem !important;
  letter-spacing: 0.05em !important;
  color: #ffffff !important;
  text-shadow: 2px 2px 0 #1e2024 !important;
}

header i.material-icons {
  color: #ffffff !important;
  transition: transform 0.2s ease;
}

header button:hover i.material-icons {
  transform: scale(1.15);
  color: var(--poke-yellow) !important;
}

/* Breadcrumb / Path navigation */
.breadcrumbs,
.breadcrumbs a,
.path-item {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600 !important;
}

.breadcrumbs a:hover {
  color: var(--poke-yellow) !important;
  text-decoration: underline !important;
}

/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */
#nav {
  border-right: 3px solid #1e2024 !important;
  background: #ffffff !important;
}

#nav .action {
  border-radius: 8px !important;
  margin: 4px 8px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

#nav .action:hover {
  background: rgba(238, 21, 21, 0.1) !important;
  color: #ee1515 !important;
}

#nav .action.active {
  background: #ee1515 !important;
  color: #ffffff !important;
}

#nav .action.active i {
  color: #ffffff !important;
}

/* ==========================================================================
   FILES & FOLDERS LISTING
   ========================================================================== */
#listing .item {
  border-radius: 10px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid transparent !important;
}

#listing .item:hover {
  background: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(238, 21, 21, 0.3) !important;
  transform: translateY(-1px);
}

#listing .item[aria-selected="true"] {
  background: rgba(238, 21, 21, 0.08) !important;
  border-color: #ee1515 !important;
}

/* Folder Icons in listing */
#listing .item[data-dir="true"] i.material-icons {
  color: #ee1515 !important;
  filter: drop-shadow(0 2px 4px rgba(238, 21, 21, 0.2));
}

/* Save / lua file icons */
#listing .item:not([data-dir="true"]) i.material-icons {
  color: #3b4cca !important;
}

/* Floating Action Button */
.floating-action,
.button--floating {
  background: linear-gradient(135deg, #ee1515 0%, #aa0000 100%) !important;
  border: 2px solid #1e2024 !important;
  box-shadow: 0 6px 16px rgba(238, 21, 21, 0.4) !important;
}

.floating-action:hover {
  transform: scale(1.08) rotate(15deg) !important;
}

/* Card styling */
.card {
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
  border-top: 4px solid #ee1515 !important;
}

.card-title {
  font-family: "Outfit", sans-serif !important;
  font-weight: 800 !important;
  color: #1e2024 !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #ee1515;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c00d0d;
}
