/* PixLab v12 — Developer Build (expanded CSS) */
:root {
  --bg: #0b0e15;
  --panel: #12162a;
  --border: #2a2f47;
  --text: #e6eafa;
  --muted: #91a0b3;
  --accent: #7bdcb5;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial;
    user-select: none;
}

.right-sidebar {
      height: 100vh;
    overflow: auto;
}

#topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: #0f1322;
  position: sticky;
  top: 0;
  z-index: 3;
}

#topbar .row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

#topbar input,
#topbar select {
  background: #0b0e15;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
}

#topbar button {
  background: #1b2030;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  display: inline-block;
  margin: 0 6px;
}

#layout {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 8px;
  padding: 8px;
  height: calc(100vh - 54px);
}

#left,
#right {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  overflow: auto;
}

#center {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 8px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.tabs button {
  background: #1b2030;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.tabs button.active {
  background: #24304e;
}

.tab {
  display: none;
}
.tab.active {
  display: block;
}

.asset-list {
  display: grid;
  gap: 6px;
}

aside {
  margin-bottom: 20px;
}

.asset {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #151a2e;
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 8px;
}

.asset .thumb {
  width: 48px;
  height: 36px;
  background: #0b0e15;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.asset .meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.asset .badge {
  font-size: 10px;
  color: #111;
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: auto;
}

.asset .actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.media-actions input {
  width: 100%;
}

.ai-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #111423;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 8px;
}

.ai-box textarea {
  min-height: 72px;
  resize: vertical;
  background: #0b0e15;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

#viewerWrap {
  background: #0f1322;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#viewer {
  max-width: 100%;
  max-height: 60vh;
  background: #000;
  border-radius: 8px;
}

#timeline {
  background: #0f1322;
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: auto;
}

#ruler {
  height: 24px;
  width: fit-content;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  display: flex;
  align-items: center;
  color: var(--muted);
  padding-left: 8px;
  position: sticky;
  top: 0;
  background: #141a2e;
  z-index: 1;
}

#tracks {
  position: relative;
  /* overflow: auto; */
}

.track {
  height: 56px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.track .label {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 120px;
  background: #141a2e;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.stripline {
  position: absolute;
  left: 120px;
  right: 0;
  top: 0;
  bottom: 0;
}

.transition-lane {
  position: relative;
  height: 20px;
  margin: 0 0 6px 120px;
  background: #101426;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.transition {
  position: absolute;
  top: 2px;
  height: 16px;
  background: #3a4a7a;
  border: 1px solid #6b83c3;
  border-radius: 4px;
  cursor: ew-resize;
}

.clip {
  position: absolute;
  height: 40px;
  top: 8px;
  background: #2b3b6a;
  border: 1px solid #5b73b3;
  border-radius: 8px;
  color: #fff;
  padding: 2px 6px;
  cursor: pointer;
  overflow: hidden;
}

.clip.audio {
  background: #2b6a3b;
  border-color: #6ab35b;
}

.clip.overlay {
  background: #6a2b52;
  border-color: #b35b96;
}

.clip .handle {
  position: absolute;
  top: 0;
  width: 6px;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  cursor: ew-resize;
}

.clip .handle.left {
  left: 0;
  border-radius: 8px 0 0 8px;
}
.clip .handle.right {
  right: 0;
  border-radius: 0 8px 8px 0;
}

/* Timeline clip frames container */
.frames {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none; /* so dragging/trimming still works */
  user-select: none;
}

.frame {
  flex-shrink: 0;
  height: 100%;
  overflow: hidden;
}

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



/* .clip .frames {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.clip .frame {
  flex: 1 0 auto;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.clip .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
} */



.frames .text-clip {
  width: auto;
  border-radius: 6px;
  font-size: 14px;
  display: flex;
  align-items: center;
  margin-left: 6px;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffcc00;
  pointer-events: none;
}

.selection {
  outline: 2px solid var(--accent);
}

.kf-diamond {
  position: absolute;
  top: 2px;
  width: 8px;
  height: 8px;
  background: #ffd54a;
  transform: rotate(45deg);
  border: 1px solid #8a6f1a;
}

.kf-lane {
  position: absolute;
  left: 120px;
  right: 0;
  height: 12px;
  top: 0;
}

.pill {
  padding: 2px 6px;
  border-radius: 999px;
  background: #1b2030;
  border: 1px solid var(--border);
  font-size: 12px;
}

.pill.video {
  border-color: #5b73b3;
}
.pill.audio {
  border-color: #6ab35b;
}
.pill.overlay {
  border-color: #b35b96;
}

#right input,
#right select {
  width: 100%;
  background: #0b0e15;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
}

