/* === Outsider Networks Dashy Portal === */
/* Built for a futuristic, glowing dashboard aesthetic */

/* === GLOBAL BODY === */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #050505, #111);
  overflow-x: hidden;
  color: #fff;
  backdrop-filter: brightness(1.2);
}

/* --- Splash Screen --- */
.splash-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at bottom left, #0a0a0a, #000);
  z-index: 999999;
  opacity: 1;
  visibility: visible;
  transition: opacity 1.5s ease-in-out, visibility 1.5s ease-in-out;
}

.splash-content {
  transform: translateY(-40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* === Cinematic Futuristic Splash === */
.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #0a0a0a 40%, #000 100%);
  overflow: hidden;
  z-index: 999999;
  opacity: 1;
  visibility: visible;
  transition: opacity 1.5s ease-in-out, visibility 1.5s ease-in-out;
}

/* Subtle moving light gradient in the background */
.splash-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 102, 0, 0.05), rgba(255, 102, 0, 0.15), rgba(0, 0, 0, 0.05));
  background-size: 300% 300%;
  animation: shimmer 10s linear infinite;
  z-index: 1;
}

@keyframes shimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* Glowing ring container */
.splash-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Orange glowing ring */
.ring {
  width: 120px;
  height: 120px;
  border: 4px solid rgba(255, 102, 0, 0.3);
  border-top: 4px solid #ff6600;
  border-radius: 50%;
  animation: spin 2.5s linear infinite, glowPulse 4s ease-in-out infinite;
  filter: drop-shadow(0 0 25px rgba(255, 102, 0, 0.8));
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 102, 0, 0.5); }
  50% { box-shadow: 0 0 40px rgba(255, 102, 0, 1); }
}

/* Ambient floating particles */
.splash-overlay::after {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,102,0,0.07) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: floatParticles 60s linear infinite;
  opacity: 0.4;
  z-index: 0;
}

@keyframes floatParticles {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-100px, -100px); }
}

/* Futuristic text */
.init-text {
  font-family: "Poppins", sans-serif;
  color: #ff6600;
  font-size: 1.2rem;
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.6);
  margin-top: 25px;
  z-index: 2;
  animation: fadeText 2.5s ease-in-out infinite alternate;
}

@keyframes fadeText {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* Fade out animation */
.splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s ease-in-out, visibility 1.5s ease-in-out;
}

/* Hidden state (triggered later by JS) */
.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

/* === MAIN PORTAL === */
.portal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 0;
  background: radial-gradient(circle at bottom left, #0a0a0a, #1a1a1a);
  background-size: 200% 200%;
  isolation: isolate;
  z-index: 1;
  opacity: 0;
  animation: fadeInPortal 1.2s ease-in forwards 0.8s;
}

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

@keyframes fadeOutSplash {
  0% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; background-color: #000; }
}

/* === BACKGROUND MESH === */
.portal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('assets/network-pattern.png') center/cover repeat;
  opacity: 0.03;
  z-index: 0;
  animation: bgDrift 20s linear infinite;
}
/* === FIX: Allow clicks on icons again === */
.portal::before,
.logo::after,
.splash-overlay::before,
.splash-overlay::after {
  pointer-events: none !important;
}

@keyframes bgDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, -20px); }
}

.hidden { display: none; }

/* === TOP BAR & LOGO === */
.topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  background: none !important;
  box-shadow: none;
  z-index: 2;
  margin-top: 40px;
  margin-bottom: 10px;
}

.logo {
  position: relative;
  height: 140px;
  width: auto;
  margin: 15px auto;
  display: block;
  background: transparent !important;
  animation: pulseGlow 5s ease-in-out infinite;
  image-rendering: -webkit-optimize-contrast;
  z-index: 2;
}

.logo::after {
  content: "";
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle, rgba(255,102,0,0.4) 0%, transparent 70%);
  filter: blur(25px);
  z-index: -1;
  animation: breatheGlow 5s ease-in-out infinite;
}

@keyframes breatheGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 50px rgba(255, 102, 0, 1));
}

.topbar h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  color: #ff6600;
  text-shadow: 0 0 20px rgba(255, 102, 0, 0.4);
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.1rem;
  color: rgba(255, 102, 0, 0.8);
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.4);
  margin-top: -5px;
  z-index: 2;
}

/* === TILE GRID === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 25px;
  margin-top: 15px;
  width: 90%;
  max-width: 1200px;
  z-index: 2;
}

/* === TILE DESIGN === */
.tile {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  text-align: center;
  padding: 30px 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tile:hover {
  border-color: #ff6600;
  box-shadow: 0 0 20px rgba(255, 102, 0, 0.4);
  transform: translateY(-5px);
}

/* === ICON + TEXT COLOR FIX === */

/* Default icon + text inside tiles */
.tile i {
  font-size: 2rem;
  color: #ffffff; /* default white icon */
  transition: color 0.3s, text-shadow 0.3s;
}

/* Text color */
.tile p,
.tile span,
.tile h3,
.tile a {
  color: #ff6600; /* vibrant orange accent */
  font-weight: 600;
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.4);
  transition: color 0.3s, text-shadow 0.3s;
}

/* Hover state - glow boost */
.tile:hover i,
.tile:hover p,
.tile:hover span,
.tile:hover h3,
.tile:hover a {
  color: #ff8533; /* lighter glowing orange */
  text-shadow: 0 0 20px rgba(255, 102, 0, 0.8);
}/* === FOOTER === */
footer {
  text-align: center;
  color: rgba(255, 102, 0, 0.8);
  font-size: 0.9rem;
  text-shadow: 0 0 12px rgba(255, 102, 0, 0.4);
  margin-top: 50px;
  letter-spacing: 1px;
}

/* === ADD TILE BUTTON === */
#addTileBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  font-size: 2rem;
  color: #000;
  background: #ff6600;
  border: none;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 102, 0, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 999;
}

#addTileBtn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(255, 102, 0, 0.9);
}

/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* === Modal Glow Refinement === */
.modal-content {
  background: rgba(15, 15, 15, 0.95);
  padding: 25px 35px;
  border-radius: 15px;
  box-shadow: 0 0 40px rgba(255, 102, 0, 0.35),
              0 0 80px rgba(255, 102, 0, 0.15);
  border: 1px solid rgba(255, 102, 0, 0.3);
  color: #fff;
  text-align: center;
  width: 320px;
  transition: all 0.4s ease-in-out;
  backdrop-filter: blur(8px) saturate(140%);
}

/* Modal entry animation */
.modal-content {
  animation: modalPop 0.6s ease-out;
}

@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Input fields inside modal */
.modal-content input {
  display: block;
  width: 100%;
  margin: 12px 0;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 102, 0, 0.3);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  transition: 0.3s ease;
}

.modal-content input:focus {
  outline: none;
  border-color: #ff6600;
  box-shadow: 0 0 15px rgba(255, 102, 0, 0.6);
}

/* Buttons */
#saveTile {
  background: linear-gradient(135deg, #ff6600, #ff944d);
  color: #000;
  font-weight: 600;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(255, 102, 0, 0.4);
  transition: all 0.3s ease;
}

#saveTile:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(255, 102, 0, 0.8);
}

#closeModal {
  background: rgba(60, 60, 60, 0.8);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  transition: 0.3s;
}

#closeModal:hover {
  background: #ff6600;
  color: #000;
}