/* ========= Log!t Design System - Main Base Styles ========= */

:root {
  --grid: 3;
  --bg: #000000;
  --surface: #000000;
  --surface2: #111111;
  --text: #ffffff;
  --muted: #a1a1a6;
  --accent: #ffffff;
  --green: #30d158;
  --red: #ff453a;
  --pink: #ff375f;
  --border: rgba(255, 255, 255, 0.08);
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
  width: 100%;
  max-width: 100vw;
  background: var(--bg);
  color: var(--text);
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

@media (max-width: 768px) {
  input[type='text'],
  input[type='number'],
  input[type='password'],
  input[type='email'],
  input[type='search'],
  textarea,
  select {
    font-size: 16px !important;
  }
}

body::-webkit-scrollbar {
  display: none;
}

body.no-scroll {
  overflow: hidden;
}

/* ========= HEADER ========= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.05);
}

.headerRow {
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.pcHeaderNav {
  display: none;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.headerTitle {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
  color: #fff;
}

/* ========= BOTTOM NAV ========= */
.bottomNav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-top: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottomNav.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.navItem {
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px 0;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.navItem .navIcon {
  width: 24px;
  height: 24px;
  transition: transform 0.15s ease;
}

.navItem:active .navIcon {
  transform: scale(0.85);
}

.navItem .navLabel {
  display: none;
}

.navItem.on {
  color: #fff;
}

/* ========= LIST BADGE ========= */
.listBadge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.navItem {
  position: relative;
}

/* ========= ADD BUTTON (FAB) ========= */
.navAdd {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.15);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  justify-self: center;
}

.navAdd svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.navAdd:active {
  transform: scale(0.85);
  box-shadow: 0 1px 4px rgba(255, 255, 255, 0.1);
}

/* ========= LIST SECTION ========= */
.listSection {
  padding: 8px 14px 80px;
  min-height: 100vh;
}

.listHeader {
  margin-bottom: 12px;
}

.listHeader h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.driveConnect {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.driveConnect .actionBtn {
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  flex-shrink: 0;
  font-size: 13px;
}

.listEmpty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  gap: 12px;
}

.listEmpty svg {
  opacity: 0.2;
  width: 36px;
  height: 36px;
}

.listEmpty p {
  font-size: 13px;
  max-width: 220px;
  line-height: 1.5;
}

.listItems {
  display: grid;
  grid-template-columns: repeat(var(--grid, 3), 1fr);
  gap: 10px;
}

.listItem {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 2/3;
  cursor: pointer;
}

.listItemPoster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  border: 0.5px solid rgba(255, 255, 255, 0.05);
}

.listItemOverlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 8px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  border-radius: 0 0 8px 8px;
}

.listItemTitle {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.listItemMeta {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1px;
}

/* ========= LIST MOVIE MODAL ========= */
.listModal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.listModalContent {
  background: #121212;
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  position: relative;
  border: 0.5px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.listModalClose {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s;
}

.listModalClose:hover {
  background: rgba(255, 255, 255, 0.15);
}

.listModalPoster {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #111;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.05);
}

.listModalPoster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listModalInfo {
  padding: 14px 16px 8px;
}

.listModalInfo h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.listModalMeta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.listModalDesc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.listModalRating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.listModalRating span:last-child {
  color: #fff;
  font-weight: 600;
}

.listModalSearch {
  padding: 0 16px 10px;
}

.listModalSearch input {
  width: 100%;
  height: 36px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: #1e1e1e;
  color: #fff;
  padding: 0 10px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.listModalSearch input::placeholder {
  color: #666;
}

.listModalResults {
  max-height: 120px;
  overflow-y: auto;
  margin-top: 6px;
}

.listModalResultItem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.listModalResultItem:hover {
  background: rgba(255, 255, 255, 0.05);
}

.listModalResultItem img {
  width: 28px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  background: #111;
}

.listModalResultItem span {
  font-size: 12px;
  color: #ddd;
}

.listModalResultItem small {
  font-size: 10px;
  color: #888;
}

.listModalActions {
  display: flex;
  gap: 8px;
  padding: 10px 16px 16px;
}

.listModalAccept,
.listModalReject {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s;
}

.listModalAccept {
  background: var(--green);
  color: #000;
}

.listModalReject {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.listModalAccept:active,
.listModalReject:active {
  transform: scale(0.96);
}

.listMessage {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 40px 20px;
}

.listStatus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 12px;
}

.listStatusText {
  font-size: 13px;
  color: var(--muted);
}

.listClearAll {
  font-size: 12px;
  color: var(--red);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ========= LIST MODAL EDIT ROW ========= */
.listModalEditRow {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.listModalInputGroup {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.listModalInputGroup label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.listModalSelect,
.listModalDate {
  height: 36px;
  background: #222;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  color: #fff;
  padding: 0 8px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  width: 100%;
}

.listModalSelect:focus,
.listModalDate:focus {
  border-color: rgba(255, 255, 255, 0.25);
}

/* ========= FOOTER ========= */
.footer {
  text-align: center;
  padding: 20px 10px;
}

.footer p {
  font-size: 10px;
  color: var(--dim, #48484a);
  margin-bottom: 6px;
}

.footer a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.creatorTag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  border: 0.5px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 8px;
}

.posterBg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: blur(60px) saturate(1.2);
  transform: scale(1.2) translateZ(0);
  transition: opacity 0.4s ease;
  pointer-events: none;
  will-change: opacity;
}
.posterBg.active {
  opacity: 0.2;
}
.posterBgName {
  position: fixed;
  bottom: 70px;
  left: 14px;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.posterBgName.active {
  opacity: 1;
}
.posterBgTitle {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}
.posterBgMeta {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
  .posterBg {
    filter: blur(20px) saturate(1.1);
  }
}

/* ========= LIST SIDE PANEL ========= */
.listContentWrap {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  align-items: flex-start;
  width: 100%;
}

.listItems {
  flex: 1;
}

.listSidePanel {
  width: 320px;
  background: rgba(255, 255, 255, 0.03);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.sidePanelHeader {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.sidePanelList {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.sidePanelList::-webkit-scrollbar {
  display: none !important;
}

.sidePanelItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 0.5px solid rgba(255, 255, 255, 0.04);
  font-family: monospace;
  font-size: 11px;
  color: #ddd;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  gap: 8px;
}

.sidePanelItem:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidePanelItem.no-match {
  border-left: 3px solid #ff453a;
}

.sidePanelItem.matched {
  border-left: 3px solid #30d158;
}

.sidePanelStatus {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.sidePanelStatus.no-match {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}

.sidePanelStatus.matched {
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
}

@media (max-width: 1023px) {
  .listContentWrap {
    flex-direction: column;
  }
  .listSidePanel {
    width: 100%;
    position: relative;
    top: 0;
    max-height: 400px;
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
