:root {
  --primary-color: #034e4f;
  --secondary-color: #009688;
  --bg-light: #f8f9fa;
  --bg-dark: #121212;
  --text-light: #222222;
  --text-dark: #f5f5f5;
  --card-light: #ffffff;
  --card-dark: #2c2c2c;
  --card-text-light: #222222;
  --card-text-dark: #f5f5f5;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  
  /* Sudo Neon Colors */
  --neon-cyan: #00f3ff;
  --neon-pink: #ff00ea;
  --neon-yellow: #facc15;
  --neon-blue: #0ea5e9;
}

body {
  margin: 0;
  font-family: var(--font-family);
  line-height: 1.65; 
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background-color 0.3s, color 0.3s;
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

/* =========================================
   HEADER STYLES
   ========================================= */
.main-header {
  background: var(--primary-color);
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}
body.dark .main-header {
  background: var(--primary-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Header Left */
.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.icon-btn {
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
}
body.dark .icon-btn { color: var(--text-dark); }
.header-logo { height: 40px; width: auto; }
.header-brand {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: #ffffff;
}
body.dark .header-brand { color: var(--text-dark); }

/* Header Right & Expandable Search */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative; /* Context for mobile absolute search */
}

.search-box {
  display: flex;
  align-items: center;
  background: transparent;
  border-radius: 50px;
  transition: all 0.4s ease;
  overflow: hidden;
  padding: 2px;
}

.search-box.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 2px 10px;
}
body.dark .search-box.active {
  background: #333;
}

.search-box input {
  width: 0;
  opacity: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-light);
  font-size: 0.95rem;
  transition: width 0.4s ease, opacity 0.4s ease;
  padding: 0;
}
body.dark .search-box input { color: var(--text-dark); }

.search-box.active input {
  width: 160px; /* Expands to this width */
  opacity: 1;
  padding: 4px 8px;
}

.search-toggle-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  transition: background 0.3s, color 0.3s;
}

.search-box.active .search-toggle-btn {
  color: var(--secondary-color);
}
body.dark .search-box.active .search-toggle-btn {
  color: var(--text-dark);
}

