@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;600;800&display=swap');

:root {
  --primary: #8b5cf6;
  --primary-glow: rgba(139, 92, 246, 0.5);
  --secondary: #06b6d4;
  --secondary-glow: rgba(6, 182, 212, 0.5);
  --accent: #f472b6;
  --bg-dark: #0f172a;
  --glass-bg: rgba(30, 41, 59, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  /* Complex dark gradient background */
  background-image:
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 40%);
}

/* ===== ANIMATED BACKGROUND ===== */
.background-graphics {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-symbol {
  position: absolute;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.03);
  user-select: none;
  animation: floatUp 25s linear infinite;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Randomized positions and sizes for existing symbols */
.floating-symbol:nth-child(2n) {
  color: rgba(139, 92, 246, 0.05);
}

.floating-symbol:nth-child(3n) {
  color: rgba(6, 182, 212, 0.05);
}

.floating-symbol:nth-child(1) {
  left: 10%;
  font-size: 4rem;
  animation-duration: 22s;
  animation-delay: 0s;
}

.floating-symbol:nth-child(2) {
  left: 25%;
  font-size: 6rem;
  animation-duration: 28s;
  animation-delay: -5s;
}

.floating-symbol:nth-child(3) {
  left: 40%;
  font-size: 3rem;
  animation-duration: 18s;
  animation-delay: -10s;
}

.floating-symbol:nth-child(4) {
  left: 55%;
  font-size: 5rem;
  animation-duration: 25s;
  animation-delay: -2s;
}

.floating-symbol:nth-child(5) {
  left: 70%;
  font-size: 4rem;
  animation-duration: 20s;
  animation-delay: -8s;
}

.floating-symbol:nth-child(6) {
  left: 85%;
  font-size: 7rem;
  animation-duration: 30s;
  animation-delay: -15s;
}

/* ... mapping other symbols generically to avoid huge CSS file, relying on defaults or these */

@keyframes floatUp {
  0% {
    transform: translateY(110vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-20vh) rotate(360deg);
    opacity: 0;
  }
}

/* ===== UTILITIES ===== */
h1,
h2,
h3 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 40px 20px;
  position: relative;
  z-index: 10;
  animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== GLASS CONTAINERS ===== */
.container,
.home-container,
.admin-section {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

.container:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.home-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%), var(--glass-bg);
}

/* ===== TYPOGRAPHY & ELEMENTS ===== */
h1 {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

h2 {
  font-size: 2.5rem;
  color: var(--text-main);
  margin-bottom: 2rem;
  text-align: center;
}

p {
  color: var(--text-muted);
  font-size: 1.25rem;
  margin-bottom: 3rem;
  font-weight: 300;
}

.app-icon {
  font-size: 6rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 30px var(--primary-glow));
  animation: pulseIcon 3s ease-in-out infinite;
}

@keyframes pulseIcon {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 30px var(--primary-glow));
  }

  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 50px var(--secondary-glow));
  }
}

/* ===== BUTTONS ===== */
button,
.btn-link {
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary,
.btn-upload {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 16px 48px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px var(--primary-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary:active,
.btn-upload:active {
  transform: scale(0.98);
}

.btn-primary:hover,
.btn-upload:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -10px var(--primary-glow);
}

.btn-back {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: white;
}

.btn-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: 2rem;
  border-bottom: 1px solid transparent;
}

.btn-link:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ===== GRIDS & LISTS ===== */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  width: 100%;
}

.option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px 20px;
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.modules-container,
.files-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.module-btn,
.file-btn,
.content-item {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.0) 100%);
  border: 1px solid var(--glass-border);
  padding: 20px;
  border-radius: 16px;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.module-btn:hover,
.file-btn:hover,
.content-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--secondary);
  padding-left: 30px;
  /* Slide effect */
}

/* ===== ADMIN SPECIFFIC ===== */
.pin-input {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--glass-border);
  color: white;
  font-size: 2rem;
  letter-spacing: 1rem;
  text-align: center;
  width: 100%;
  max-width: 300px;
  padding: 15px;
  border-radius: 16px;
  margin-bottom: 20px;
  font-family: 'Outfit', monospace;
}

.pin-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.admin-section h3 {
  color: var(--secondary);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.form-group label {
  display: block;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  padding: 12px 16px;
  border-radius: 12px;
  color: white;
  font-family: 'Inter', sans-serif;
  margin-bottom: 20px;
}

.form-input:focus {
  outline: none;
  border-color: var(--secondary);
  background: rgba(0, 0, 0, 0.5);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Engineering Sparks */
.spark-symbol {
  position: fixed;
  pointer-events: none;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
  text-shadow: 0 0 10px var(--secondary);
  z-index: 9999;
  opacity: 1;
  transform: translate(-50%, -50%);
  animation: sparkMove 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  will-change: transform, opacity;
}

@keyframes sparkMove {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.2) rotate(var(--rot));
  }
}

/* Logo Styles */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: white;
  text-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2rem;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.logo-accent {
  color: var(--primary);
  font-weight: 300;
}

/* Dedicated Home Button */
.nav-btn-home {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn-home:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}
/* ADD THIS TO THE END OF style.css */

/* ===== NAVIGATION BAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* Adjust screen padding to account for fixed navbar */
.screen {
  padding-top: 100px;
}

/* ===== ABOUT PAGE STYLES ===== */
.about-container {
  max-width: 900px;
}

.about-content {
  margin-top: 30px;
}

.about-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

.about-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.about-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 20px var(--secondary-glow));
}

.about-card h3 {
  color: var(--secondary);
  font-size: 1.8rem;
  margin-bottom: 15px;
  text-align: left;
}

.about-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
  text-align: left;
}

.tech-stack-row {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.tech-stack-row span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* ===== ICON WRAPPERS ===== */
.card-icon-wrapper {
  margin-bottom: 10px;
}

.card-icon {
  font-size: 2.5rem;
  display: block;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 20px;
  }

  .nav-logo {
    font-size: 1.4rem;
  }

  .logo-icon {
    font-size: 1.6rem;
  }

  .nav-links {
    gap: 10px;
  }

  .nav-item,
  .nav-btn-home {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .app-icon {
    font-size: 4rem;
  }

  .container,
  .home-container {
    padding: 30px 20px;
  }

  .options-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    padding: 20px;
  }

  .about-icon {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
  }

  h1 {
    font-size: 2rem;
  }

  .btn-primary,
  .btn-upload {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== LOADING STATES ===== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== ERROR MESSAGES ===== */
.error-message {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 15px;
  border-radius: 12px;
  margin: 20px 0;
  text-align: center;
}

.success-message {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 15px;
  border-radius: 12px;
  margin: 20px 0;
  text-align: center;
}
