/* Tamil Byte Tech — Modern Cyber 3D Electronics Theme */

:root {
  /* Header: Deep Metallic Cyber Slate-Navy */
  --header-bg: rgba(13, 19, 34, 0.95);
  --header-border: #ff8800;

  /* Body Surface */
  --body-bg: #070a10;
  --body-surface: #0e1420;
  --body-card: #131b2b;
  --body-card-hover: #1b263c;

  /* Footer: Deep Crimson Mahogany Maroon (Derived from Badge Symbol) */
  --footer-bg: #1a0606;
  --footer-border: #ffb700;

  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;

  --accent-gold: #ffb700;
  --accent-orange: #ff8800;
  --accent-cyan: #00f0ff;
  --accent-green: #10b981;

  --glass-bg: rgba(19, 27, 43, 0.85);
  --glass-border: rgba(255, 136, 0, 0.25);
}

body {
  background-color: #070a11;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* --- Clean Ambient High-Tech Background for General Pages with Circuit Grid --- */
.site-bg-ambient {
  background-color: #05070d;
  background-image: 
    radial-gradient(circle at 18% 18%, rgba(255, 136, 0, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 82% 60%, rgba(0, 240, 255, 0.10) 0%, transparent 55%),
    radial-gradient(circle at 50% 85%, rgba(112, 0, 255, 0.08) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 136, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 240, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-attachment: fixed;
}

/* --- Simple Solid Clean Background for Admin Page Alone --- */
.admin-page-bg {
  background-color: #0a0d14 !important;
  background-image: none !important;
}

/* --- Header Distinct Styling (Cyber Slate-Navy + Gold/Orange Line) --- */
.glass-header {
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--header-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

/* High Visibility Navigation Links */
.nav-link {
  color: #e2e8f0 !important;
  font-weight: 600;
  font-size: 0.825rem;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: #ff8800 !important;
  text-shadow: 0 0 10px rgba(255, 136, 0, 0.6);
}

.nav-link-active {
  background: rgba(255, 136, 0, 0.18) !important;
  border: 1px solid #ff8800 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 0 14px rgba(255, 136, 0, 0.35);
}

/* --- Footer Distinct Styling (Deep Crimson Mahogany Maroon) --- */
.glass-footer {
  background: linear-gradient(to bottom, #230808 0%, #140404 100%);
  position: relative;
  border-top: 3px solid var(--footer-border);
  box-shadow: 0 -10px 40px rgba(128, 12, 12, 0.3);
}

/* --- Glassmorphic Panels & Cards --- */
.glass-panel {
  background: var(--body-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
}

.glass-card {
  background: var(--body-card);
  border: 1px solid var(--glass-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  background: var(--body-card-hover);
  border-color: rgba(255, 136, 0, 0.6);
  box-shadow: 0 12px 28px -10px rgba(255, 136, 0, 0.35);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.glass-pill:hover {
  border-color: var(--accent-orange);
  color: #ffffff;
}

/* --- Hanging & Floating 3D Microchip Board Styling --- */
.hanging-container {
  perspective: 1200px;
}

.hanging-wire {
  position: absolute;
  top: -120px;
  width: 2px;
  height: 120px;
  background: linear-gradient(to bottom, rgba(255, 136, 0, 0.2), rgba(255, 136, 0, 0.95));
  box-shadow: 0 0 10px rgba(255, 136, 0, 0.8);
}

.hanging-board {
  transform-style: preserve-3d;
  animation: hangingSwing 6s ease-in-out infinite alternate;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 136, 0, 0.3);
  transition: transform 0.25s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.hanging-board:hover {
  transform: scale(1.04) rotateX(15deg) rotateY(12deg);
  box-shadow: 0 30px 60px -12px rgba(255, 136, 0, 0.45);
}

@keyframes hangingSwing {
  0% {
    transform: rotateX(8deg) rotateY(-10deg) translateY(0px) rotateZ(-1deg);
  }
  50% {
    transform: rotateX(12deg) rotateY(10deg) translateY(-12px) rotateZ(1deg);
  }
  100% {
    transform: rotateX(6deg) rotateY(-8deg) translateY(0px) rotateZ(-0.5deg);
  }
}

/* --- 3D PCB Layer Stackup Explosion Styling --- */
.pcb-3d-scene {
  perspective: 1000px;
}

.pcb-layer-3d {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* ============================================================
   DRAMATIC SPLASH SCREEN — Enhanced Animations & Effects
   ============================================================ */

.splash-container {
  background: radial-gradient(
    ellipse at 50% 60%,
    #0d1424 0%,
    #06080f 55%,
    #020408 100%
  );
}

/* --- Scanlines CRT overlay --- */
.splash-scanlines {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.18) 3px,
    rgba(0, 0, 0, 0.18) 4px
  );
  pointer-events: none;
  animation: scanlineDrift 8s linear infinite;
}

@keyframes scanlineDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 0 80px; }
}

/* --- Screen-flash on Enter --- */
.splash-flash {
  animation: screenFlash 0.45s ease-out forwards;
}

@keyframes screenFlash {
  0%   { opacity: 1; }
  30%  { opacity: 0; background: #fff; }
  60%  { opacity: 0.6; }
  100% { opacity: 0; }
}

/* --- Panel slide-up entry --- */
.splash-panel-enter {
  animation: panelSlideUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes panelSlideUp {
  0%   { opacity: 0; transform: translateY(60px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0px) scale(1); }
}

/* --- Panel exit --- */
.splash-panel-exit {
  animation: panelExit 0.5s cubic-bezier(0.4, 0, 1, 1) forwards;
}

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

/* --- Glitch text effect --- */
.splash-glitch {
  position: relative;
  animation: glitchShift 4s infinite;
}

.splash-glitch::before,
.splash-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  left: 0;
  overflow: hidden;
}

.splash-glitch::before {
  color: #00f0ff;
  clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
  animation: glitchBefore 4s infinite;
  opacity: 0.7;
}

.splash-glitch::after {
  color: #ff8800;
  clip-path: polygon(0 55%, 100% 55%, 100% 70%, 0 70%);
  animation: glitchAfter 4s infinite;
  opacity: 0.6;
}

@keyframes glitchShift {
  0%, 90%, 100% { transform: translate(0); }
  92%           { transform: translate(-3px, 1px); }
  94%           { transform: translate(3px, -1px); }
  96%           { transform: translate(-2px, 0px); }
  98%           { transform: translate(0px, 2px); }
}

@keyframes glitchBefore {
  0%, 90%, 100% { transform: translate(0); }
  92%           { transform: translate(5px, 0); }
  94%           { transform: translate(-5px, 0); }
  96%           { transform: translate(2px, 0); }
}

@keyframes glitchAfter {
  0%, 90%, 100% { transform: translate(0); }
  92%           { transform: translate(-4px, 0); }
  94%           { transform: translate(4px, 0); }
  96%           { transform: translate(-1px, 0); }
}

/* --- Orbit rings --- */
.orbit-ring-1 {
  animation: orbitSpin1 8s linear infinite;
  border-color: rgba(255, 136, 0, 0.6);
  border-style: dashed;
}

.orbit-ring-2 {
  animation: orbitSpin2 5s linear infinite;
  border-color: rgba(0, 240, 255, 0.45);
  border-style: solid;
}

.orbit-ring-3 {
  animation: orbitSpin1 12s linear infinite reverse;
  border-color: rgba(112, 0, 255, 0.35);
  border-style: dotted;
}

@keyframes orbitSpin1 {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes orbitSpin2 {
  0%   { transform: rotate(0deg) scaleX(1.2); }
  100% { transform: rotate(-360deg) scaleX(1.2); }
}

/* --- Holographic MCU core pulse --- */
.holo-core {
  animation: holoPulse 2.5s ease-in-out infinite alternate;
  box-shadow:
    0 0 0 2px rgba(255, 136, 0, 0.5),
    0 0 20px rgba(255, 136, 0, 0.4),
    0 0 40px rgba(255, 136, 0, 0.15),
    inset 0 0 15px rgba(0, 240, 255, 0.15);
}

@keyframes holoPulse {
  0%   { box-shadow: 0 0 0 2px rgba(255,136,0,0.5), 0 0 20px rgba(255,136,0,0.4), 0 0 40px rgba(255,136,0,0.1), inset 0 0 15px rgba(0,240,255,0.1); }
  100% { box-shadow: 0 0 0 4px rgba(255,136,0,0.8), 0 0 35px rgba(255,136,0,0.7), 0 0 80px rgba(255,136,0,0.3), inset 0 0 25px rgba(0,240,255,0.25); }
}

/* --- Floating particle dots --- */
.splash-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0%   { transform: translateY(0)   scale(1);   opacity: 0.8; }
  50%  { transform: translateY(-30px) scale(1.2); opacity: 1; }
  100% { transform: translateY(0)   scale(1);   opacity: 0.8; }
}

/* --- Data-stream typing cursor --- */
.typing-cursor::after {
  content: '█';
  animation: cursorBlink 0.75s step-end infinite;
  color: #ff8800;
  font-size: 0.75em;
  margin-left: 2px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* --- Boot log line fade-in --- */
.boot-line-enter {
  animation: bootLineFadeIn 0.3s ease-out forwards;
}

@keyframes bootLineFadeIn {
  0%   { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* --- Outer glow ring pulse --- */
.splash-glow-ring {
  animation: splashGlowPulse 3s ease-in-out infinite alternate;
}

@keyframes splashGlowPulse {
  0%   { box-shadow: 0 0 30px rgba(255,136,0,0.25), 0 0 60px rgba(255,136,0,0.1),  inset 0 0 20px rgba(0,240,255,0.08); }
  100% { box-shadow: 0 0 60px rgba(255,136,0,0.55), 0 0 120px rgba(255,136,0,0.2), inset 0 0 40px rgba(0,240,255,0.18); }
}

/* --- Enter button ready flash --- */
.splash-btn-ready {
  animation: btnReadyPulse 1.5s ease-in-out infinite;
}

@keyframes btnReadyPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255,136,0,0.4), 0 0 30px rgba(255,136,0,0.15); }
  50%      { box-shadow: 0 0 30px rgba(255,136,0,0.8), 0 0 60px rgba(255,136,0,0.35); }
}

/* --- Hex grid bg animation --- */
.splash-hex-bg {
  background-image:
    radial-gradient(circle, rgba(255,136,0,0.07) 1px, transparent 1px),
    linear-gradient(60deg, rgba(255,136,0,0.03) 25%, transparent 25%, transparent 75%, rgba(255,136,0,0.03) 75%);
  background-size: 30px 30px, 30px 52px;
  animation: hexDrift 20s linear infinite;
}

@keyframes hexDrift {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 60px 104px, 60px 104px; }
}

/* Legacy splashPulse kept for compat */
@keyframes splashPulse {
  0%   { transform: scale(0.98); }
  100% { transform: scale(1.02); }
}

/* --- Stylish Range Sliders --- */
input[type="range"].stylish-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  outline: none;
}

input[type="range"].stylish-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8800 0%, #ff5500 100%);
  cursor: pointer;
  box-shadow: 0 0 12px #ff8800;
  border: 2px solid #ffffff;
  transition: transform 0.15s ease;
}

input[type="range"].stylish-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Modal Overlay */
.modal-overlay {
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(8px);
}

/* --- Hotspots for Interactive PCB Component Breakdown --- */
.exploded-hotspot {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.exploded-hotspot:hover {
  transform: translate(-50%, -50%) scale(1.3);
}

.hotspot-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  animation: hotspotPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes hotspotPing {
  0% { transform: scale(0.9); opacity: 0.9; }
  75%, 100% { transform: scale(1.9); opacity: 0; }
}

/* Oscilloscope CRT Scan Line */
.oscilloscope-glow {
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.15), inset 0 0 20px rgba(0, 240, 255, 0.05);
}

/* Cinematic Exploded View 3D Perspective container */
.exploded-3d-stage {
  perspective: 1200px;
  transform-style: preserve-3d;
}

/* Infinite Horizontal Auto-Scroll Marquee */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeLoop 28s linear infinite;
}

.marquee-container:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-card {
  flex-shrink: 0;
  width: 320px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 640px) {
  .marquee-card {
    width: 260px;
  }
}

.marquee-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 136, 0, 0.7);
  box-shadow: 0 16px 32px -8px rgba(255, 136, 0, 0.3);
}

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