#right input[type="range"] {
  width: 100%;
}

#right hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.pm-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.pm-list {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 8px;
  min-height: 64px;
  display: grid;
  gap: 6px;
}

.pm-list .item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1b2030;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  width: min(860px, 90vw);
  display: grid;
  gap: 8px;
}

.modal-card .grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-card textarea {
  min-height: 160px;
  background: #0b0e15;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

.photos-list {
  margin-top: 15px;
  overflow: auto;
  max-height: calc(100vh - 300px);
  padding-right: 10px;
}

.photos-list .media img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}
.media {
  flex: auto;
}
.media .media-con {
  position: relative;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.media .media-con .layer {
  border-radius: 5px !important;
}

.layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0000009c;
  display: flex;
  border-radius: 8px;
  justify-content: end;
  align-items: baseline;
  flex-direction: column;
  opacity: 0;
}

.media-con:hover .setting-icon {
  opacity: 1;
}
.media-con:hover .layer {
  opacity: 1;
}

.media-con .setting-icon {
  position: absolute;
  top: 2px;
  right: 4px;
  z-index: 9;
  opacity: 0;
}

.setting-icon svg {
  width: 15px;
  height: 15px;
}

.media-con .setting-icon .dropdown-menu {
  min-width: 150px !important;
  box-shadow: #32325b33 0 7px 29px 0;
}

