/* modern color palette and glassmorphism styling */
:root {
  --bg-color: #0f172a;
  --surface-color: rgba(30, 41, 59, 0.7);
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at top right, rgba(59,130,246,0.15), transparent 40%),
                    radial-gradient(circle at bottom left, rgba(139,92,246,0.15), transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* Glassmorphism Classes */
.glass {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-color);
}
.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  margin: 0 10px;
  font-weight: 500;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: var(--primary-color);
}

/* Base Layout */
main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 80px; /* Space for mobile bottom nav */
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  nav {
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .nav-links {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 10px 5px;
    border-top: 1px solid var(--border-color);
    margin: 0;
  }

  .nav-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    margin: 0;
    gap: 2px;
    color: #cbd5e1;
  }

  /* We will need to add icons or emojis to index.html for this to look better */

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

  #btn-logout {
    display: none; /* Hide logout in mobile bottom nav, better in profile */
  }

  main {
    padding: 1rem;
    padding-bottom: 90px;
  }

  .glass {
    padding: 1rem !important;
  }

  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

@media (max-width: 400px) {
  .nav-links a span {
    font-size: 1.2rem;
  }
}

/* Auth Container */
.auth-container {
  max-width: 400px;
  margin: 2rem auto;
  padding: 1.5rem;
  text-align: center;
}
@media (max-width: 480px) {
    }
}

/* Split Login Layout */
.login-split {
  display: flex;
  max-width: 850px !important;
  width: 95%;
  flex-direction: row;
  overflow: hidden;
  padding: 0 !important;
}

.login-side-image {
  flex: 1.2;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  border-right: 1px solid var(--border-color);
}

.login-side-form {
  flex: 1;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

@media (max-width: 768px) {
  .login-split {
    flex-direction: column;
    max-width: 400px !important;
  }
  .login-side-image {
    min-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .login-side-form {
    padding: 2rem 1.5rem;
  }
}

.form-input {

  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0,0,0,0.2);
  color: white;
  transition: border-color 0.3s;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.auth-container input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0,0,0,0.2);
  color: white;
}
.auth-container input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Buttons */
.btn-primary {
  width: 100%;
  background: var(--primary-color);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}
.btn-google {
  background: white;
  color: #333;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

/* Skeleton Screens (Punto 3) */
.skeleton {
  background: linear-gradient(90deg, var(--surface-color) 25%, #2e3a50 50%, var(--surface-color) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 8px;
}

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

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
  width: 80%;
}

.skeleton-card {
  height: 250px;
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.skeleton-profile {
  height: 100px;
  width: 100px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}
