﻿/* ──── Watch Party UI ────────────────────────────────────────── */

#party-sidebar {
  position: fixed;
  top: 0;
  right: -350px;
  width: 320px;
  height: 100vh;
  background: rgba(12, 14, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  font-family: var(--font-body, 'Inter', sans-serif);
  color: #e2e8f0;
}

#party-sidebar.open {
  right: 0;
}

/* Adjust page layout when sidebar is open */
body.party-active {
  padding-right: 320px !important;
}
@media (max-width: 768px) {
  body.party-active {
    padding-right: 0 !important;
  }
  #party-sidebar {
    width: 100%;
    right: -100%;
  }
}

.party-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.party-header-info h3 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  display: flex;
  align-items: center;
  gap: 8px;
}
.party-header-info .active-users {
  font-size: 0.75rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 99px;
}
.party-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.3s;
}
.party-close-btn:hover { color: #fff; }

.party-invite-bar {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 8px;
}
.party-invite-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 8px;
  border-radius: 6px;
}
.party-invite-bar button {
  background: #ff1e56;
  border: none;
  color: #fff;
  border-radius: 6px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.3s;
}
.party-invite-bar button:hover { background: #e01145; }

.party-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.party-messages::-webkit-scrollbar { width: 6px; }
.party-messages::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; }

.party-msg {
  font-size: 0.85rem;
  line-height: 1.4;
  word-wrap: break-word;
}
.party-msg.system {
  color: #ff1e56;
  text-align: center;
  font-size: 0.75rem;
  font-style: italic;
  margin: 4px 0;
}
.party-msg .sender {
  font-weight: 700;
  color: #38bdf8;
  margin-right: 6px;
}

.party-input-area {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.party-chat-input {
  display: flex;
  gap: 8px;
}
.party-chat-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  outline: none;
  font-size: 0.85rem;
}
.party-chat-input input:focus {
  border-color: #ff1e56;
}
.party-chat-input button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.party-chat-input button:hover {
  background: #ff1e56;
}

.party-sync-btn {
  background: linear-gradient(135deg, #ff1e56, #ff4b2b);
  border: none;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.party-sync-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 30, 86, 0.4);
}

/* ──── Syncplay Room Playback Controller ──────────────────────────── */
.party-sync-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.party-sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  background: #64748b;
  box-shadow: 0 0 8px rgba(100, 116, 139, 0.6);
  transition: all 0.3s ease;
}
.status-dot.playing {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}
.status-dot.paused {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.party-sync-btn-compact {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-family: inherit;
}
.party-sync-btn-compact:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.party-sync-btn-compact .material-symbols-outlined {
  font-size: 15px;
}

/* ──── Autoplay Resume Barrier (Click-to-Unpause Overlay) ────────── */
#party-unpause-overlay {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  background: rgba(14, 7, 11, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #ffac41;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(255, 30, 86, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  animation: fadeInDown 0.3s ease;
  pointer-events: auto;
}
#party-unpause-overlay:hover {
  background: #ff1e56;
  color: #fff;
}
#party-unpause-overlay span {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
}
#party-unpause-overlay .material-symbols-outlined {
  font-size: 1.1rem;
  color: #ffac41;
}

/* Toggle button */
.party-toggle-btn {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}
.party-toggle-btn:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #fff;
  transform: translateY(-2px);
}