::-webkit-scrollbar-track {
  background: #090c12;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 136, 0, 0.5);
  border-radius: 4px;
}

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

/* ============================================================
   SUPER DYNAMIC MOBILE & TOUCH OPTIMIZATIONS
   ============================================================ */

/* Hide scrollbars for horizontal pill strips while keeping momentum scrolling */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Fast tap response & no tap gray box */
button, a, input, select, textarea, [role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Mobile Bottom Navigation Dock */
.mobile-bottom-dock {
  background: rgba(10, 14, 24, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 136, 0, 0.4);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.75), 0 -1px 0 rgba(255, 136, 0, 0.2);
  padding-bottom: max(env(safe-area-inset-bottom, 8px), 8px);
}

/* Mobile Drawer Slide Animations */
.mobile-drawer-enter {
  animation: drawerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-drawer-exit {
  animation: drawerSlideOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes drawerSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes drawerSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Pulsing Cyber Neon Glow for Active Elements */
.glow-cyber-orange {
  box-shadow: 0 0 16px rgba(255, 136, 0, 0.55), inset 0 0 8px rgba(255, 136, 0, 0.25);
}

.glow-cyber-cyan {
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.55), inset 0 0 8px rgba(0, 240, 255, 0.25);
}

/* Safe touch target size for hotspots */
@media (max-width: 640px) {
  .exploded-hotspot {
    width: 32px;
    height: 32px;
  }
}
