/* ═══════════════════════════════════════════
   MERIDIAN — nav.css + player.css
═══════════════════════════════════════════ */

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: var(--nav-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 52px;
  background: rgba(245,242,236,.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--div);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
}

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 500; }

.nav-pill {
  background: var(--ink) !important; color: var(--paper) !important;
  padding: 9px 22px; border-radius: var(--radius);
  font-weight: 500 !important; letter-spacing: .05em !important;
}

.nav-streak {
  display: flex; align-items: center; gap: 7px; font-size: 13px;
  color: var(--warm); font-weight: 500; cursor: pointer;
  padding: 6px 14px; border: 1px solid rgba(200,169,110,.3);
  border-radius: var(--radius); transition: background .2s;
}
.nav-streak:hover { background: var(--warm-dim); }

.nav-user {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 5px 10px;
  border-radius: 20px; transition: background .2s; position: relative;
}
.nav-user:hover { background: var(--warm-dim); }

.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--warm-l); object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-size: 14px; color: var(--warm);
  flex-shrink: 0; overflow: hidden;
}
.nav-user-name { font-size: 13px; font-weight: 500; }

.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: white; border: 1px solid var(--div);
  border-radius: 6px; padding: 8px 0; min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: all .2s; z-index: 400;
}
.nav-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.nav-dropdown a, .nav-dropdown button {
  display: block; width: 100%; text-align: left;
  padding: 9px 16px; font-size: 13px; color: var(--ink);
  text-decoration: none; background: none; border: none;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: background .15s;
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--surf); }
.nav-dropdown .sep { height: 1px; background: var(--div); margin: 6px 0; }

@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-pill):not(.nav-streak) { display: none; }
  .nav-user-name { display: none; }
}


/* ═══════════════════════════════════════════
   GLOBAL AUDIO PLAYER
═══════════════════════════════════════════ */

#global-player {
  position: fixed; top: 72px; right: 20px; z-index: 400;
  width: 300px; background: var(--deep); border-radius: 12px;
  padding: 16px 18px; box-shadow: 0 8px 32px rgba(0,0,0,.35);
  display: none; animation: slideDown .25s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#global-player .gp-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; cursor: pointer;
  color: rgba(245,242,236,.4); font-size: 18px; line-height: 1; padding: 4px;
}
#global-player .gp-close:hover { color: var(--paper); }

#global-player .gp-label {
  font-size: 10px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(200,169,110,.65); margin-bottom: 8px;
}

#global-player .gp-title {
  font-family: 'Cormorant Garamond', serif; font-size: 17px;
  font-weight: 300; color: var(--paper); margin-bottom: 4px; line-height: 1.3;
}

#global-player .gp-meta { font-size: 11px; color: rgba(245,242,236,.4); margin-bottom: 14px; }

#global-player .gp-progress {
  height: 3px; background: rgba(255,255,255,.12); border-radius: 2px;
  margin-bottom: 12px; cursor: pointer; position: relative; overflow: hidden;
}

#global-player .gp-bar {
  height: 100%; background: var(--warm); border-radius: 2px;
  width: 0%; transition: width .5s linear;
}

#global-player .gp-controls { display: flex; align-items: center; gap: 14px; }

#global-player .gp-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(245,242,236,.7); display: flex; align-items: center;
  padding: 4px; transition: color .2s;
}
#global-player .gp-btn:hover { color: var(--paper); }

#global-player .gp-play-main {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--warm); display: flex; align-items: center;
  justify-content: center; cursor: pointer; border: none;
  transition: background .2s; margin-right: 2px; flex-shrink: 0;
}
#global-player .gp-play-main:hover { background: #b8954e; }

#global-player .gp-time { font-size: 11px; color: rgba(245,242,236,.4); margin-left: auto; }

#global-player .gp-wave {
  display: flex; align-items: center; gap: 2px; margin-left: auto; height: 16px;
}
#global-player .gp-wave span {
  display: block; width: 3px; border-radius: 2px;
  background: var(--warm); animation: wave .8s ease-in-out infinite;
  height: 8px;
}
#global-player .gp-wave span:nth-child(2) { animation-delay: .15s; height: 10px; }
#global-player .gp-wave span:nth-child(3) { animation-delay: .3s;  height: 14px; }
#global-player .gp-wave span:nth-child(4) { animation-delay: .1s;  height: 7px; }
#global-player .gp-wave span:nth-child(5) { animation-delay: .25s; height: 12px; }

@keyframes wave {
  0%, 100% { transform: scaleY(.5); }
  50%       { transform: scaleY(1); }
}
