/* ============================================
   LYCEUM — DARK ACADEMIA PREMIUM THEME
   Fondo obsidiana, tipografía Serif y acentos Oro
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg: #0A0A0A;
  --bg2: #141414;
  --line: rgba(255, 255, 255, 0.12);
  --text: #FFFFFF;
  --text2: rgba(255, 255, 255, 0.65);
  --text3: rgba(255, 255, 255, 0.38);
  --gold: #C9A876;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --nav-h: 64px;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

/* ============================================
   NAVBAR COMPARTIDO (INTERNAS)
   ============================================ */
.navbar {
  height: var(--nav-h);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.logo-sub {
  font-size: .55rem;
  letter-spacing: 4px;
  color: var(--text3);
  display: block;
  margin-top: 2px;
  text-align: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: var(--text2);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 16px;
  transition: color .2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-cta {
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: var(--text) !important;
  padding: 9px 22px !important;
  transition: all .25s !important;
}

.nav-cta:hover {
  background: #fff !important;
  color: #0A0A0A !important;
  border-color: #fff !important;
}

/* ============================================
   SISTEMA DE AUTENTICACIÓN (LOGIN/REGISTRO)
   ============================================ */
.auth-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.auth-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text);
}

.auth-sub {
  font-size: .85rem;
  color: var(--text2);
  text-align: center;
  margin-bottom: 32px;
  font-weight: 300;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text2);
  display: flex;
  justify-content: space-between;
}

.auth-field input {
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  color: var(--text);
  font-family: var(--sans);
  outline: none;
  transition: border-color .3s;
}

.auth-field input::placeholder {
  color: var(--text3);
  font-weight: 300;
}

.auth-field input:focus {
  border-color: var(--gold);
}

.input-pass-wrap {
  position: relative;
}

.input-pass-wrap input {
  width: 100%;
  padding-right: 40px;
}

.pass-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
}

.auth-btn {
  background: #FFFFFF;
  color: #0A0A0A;
  border: none;
  padding: 14px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
  margin-top: 12px;
  font-family: var(--sans);
}

.auth-btn:hover {
  background: var(--gold);
  color: #FFFFFF;
}

.auth-switch {
  text-align: center;
  font-size: .8rem;
  color: var(--text2);
  margin-top: 24px;
}

.auth-switch a {
  color: var(--gold);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}

.auth-switch a:hover {
  border-color: var(--gold);
}

.auth-alert {
  padding: 12px 16px;
  font-size: .8rem;
  margin-bottom: 16px;
  display: none;
  border: 1px solid;
}

.auth-alert-ok {
  background: rgba(201, 168, 118, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

.auth-alert-error {
  background: rgba(255, 50, 50, 0.1);
  border-color: rgba(255, 50, 50, 0.3);
  color: #ff6b6b;
}

/* ============================================
   DASHBOARD / MIS CURSOS
   ============================================ */
.dash-header {
  padding: 100px 32px 20px;
  max-width: 1240px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.dash-header h1 {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
}

.dash-header p {
  font-size: 1rem;
  color: var(--text2);
  font-weight: 300;
}

.filter-bar {
  max-width: 1240px;
  margin: 24px auto 0;
  padding: 0 32px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text2);
  padding: 8px 20px;
  font-size: .75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  font-family: var(--sans);
}

.filter-btn:hover {
  border-color: var(--text3);
  color: var(--text);
}

.filter-btn.active {
  border-color: var(--gold);
  color: var(--gold);
}

.grid-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 1240px;
  margin: 32px auto 100px;
}

.private-card {
  background: var(--bg2);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: background .3s;
}

.private-card:hover {
  background: #1a1a1a;
}

.private-tag {
  font-size: .65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  display: block;
}

.private-card h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.private-card p {
  font-size: .85rem;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 32px;
  flex-grow: 1;
  font-weight: 300;
}

.private-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.progress-wrap {
  flex-grow: 1;
  margin-right: 24px;
}

.progress-txt {
  font-size: .7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
  display: block;
}

.progress-bg {
  background: var(--bg);
  height: 2px;
  width: 100%;
}

.progress-fill {
  background: var(--gold);
  height: 100%;
}

.private-btn {
  font-size: .72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text3);
  padding-bottom: 4px;
  transition: all .2s;
}