.layer .plus-icon {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

.layer svg {
  width: 15px;
  height: 15px;
}

.items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.items .item {
  background: white;
  border-radius: 3px;
  flex: 0 0 22%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.items .item img.icon {
  width: 35px;
  height: 35px;
  user-select: none;
}

/* Projects section css */

.pm-project-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1b2030;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.pm-project-item:hover,
.pm-project-item.active {
  background: #252a3a;
  border-color: var(--accent);
}

.pm-project-item.current-project {
  background: #1e3a5f;
  border-color: #4a90e2;
  box-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

.pm-project-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.pm-project-name {
  font-weight: 600;
  color: var(--text);
  width: 100px;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-project-date {
  color: var(--muted);
  font-size: 12px;
}

.project-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pm-load-btn {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pm-load-btn:hover {
  background: #6bc9a0;
  transform: translateY(-1px);
}

.pm-delete-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pm-delete-btn:hover {
  background: #c0392b;
  transform: translateY(-1px);
}

.pm-list.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-style: italic;
  min-height: 80px;
}

.files-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
  gap: 15px;
  padding: 10px;
}

.file-item {
  position: relative;
  background: #393f5d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.file-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* Thumbnail (image/video) */
.file-item img,
.file-item video {
  width: 100%;
  max-height: 100px;
  border-radius: 8px;
  display: block;
  margin-bottom: 8px;
  object-fit: cover;
}
.file-item .audio-thumb {
  font-size: 40px;
}
.speed-slider-sec {
  display: flex;
  align-items: center;
  gap: 5px;
}

.speed-slider-sec #propVideoSpeedValue {
      width: 40px;
    text-align: center;
}

/* File name label */
.asset-label {
  display: block;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-top: 4px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Delete button (hidden by default) */
.delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgb(18 22 42);
  border: none;
  color: white;
  font-size: 14px;
  padding: 4px 7px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Show button on hover */
.file-item:hover .delete-btn {
  opacity: 1;
}


/* Page Loader */

.loading-screen {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  z-index: 99;
  background: #12162adb;
  display: none;
  justify-content: center;
  align-items: center;
}
.loading-screen.video-loader {
  background: #12162a !important;
  flex-direction: column;
}
.loading-screen .message {
  display: none;
}
.loading-screen.video-loader .message {
  font-size: 20px;
  display: block;
}

.loader {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: transparent;
  border-radius: 50%;
}

.loader {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: transparent;
  width: 36px;
  height: 36px;
}

.loader {
  border: 4px solid rgb(255 255 255 / 10%);
  border-left-color: #ffffff;
  width: 50px;
  height: 50px;
  animation: spin89345 1s linear infinite;
}

@keyframes spin89345 {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}


.select-dropdown {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.select-dropdown__button {
  padding: 10px 35px 10px 15px;
  background-color: #fff;
  color: #616161;
  border: 1px solid #cecece;
  border-radius: 3px;
  cursor: pointer;
  max-width: 210px;
  text-align: left;
}
.select-dropdown__button::focus {
  outline: none;
}
.select-dropdown__button .zmdi-chevron-down {
  position: absolute;
  right: 10px;
  top: 12px;
}
.select-dropdown__list {
  position: absolute;
  display: block;
  left: 0;
  right: 0;
  max-height: 300px;
  width: 110px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style-type: none;
  opacity: 0;
  pointer-events: none;
  transform-origin: top left;
  transform: scale(1, 0);
  transition: all ease-in-out 0.3s;
  z-index: 2;
}
.select-dropdown__list.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1, 1);
}
.select-dropdown__list-item {
  display: block;
  list-style-type: none;
  padding: 10px 15px;
  background: #fff;
  border-top: 1px solid #e6e6e6;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  color: #616161;
  transition: all ease-in-out 0.3s;
}

/* Animations Section */
.animation-panel {
      background: #1e1e1e;
      border-radius: 8px;
      padding: 16px;
      color: #fff;
      max-width: 320px;
    }

    .animation-header {
      display: flex;
      gap: 8px;
      margin-bottom: 16px;
      border-bottom: 1px solid #333;
    }

    .anim-tab {
      padding: 8px 16px;
      background: transparent;
      border: none;
      color: #888;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      border-bottom: 2px solid transparent;
      transition: all 0.2s;
    }

    .anim-tab.active {
      color: #fff;
      border-bottom-color: #3b82f6;
    }

    .anim-tab:hover {
      color: #fff;
    }

    .anim-content {
      display: none;
    }

    .anim-content.active {
      display: block;
    }

    .anim-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
      max-height: 400px;
      overflow-y: auto;
    }

    .anim-item {
      background: #2a2a2a;
      border: 2px solid transparent;
      border-radius: 6px;
      padding: 12px;
      cursor: pointer;
      transition: all 0.2s;
      text-align: center;
    }

    .anim-item:hover {
      background: #333;
      border-color: #3b82f6;
    }

    .anim-item.selected {
      border-color: #3b82f6;
      background: #1e3a5f;
    }

    .anim-icon {
      font-size: 24px;
      margin-bottom: 4px;
    }

    .anim-name {
      font-size: 12px;
      color: #ccc;
    }

    .anim-settings {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid #333;
    }

    .anim-setting-row {
      margin-bottom: 12px;
    }

    .anim-label {
      font-size: 12px;
      color: #aaa;
      margin-bottom: 4px;
      display: block;
    }

    .anim-slider {
      width: 100%;
      height: 4px;
      border-radius: 2px;
      background: #333;
      outline: none;
      -webkit-appearance: none;
    }

    .anim-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #3b82f6;
      cursor: pointer;
    }

    .anim-slider::-moz-range-thumb {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #3b82f6;
      cursor: pointer;
      border: none;
    }

    .anim-value {
      display: inline-block;
      float: right;
      font-size: 12px;
      color: #3b82f6;
    }

    .anim-remove-btn {
      width: 100%;
      padding: 8px;
      background: #dc2626;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 13px;
      margin-top: 8px;
    }

    .anim-remove-btn:hover {
      background: #b91c1c;
    }