/* Celestial Dark Theme - Celeste */
:root {
  /* Professional dark theme colors */
  --bg-primary: #0a0a18;
  --bg-secondary: #141428;
  --bg-tertiary: #1e1e3a;
  --text-primary: #ffffff;
  --text-secondary: #aab0c0;
  --accent-primary: #5a51d1;
  --accent-secondary: #4b42a8;
  --accent-tertiary: #2a236e;
  --star-color: #ffffff;
  --star-shadow: 0 0 8px rgba(144, 137, 255, 0.8), 0 0 12px rgba(144, 137, 255, 0.4);
  --nebula-color-1: rgba(144, 137, 255, 0.03);
  --nebula-color-2: rgba(90, 81, 209, 0.04);
  --nebula-color-3: rgba(59, 48, 177, 0.02);
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
}

/* General styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%23222255' stroke-width='1'%3E%3Cpath d='M769 229L1037 260.9M927 880L731 737 520 660 309 538 40 599 295 764 126.5 879.5 40 599-197 493 102 382-31 229 126.5 79.5-69-63'/%3E%3Cpath d='M-31 229L237 261 390 382 603 493 308.5 537.5 101.5 381.5M370 905L295 764'/%3E%3Cpath d='M520 660L578 842 731 737 840 599 603 493 520 660 295 764 309 538 390 382 539 269 769 229 577.5 41.5 370 105 295 -36 126.5 79.5 237 261 102 382 40 599 -69 737 127 880'/%3E%3Cpath d='M520-140L578.5 42.5 731-63M603 493L539 269 237 261 370 105M902 382L539 269M390 382L102 382'/%3E%3Cpath d='M-222 42L126.5 79.5 370 105 539 269 577.5 41.5 927 80 769 229 902 382 603 493 731 737M295-36L577.5 41.5M578 842L295 764M40-201L127 80M102 382L-261 269'/%3E%3C/g%3E%3Cg fill='%232f2f66'%3E%3Ccircle cx='769' cy='229' r='5'/%3E%3Ccircle cx='539' cy='269' r='5'/%3E%3Ccircle cx='603' cy='493' r='5'/%3E%3Ccircle cx='731' cy='737' r='5'/%3E%3Ccircle cx='520' cy='660' r='5'/%3E%3Ccircle cx='309' cy='538' r='5'/%3E%3Ccircle cx='295' cy='764' r='5'/%3E%3Ccircle cx='40' cy='599' r='5'/%3E%3Ccircle cx='102' cy='382' r='5'/%3E%3Ccircle cx='127' cy='80' r='5'/%3E%3Ccircle cx='370' cy='105' r='5'/%3E%3Ccircle cx='578' cy='42' r='5'/%3E%3Ccircle cx='237' cy='261' r='5'/%3E%3Ccircle cx='390' cy='382' r='5'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 15% 30%, var(--nebula-color-1) 0%, rgba(10, 10, 24, 0) 45%),
    radial-gradient(circle at 85% 20%, var(--nebula-color-2) 0%, rgba(10, 10, 24, 0) 55%),
    radial-gradient(circle at 50% 70%, var(--nebula-color-3) 0%, rgba(10, 10, 24, 0) 60%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--text-primary);
}

/* Header and Navigation */
header {
  background-color: var(--bg-secondary);
  padding: 1rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease-in-out;
}

/* Header will be hidden/shown via JavaScript */
header.header-hidden {
  transform: translateY(-100%);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-img {
  height: 4rem;
  width: 4rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--text-primary) !important;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--accent-secondary);
}

/* Main Content */
main {
  flex: 1;
  padding: 2rem 0;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(white, rgba(255, 255, 255, 0.2) 2px, transparent 2px);
  background-size: 50px 50px;
  opacity: 0.1;
  z-index: 0;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, var(--text-primary), var(--accent-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}

.hero .btn-primary {
  position: relative;
  z-index: 1;
}

/* Sections */
section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  display: inline-block;
  position: relative;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--accent-secondary), var(--accent-primary));
}

/* Cards */
.card {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.card-body {
  color: var(--text-secondary);
}

/* Grid System */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--bg-tertiary);
  border-radius: 4px;
  color: var(--text-primary);
  transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(136, 96, 208, 0.2);
}

button {
  cursor: pointer;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  background-color: var(--accent-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--accent-secondary);
}

/* Footer */
footer {
  background-color: var(--bg-secondary);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  position: relative;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(to right, var(--accent-secondary), var(--accent-primary));
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--accent-primary);
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Star animation - more professional and subtle */
.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 1px;
  height: 1px;
  background-color: var(--star-color);
  border-radius: 50%;
  box-shadow: var(--star-shadow);
  animation: twinkle 4s infinite;
}

.star.medium {
  width: 2px;
  height: 2px;
}

.star.large {
  width: 3px;
  height: 3px;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: scale(1);
  }
}

.shooting-star {
  position: absolute;
  height: 1px;
  width: 70px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8));
  transform-origin: left;
  animation: shooting 5s linear infinite;
  animation-delay: calc(var(--delay) * 1s);
  opacity: 0;
  border-radius: 0 100% 100% 0;
}

@keyframes shooting {
  0% {
    opacity: 0;
    transform: translateX(0) translateY(0) rotate(calc(var(--angle) * 1deg));
  }
  5% {
    opacity: 1;
  }
  20% {
    opacity: 0;
    transform: translateX(calc(var(--distance) * 1px)) translateY(calc(var(--distance) * 0.25px)) rotate(calc(var(--angle) * 1deg));
  }
  100% {
    opacity: 0;
    transform: translateX(calc(var(--distance) * 1px)) translateY(calc(var(--distance) * 0.25px)) rotate(calc(var(--angle) * 1deg));
  }
}

/* Celestial background elements */
.celestial-bg {
  position: relative;
}

/* Language selection */
html[lang="en"] .es {
  display: none;
}

html[lang="es"] .en {
  display: none;
}

/* Admin dashboard specific */
.admin-nav {
  display: flex;
  margin-bottom: 30px;
  background-color: var(--bg-secondary);
  border-radius: 5px;
  overflow: hidden;
}

.admin-nav a {
  padding: 12px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.admin-nav a:hover, .admin-nav a.active {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Responsive styles */
@media (max-width: 768px) {
  /* Make header much smaller on mobile */
  header {
    padding: 0.5rem 0;
  }
  
  .navbar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .logo-img {
    height: 3rem;
    width: 3rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.875rem;
  }
  
  .btn-primary {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}