.header-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s;
}
body.dark .header-link { color: var(--text-dark); }
.header-link:hover { color: #d4af37; }

/* =========================================
   NAV GRID & ADS
   ========================================= */
.nav-container { 
  margin: 2rem auto; 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
  gap: 1.5rem; 
  padding: 0 2rem; 
  max-width: 1260px; 
  box-sizing: border-box; 
  width: 100%; 
}
.nav-card { background-color: var(--card-light); padding: 1.5rem 1rem; border-radius: 12px; cursor: pointer; text-align: center; color: var(--card-text-light); text-decoration: none; transition: transform 0.25s, box-shadow 0.3s; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.nav-card img { max-width: 100%; max-height: 60px; object-fit: contain; margin: auto; display: block; }
body.dark .nav-card { background-color: var(--card-dark); color: var(--card-text-dark); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.nav-card p { font-size: 1rem; margin: 0.8rem 0 0; font-weight: bold; }
.nav-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }

.adsense-center { 
  max-width: 1200px; 
  margin: 0 auto 2rem; 
  padding: 0 2rem; 
}
body.dark .adsense-center { background-color: transparent; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background-color: #0d1627;
  color: #e2e8f0;
  padding: 4rem 2rem 2rem;
  margin-top: auto;
  border-top: 4px solid var(--secondary-color);
  overflow-x: hidden; /* CRITICAL: Prevents mobile layout breaking */
}
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; }
.footer-col { display: flex; flex-direction: column; }
.footer-heading { color: var(--secondary-color); font-size: 1.4rem; margin-bottom: 1.5rem; font-weight: 600; }

/* Col 1: Brand & Hiring */
.footer-brand-logo { height: 60px; width: auto; align-self: flex-start; }
.footer-hiring-block p { font-size: 0.95rem; color: #94a3b8; line-height: 1.6; margin-bottom: 1rem; }
.hiring-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(16, 185, 129, 0.15); color: #10b981; padding: 4px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 0.8rem; border: 1px solid rgba(16, 185, 129, 0.3); }
.pulse-dot { width: 8px; height: 8px; background-color: #10b981; border-radius: 50%; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); animation: pulse-green 1.5s infinite; }
@keyframes pulse-green { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.footer-apply-btn { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--secondary-color); font-weight: 600; text-decoration: none; font-size: 0.95rem; transition: color 0.3s; }
.footer-apply-btn:hover { color: #fff; }

/* Socials */
.footer-socials { display: flex; gap: 1.5rem; margin-top: 1.5rem; align-items: center; }
.footer-socials a { font-size: 1.8rem; transition: transform 0.3s; }
.footer-socials a:hover { transform: scale(1.15); }
.footer-socials a.facebook { color: #1877F2; }
.footer-socials a.youtube { color: #FF0000; }
.footer-socials a.donate-icon { color: #ff8c00; }
.footer-socials a.playstore { 
  background: linear-gradient(45deg, #4285F4, #0F9D58, #F4B400, #DB4437);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Col 2: Partners Carousel */
.footer-partners-carousel {
  display: flex;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  padding: 1rem 0;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.footer-carousel-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: max-content;
  animation: scroll-left 15s linear infinite;
}
.footer-carousel-track:hover { animation-play-state: paused; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-50% - 1rem)); } }
.footer-carousel-track a { display: block; transition: transform 0.3s; }
.footer-carousel-track a:hover { transform: scale(1.1); }
.footer-carousel-track img {
  height: 45px;
  max-width: 140px;
  object-fit: contain;
}

/* =========================================
   SUDO AI LOGO (FOOTER INJECTION)
   ========================================= */
.footer-sudo-container {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 220px; 
  position: relative;
  overflow: hidden; /* Added to keep animations from escaping container */
}

.footer-sudo-container .logo-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0.65); 
}

.footer-sudo-container .shockwave {
  position: absolute;
  width: 150px; height: 150px;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 20px var(--neon-cyan), inset 0 0 20px var(--neon-cyan);
  opacity: 0;
  animation: emitShock 2s ease-out infinite;
}

@keyframes emitShock {
  0% { transform: scale(1); opacity: 0.8; border-width: 4px; }
  100% { transform: scale(2.5); opacity: 0; border-width: 1px; }
}

.footer-sudo-container .hud-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 243, 255, 0.1);
}
.footer-sudo-container .hud-1 {
  width: 250px; height: 250px;
  border-top: 2px dashed var(--neon-cyan);
  border-right: 2px solid transparent;
  border-bottom: 2px dashed var(--neon-cyan);
  animation: spinHUD 15s linear infinite;
}
.footer-sudo-container .hud-2 {
  width: 290px; height: 290px;
  border-left: 2px dotted var(--neon-pink);
  border-right: 2px dotted var(--neon-pink);
  animation: spinHUD 20s linear infinite reverse;
}

@keyframes spinHUD { 100% { transform: rotate(360deg); } }

.footer-sudo-container .sudo-logo {
  position: relative;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 30, 50, 0.8), rgba(5, 10, 20, 0.9));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 243, 255, 0.3);
  box-shadow: 0 0 40px rgba(0, 243, 255, 0.2), inset 0 0 30px rgba(0, 243, 255, 0.1);
  display: flex; justify-content: center; align-items: center;
}

.footer-sudo-container .core {
  font-size: 34px;
  z-index: 12;
  color: #fff;
  text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
  animation: pulseCore 2s ease-in-out infinite;
}

@keyframes pulseCore {
  0%, 100% { transform: scale(1); text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan); }
  50% { transform: scale(1.15); text-shadow: 0 0 20px #fff, 0 0 40px var(--neon-cyan), 0 0 80px var(--neon-cyan); }
}

.footer-sudo-container .orbit {
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  animation: orbitDynamic 12s linear infinite;
  z-index: 11;
}

@keyframes orbitDynamic {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(40deg); }
  35%  { transform: rotate(140deg); }
  55%  { transform: rotate(280deg); }
  75%  { transform: rotate(320deg); }
  100% { transform: rotate(360deg); }
}