.private-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================
   AULA VIRTUAL (CLASE)
   ============================================ */
.aula-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.aula-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.sidebar {
  width: 300px;
  background: var(--bg2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-head {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.sidebar-head h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--gold);
}

.modules-list {
  list-style: none;
  overflow-y: auto;
}

.mod {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .2s;
  border-left: 2px solid transparent;
}

.mod:hover {
  background: rgba(255, 255, 255, 0.02);
}

.mod.active {
  background: rgba(201, 168, 118, 0.05);
  border-left-color: var(--gold);
}

.mod span {
  font-size: .65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  display: block;
  margin-bottom: 6px;
}

.mod.active span {
  color: var(--gold);
}

.mod p {
  font-size: .9rem;
  color: var(--text);
  font-weight: 500;
}

.aula-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.video-area {
  height: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.vid-title {
  position: absolute;
  top: 20px;
  left: 24px;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
}

.play-btn {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: all .2s;
}

.play-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 168, 118, 0.1);
}

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.chat-head {
  padding: 16px 24px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-head h3 {
  font-size: .8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text2);
}

.chat-box {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg {
  padding: 16px 20px;
  max-width: 80%;
  font-size: .9rem;
  line-height: 1.6;
  font-weight: 300;
}

.msg.bot {
  background: var(--bg2);
  border: 1px solid var(--line);
  align-self: flex-start;
  color: var(--text);
  border-radius: 0 12px 12px 12px;
}

.msg.user {
  background: rgba(201, 168, 118, 0.1);
  border: 1px solid rgba(201, 168, 118, 0.2);
  color: var(--text);
  align-self: flex-end;
  border-radius: 12px 0 12px 12px;
}

.chat-input-row {
  display: flex;
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg2);
  gap: 16px;
}

.chat-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  padding: 8px 0;
  font-family: var(--sans);
}

.chat-input-row input:focus {
  border-color: var(--gold);
}

.chat-input-row button {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0 24px;
  font-size: .75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
}

.chat-input-row button:hover {
  background: var(--gold);
  color: #0A0A0A;
}

/* ============================================
   BOTTOM NAV MÓVIL (TEMA OSCURO)
   ============================================ */
@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }

  .navbar .nav-links {
    display: none !important;
  }

  .auth-body {
    padding-bottom: 72px;
  }

  .auth-card {
    padding: 32px 24px;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  .dash-header {
    padding: 80px 20px 20px;
  }

  .grid-dashboard {
    grid-template-columns: 1fr;
    margin: 24px 0 100px;
    border-left: none;
    border-right: none;
  }

  .filter-bar {
    padding: 0 20px;
  }

  .aula-body {
    padding-bottom: 72px;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .aula-layout {
    flex-direction: column;
    overflow: visible;
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .modules-list {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .modules-list::-webkit-scrollbar {
    display: none;
  }

  .mod {
    min-width: 200px;
    border-bottom: none;
    border-right: 1px solid var(--line);
    border-left: none;
    border-top: 2px solid transparent;
  }

  .mod.active {
    border-left: none;
    border-top-color: var(--gold);
  }

  .video-area {
    height: 250px;
  }

  .chat-area {
    height: 500px;
  }
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(10, 10, 10, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 400;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px 8px;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }
}

.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  cursor: pointer;
  text-decoration: none;
  flex: 1;
  -webkit-tap-highlight-color: transparent;
}

.bn-item span {
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap;
}

.bn-item svg {
  width: 20px;
  height: 20px;
  color: var(--text3);
}

.bn-item.active span,
.bn-item.active svg {
  color: var(--gold);
}