.footer-sudo-container .orbit i {
  position: absolute;
  font-size: 19px;
  animation: counterOrbitDynamic 12s linear infinite;
  background: #0d1627; 
  border-radius: 50%;
  padding: 4px;
}

@keyframes counterOrbitDynamic {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  15%  { transform: translate(-50%, -50%) rotate(-40deg); }
  35%  { transform: translate(-50%, -50%) rotate(-140deg); }
  55%  { transform: translate(-50%, -50%) rotate(-280deg); }
  75%  { transform: translate(-50%, -50%) rotate(-320deg); }
  100% { transform: translate(-50%, -50%) rotate(-360deg); }
}

.footer-sudo-container .chip { top: 0%; left: 50%; color: var(--neon-cyan); text-shadow: 0 0 15px var(--neon-cyan), 0 0 30px var(--neon-cyan); }
.footer-sudo-container .network { top: 50%; left: 100%; color: var(--neon-blue); text-shadow: 0 0 15px var(--neon-blue), 0 0 30px var(--neon-blue); }
.footer-sudo-container .terminal { top: 100%; left: 50%; color: var(--neon-yellow); text-shadow: 0 0 15px var(--neon-yellow), 0 0 30px var(--neon-yellow); }
.footer-sudo-container .eye { top: 50%; left: 0%; color: var(--neon-pink); text-shadow: 0 0 15px var(--neon-pink), 0 0 30px var(--neon-pink); }


/* Col 3: Form */
.footer-form { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-form input, .footer-form textarea { width: 100%; box-sizing: border-box; padding: 0.85rem; border-radius: 6px; background-color: #1a2436; border: 1px solid #2d3b55; color: #f1f5f9; font-family: var(--font-family); font-size: 0.95rem; }
.footer-form input::placeholder, .footer-form textarea::placeholder { color: #64748b; }
.footer-form input:focus, .footer-form textarea:focus { border-color: var(--secondary-color); outline: none; }
.footer-form button { width: 100%; padding: 0.85rem; border-radius: 6px; border: none; background-color: var(--secondary-color); color: white; cursor: pointer; font-weight: bold; font-size: 1rem; transition: background-color 0.3s, transform 0.2s; }
.footer-form button:hover { background-color: #00796B; transform: translateY(-2px); }

/* Modals / App Download */
.app-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.app-modal { position: relative; width: 320px; padding: 26px 2px 22px; border-radius: 18px; text-align: center; color: #111; background: linear-gradient(135deg, #d4af37, #2bb0a6); box-shadow: 0 25px 50px rgba(0,0,0,0.45); }
.close-forever { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: #111; }
.app-icon { width: 78px; height: 78px; border-radius: 18px; margin-bottom: 14px; }
.app-modal h3 { margin: 0; font-size: 1.35rem; }
.app-modal p { font-size: 0.95rem; margin: 8px 0 18px; }
.app-actions { display: flex; justify-content: center; gap: 12px; margin-bottom: 14px; }
.store-btn img { height: 50px; width: auto; }
.later-btn { background: transparent; border: 1px solid rgba(0,0,0,0.35); padding: 8px 79px; border-radius: 8px; cursor: pointer; font-weight: 500; }

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (max-width: 900px) {
  .main-header { 
    flex-wrap: nowrap; 
    padding: 0.6rem 1rem; 
    gap: 0.5rem; 
  }
  .header-brand { 
    display: none; 
  }
  
  /* Mobile Expandable Search Setup */
  .header-right { 
    gap: 0.8rem; 
    position: static; 
  }
  .header-link { 
    font-size: 0.9rem; 
  }
  .about-link {
    display: none; /* Hide About link on small screens to save space */
  }

  .search-box.active {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% - 100px); /* Leave space for left-menu */
    max-width: 300px;
    z-index: 10;
  }
  .search-box.active input {
    width: 100%; 
  }
  
  .nav-container { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0.8rem; padding: 0 1rem; }
  .nav-card:nth-child(-n+4) { grid-column: span 3; padding: 0.8rem; }
  .nav-card:nth-child(-n+4) img { width: 35px; height: 36px; }
  .nav-card:nth-child(n + 5) { grid-column: span 4; }
  .nav-card { padding: 0.8rem; text-align: center; }
  .nav-card img { width: 43px; height: 44px; }
  .nav-card p { font-size: 0.7rem; }
  
  /* Footer Mobile alignment & overflow protection */
  .footer-container { 
    grid-template-columns: 1fr; 
    gap: 2rem; 
    text-align: center; 
  }
  .footer-brand-logo { 
    margin: 0 auto 1rem !important; 
  }
  .footer-socials { 
    justify-content: center; 
  }
  
  .footer-sudo-container .logo-wrapper {
    transform: scale(0.50); /* Scale down slightly more to fit */
  }

  /* =========================================
   APP DOWNLOAD MODAL STYLES (FIXED)
   ========================================= */
.app-modal-overlay { 
  position: fixed; 
  inset: 0; 
  background: rgba(0, 0, 0, 0.75); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  z-index: 9999; 
  padding: 1rem;
  box-sizing: border-box;
}

.app-modal { 
  position: relative; 
  width: 100%;
  max-width: 320px; 
  padding: 2rem 1.5rem; 
  border-radius: 18px; 
  text-align: center; 
  color: #111; 
  background: linear-gradient(135deg, #d4af37, #2bb0a6); 
  box-shadow: 0 25px 50px rgba(0,0,0,0.45); 
  box-sizing: border-box;
}

.close-forever { 
  position: absolute; 
  top: 12px; 
  right: 14px; 
  background: none; 
  border: none; 
  font-size: 1.3rem; 
  cursor: pointer; 
  color: #111; 
  padding: 0;
  line-height: 1;
}

.app-icon { 
  width: 78px; 
  height: 78px; 
  border-radius: 18px; 
  margin: 0 auto 14px; 
  display: block;
  object-fit: contain;
}

.app-modal h3 { 
  margin: 0; 
  font-size: 1.35rem; 
  font-weight: 700;
}

.app-modal p { 
  font-size: 0.95rem; 
  margin: 8px 0 18px; 
  line-height: 1.4;
}

.app-actions { 
  display: flex; 
  justify-content: center; 
  gap: 12px; 
  margin-bottom: 1rem; 
  width: 100%;
}

.store-btn {
  display: inline-block;
  flex: 1;
  max-width: 130px;
}

.store-btn img { 
  width: 100%;
  height: auto; 
  display: block;
  object-fit: contain;
}

/* Fixed the hardcoded padding here to prevent button layout breaking on phones */
.later-btn { 
  background: transparent; 
  border: 1px solid rgba(0,0,0,0.35); 
  padding: 10px 0; 
  width: 100%;
  border-radius: 8px; 
  cursor: pointer; 
  font-weight: 600; 
  font-size: 0.9rem;
  transition: background 0.2s;
}

.later-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* =========================================
   LARGE SCREEN RESPONSIVE PADDING
   ========================================= */
@media (min-width: 1920px) {
  .nav-container { 
    margin: 2.5rem auto; 
    padding: 0 8rem; 
    max-width: 100%;
    gap: 2rem;
  }
  
  .adsense-center { 
    max-width: 100%;
    padding: 0 8rem 2rem;
  }
  
  .main-header {
    padding: 0.8rem 4rem;
  }
}

@media (min-width: 1440px) and (max-width: 1919px) {
  .nav-container { 
    margin: 2.25rem auto; 
    padding: 0 5rem; 
    max-width: 100%;
    gap: 1.75rem;
  }
  
  .adsense-center { 
    max-width: 100%;
    padding: 0 5rem 2rem;
  }
  
  .main-header {
    padding: 0.8rem 3rem;
  }
}

@media (min-width: 1200px) and (max-width: 1439px) {
  .nav-container { 
    margin: 2rem auto; 
    padding: 0 3rem; 
    max-width: 100%;
  }
  
  .adsense-center { 
    max-width: 100%;
    padding: 0 3rem 2rem;
  }
 }
}