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

:root {
  --app-black: #000;
  --app-blue: #25f4ee;
  --app-gray: #eee;
  --app-green: #0f0;
  --app-red: #800080;
  --app-shadow: rgb(0 0 0 / 30%);
  --app-text: rgb(255 255 255 / 90%);
  --app-white: #fff;
  --nav-height: 60px;
  /* Winamp-specific variables */
  --winamp-bg: #000;
  --winamp-accent: #00ff00;
  --winamp-text: #fff;
  --winamp-shadow: rgba(0, 0, 0, 0.5);
}

body {
  background: #333;
  color: var(--app-text);
  height: 100vh;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  padding-top: env(safe-area-inset-top);
  transition: padding 0.3s ease;
}

.video-feed {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  height: 100vh;
  overflow-y: scroll;
  padding: 0;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom;
  overscroll-behavior-y: contain;
  -webkit-overscroll-behavior-y: contain;
}

.video-feed::-webkit-scrollbar {
  display: none;
}

.audio-container {
  align-items: center;
  display: flex;
  height: 50px;
  place-content: center flex-start;
  scroll-snap-align: start;
  margin: 0;
  overflow: hidden;
  padding: 0 16px;
  padding-bottom: env(safe-area-inset-bottom);
  position: relative;
}

.audio-container:nth-child(odd) {
  background: rgb(0 0 0 / 50%);
}

.audio-container:nth-child(even) {
  background: rgb(255 255 255 / 10%);
}

.music-feed {
  background: rgb(0 0 0 / 50%);
  display: grid;
  scroll-snap-type: none;
  height: 100%;
  overflow-x: hidden;
  padding-bottom: 0;
  padding-top: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom;
  overscroll-behavior-y: contain;
  -webkit-overscroll-behavior-y: contain;
}

.music-feed::-webkit-scrollbar {
  display: none;
}

.video-container {
  height: 100dvh;
  margin: 0;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom);
  position: relative;
  scroll-snap-align: start;
  overflow: hidden;
}

.video-element {
  height: 100dvh;
  left: 50%;
  max-width: 75vh;
  object-fit: cover;
  object-position: center center;
  position: absolute;
  top: 0;
  touch-action: manipulation;
  transform: translateX(-50%);
  width: min(100%, calc(75vh));
}

.video-overlays {
  height: 100%;
  left: 50%;
  max-width: 75vh;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: min(100%, calc(75vh));
}

.video-user-info {
  bottom: 80px;
  color: var(--app-text);
  left: 16px;
  position: absolute;
  text-shadow: 0 1px 3px var(--app-shadow);
}

.video-user-info .username {
  font-size: 18px;
  font-weight: bold;
  pointer-events: auto;
  cursor: pointer;
}

.video-user-info .username a {
  color: white;
  text-decoration: none;
}

.video-user-info .username.followed {
  color: green;
}

.video-user-info .caption {
  font-size: 14px;
  margin-top: 4px;
  max-width: 70%;
}

.music-user-info {
  bottom: auto;
  color: var(--app-text);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  font-size: 12px;
  gap: 2px;
  left: auto;
  line-height: 1.2;
  margin: 0;
  max-width: calc(100% - 120px);
  overflow: hidden;
  position: static;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px var(--app-shadow);
  white-space: nowrap;
}

.music-user-info .prompt-label {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-user-info .prompt-label a {
  color: white;
  text-decoration: none;
}

.music-user-info .tags-label {
  font-size: 12px;
  min-height: 20px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-actions {
  align-items: center;
  bottom: 100px;
  color: var(--app-text);
  display: flex;
  flex-direction: column;
  gap: 24px;
  pointer-events: auto;
  position: absolute;
  right: 16px;
}

.page-selector {
  position: absolute;
  top: 0;
  right: 0;
}

.page-selector select {
  background: var(--app-white);
  border: none;
  border-radius: 8px;
  color: var(--app-black);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  min-width: 150px;
}

.music-actions {
  align-items: center;
  color: var(--app-text);
  display: flex;
  flex: 0 0 100px;
  flex-direction: row;
  flex-shrink: 0;
  gap: 16px;
  justify-content: flex-end;
  margin-bottom: 0;
  pointer-events: auto;
  position: static;
  right: auto;
}

.video-action {
  cursor: pointer;
  text-align: center;
}

.video-action i {
  font-size: 32px;
  text-shadow: 0 1px 3px var(--app-shadow);
}

.video-action span {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.video-action.liked i {
  animation: pulse 0.3s;
  color: var(--app-red);
}

.video-action i.liked {
  animation: pulse 0.3s;
  color: var(--app-red);
}

.music-actions i.playing {
  color: var(--app-green);
}

.fallback-player {
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  margin: 10px;
  border-radius: 8px;
  color: var(--app-text);
}

.fallback-music-item {
  margin-bottom: 15px;
}

.fallback-music-item h4 {
  margin-bottom: 5px;
  font-size: 16px;
}

.fallback-music-item audio {
  width: 100%;
  max-width: 400px;
}

.bottom-nav {
  align-items: center;
  background: var(--app-white);
  bottom: 0;
  box-shadow: 0 -2px 10px rgb(0 0 0 / 10%);
  display: flex;
  height: var(--nav-height);
  justify-content: space-around;
  left: 0;
  padding-bottom: env(safe-area-inset-bottom);
  position: fixed;
  width: 100%;
  z-index: 10001;
  will-change: transform, opacity;
}

.nav-item {
  align-items: center;
  color: var(--app-black);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  text-decoration: none;
}

.nav-item i {
  font-size: 24px;
  margin-bottom: 4px;
  color: var(--app-red);
  flex-shrink: 0;
}

.nav-item.active {
  color: var(--app-red);
}

.nav-icon-img {
  height: 24px;
  margin-bottom: 4px;
  width: 24px;
  display: inline-block;
  flex-shrink: 0;
}

.nav-item span {
  font-weight: bold;
}


.video-action i.fa-align-right {
  transform: rotate(90deg);
}
.profile,
.login {
  margin: 80px auto 60px;
  max-width: 400px;
  padding: 20px;
}

.profile-feed,
.history-feed {
  height: calc(100vh - 140px);
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.profile-feed::-webkit-scrollbar,
.history-feed::-webkit-scrollbar {
  display: none;
}

.profile-container {
  background: #333;
  color: var(--app-text);
  height: calc(100vh - var(--nav-height));
  margin: 0;
  padding: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.profile-header {
  margin-bottom: 24px;
  text-align: center;
}

.profile-username {
  color: var(--app-white);
  font-size: 22px;
  font-weight: bold;
}

.profile-bio {
  color: var(--app-gray);
  font-size: 14px;
  margin: 8px 0;
}

.profile-bio-edit {
  background: var(--app-white);
  border-radius: 8px;
  color: var(--app-black);
  font-size: 16px;
  height: 80px;
  padding: 8px;
  width: 100%;
}

.profile-stats {
  color: var(--app-white);
  display: flex;
  font-size: 14px;
  justify-content: space-around;
  margin: 16px 0;
}

.profile-stats div strong {
  display: block;
  font-size: 18px;
}

.profile-button,
.logout-button {
  background: var(--app-red);
  border: none;
  border-radius: 50px;
  color: var(--app-white);
  cursor: pointer;
  font-size: 16px;
  margin: 8px;
  padding: 8px 16px;
  transition: background 0.1s, transform 0.1s;
}

.profile-button:active,
.logout-button:active,
.auth-button:active,
.modal-button:active,
.generate-upload-button:active,
.generate-button:active,
.clear-image-button:active,
.edit-image-button:active,
.settings-button:active {
  transform: scale(0.95);
}

.profile-button:hover,
.logout-button:hover,
.auth-button:hover,
.modal-button:hover {
  background: #600060;
}

.profile-button.edit-button {
  background: var(--app-red);
}

.profile-following {
  margin-bottom: 24px;
}

.profile-following h3 {
  color: var(--app-white);
  font-size: 18px;
  margin-bottom: 8px;
}

.following-item {
  background: rgb(255 255 255 / 10%);
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 8px;
}

.profile-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.profile-tab {
  background: rgb(255 255 255 / 10%);
  border: none;
  border-radius: 8px;
  color: var(--app-gray);
  cursor: pointer;
  font-size: 14px;
  padding: 8px 16px;
  white-space: nowrap;
}

.profile-tab.active {
  background: var(--app-red);
  color: var(--app-white);
}

.profile-tab:hover {
  background: rgb(255 255 255 / 20%);
}

.profile-tab.active:hover {
  background: var(--app-red);
}

.profile-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.profile-subtab {
  background: rgb(255 255 255 / 5%);
  border: none;
  border-radius: 6px;
  color: var(--app-gray);
  cursor: pointer;
  font-size: 12px;
  padding: 6px 12px;
  white-space: nowrap;
}

.profile-subtab.active {
  background: rgb(255 255 255 / 20%);
  color: var(--app-white);
}

.profile-subtab:hover {
  background: rgb(255 255 255 / 15%);
}

.profile-tab-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.profile-tab-content::-webkit-scrollbar {
  width: 6px;
}

.profile-tab-content::-webkit-scrollbar-track {
  background: transparent;
}

.profile-tab-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.profile-tab-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.profile-tab-content::-webkit-scrollbar-button {
  display: none;
}

.profile-settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
}

.settings-row {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.settings-row .profile-button {
  margin: 0;
}

.auth-container {
  align-items: center;
  background: #333;
  color: var(--app-text);
  display: flex;
  height: calc(100vh - var(--nav-height));
  justify-content: center;
  transition: height 0.3s ease, padding 0.3s ease;
}

.auth-form {
  background: rgb(255 255 255 / 10%);
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--app-shadow);
  max-width: 400px;
  padding: 32px;
  width: 90%;
}

.auth-title {
  color: var(--app-white);
  font-size: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.input-group {
  margin-bottom: 16px;
  position: relative;
}

.input-icon {
  color: var(--app-gray);
  left: 12px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.auth-input {
  background: var(--app-white);
  border: 1px solid var(--app-gray);
  border-radius: 8px;
  color: var(--app-black);
  font-size: 16px;
  padding: 12px 12px 12px 40px;
  width: 100%;
}

.error-message {
  color: #ff6b6b;
  font-size: 14px;
  margin-top: 4px;
  text-align: left;
}

.auth-button {
  background: var(--app-red);
  border: none;
  border-radius: 8px;
  color: var(--app-white);
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  padding: 12px;
  transition: background 0.1s, transform 0.1s;
  width: 100%;
}

.auth-link {
  color: var(--app-text);
  display: block;
  font-size: 14px;
  margin-top: 24px;
  text-align: center;
}

.auth-link a {
  color: var(--app-red);
  text-decoration: none;
}
.generate-container {
  background: #333;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;
  transition: height 0.3s ease, padding 0.3s ease;
}

.top-progress-container {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  z-index: 10;
  text-align: center;
}
/* Video generate overlays - pushed to bottom */
.video-generate-overlays {
  box-sizing: border-box;
  height: auto;
  left: auto;
  margin: 0;
  margin-top: auto; /* Pushed to bottom */
  max-height: none;
  max-width: min(100vw, 75vh);
  overflow: visible;
  padding: 16px;
  padding-bottom: 10px;
  position: relative;
  text-shadow: 0 1px 3px var(--app-shadow);
  transform: translateY(var(--overlay-y, 0%));
  transition: var(--overlay-transition, 0.3s ease-out);
  width: 100%;
  z-index: 2;
}

.video-generate-overlays.hidden {
  transform: translateY(100%);
}

/* Music generate overlays - original styling */
.music-generate-overlays {
  height: auto;
  left: auto;
  margin: 0;
  margin-top: 0;
  max-height: none;
  max-width: none;
  overflow: visible;
  padding: 16px;
  padding-bottom: 100px;
  position: relative;
  text-shadow: 0 1px 3px var(--app-shadow);
  transform: none;
  width: 100%;
  z-index: 2;
}

/* Common styles for both classes */
.video-generate-overlays > *,
.music-generate-overlays > * {
  background: rgb(0 0 0 / 50%);
  border: none;
  border-radius: 8px;
  color: var(--app-white);
  margin-bottom: 12px;
  padding: 8px;
  pointer-events: auto;
  width: 100%;
}

.video-generate-overlays textarea,
.music-generate-overlays textarea {
  box-sizing: border-box;
  font-size: 16px;
  height: 60px;
  resize: none;
  margin-bottom: 0px;
  width: 100%;
  max-width: 100%;
}

.video-generate-overlays select,
.music-generate-overlays select {
  appearance: none;
  font-size: 16px;
}

.generate-effects {
  background: none;
  display: flex;
  gap: 8px;
  justify-content: space-around;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.generate-effect {
  align-items: center;
  background: rgb(255 255 255 / 10%);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.generate-effect input {
  display: none;
}

.generate-effect i {
  font-size: 24px;
  margin-bottom: 4px;
}

.camera-button i {
  color: var(--app-red);
  font-size: 96px;
}

.camera-button {
  padding: 8px;
  border-radius: 8px;
  width: fit-content;
  margin: 0 auto;
  margin-bottom: 32px;
}

.generate-effect.checked {
  background: var(--app-red);
}

.generate-file-input {
  display: none;
}

.generate-buttons-container {
  background: none;
  display: flex;
  margin-top: 16px;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.clear-image-button {
  position: absolute;
  left: 0;
}

.right-buttons {
  position: absolute;
  right: 0;
  display: flex;
  gap: 12px;
}

.generate-upload-button,
.generate-button {
  background: var(--app-red);
  border: none;
  border-radius: 50px;
  color: var(--app-white);
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  margin-top: 0;
  outline: none;
  padding: 12px;
  text-align: center;
  transition: background 0.1s, transform 0.1s;
  width: 150px; /* Narrower button */
}

.clear-image-button,
.edit-image-button,
.settings-button {
  background: var(--app-red);
  border: none;
  border-radius: 50%;
  color: var(--app-white);
  cursor: pointer;
  font-size: 16px;
  outline: none;
  padding: 12px;
  transition: background 0.1s, transform 0.1s;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-image-button:disabled,
.edit-image-button:disabled {
  background: gray;
  cursor: not-allowed;
}

.generate-button.no-image:disabled {
  background: gray !important;
}

.generate-button.loading:disabled,
.generate-button.default:not(:disabled) {
  background: var(--app-red) !important;
}

.create-button {
  background: var(--app-red);
  border: none;
  border-radius: 50px;
  color: var(--app-white);
  cursor: pointer;
  flex: 1;
  font-size: 16px;
  font-weight: bold;
  padding: 12px 24px;
  transition: background 0.1s, transform 0.1s;
}

.create-button:hover {
  background: #600060;
}

.create-button:active {
  background: #600060;
  transform: scale(0.98);
}

.create-button:disabled {
  background: gray;
  cursor: not-allowed;
}
.generate-preview {
  filter: brightness(var(--brightness, 0.7));
  height: 100dvh;
  left: 50%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  position: fixed;
  top: 0;
  transform: translateX(-50%) translateX(var(--preview-pan-x, 0px)) scale(var(--preview-scale, 1)) translateY(var(--preview-translate-y, 0px));
  opacity: var(--preview-opacity, 1);
  width: auto;
  z-index: 1;
}



.sentinel {
  height: 1px;
}

.comments-modal {
  background: rgb(255 255 255 / 50%);
  bottom: var(--nav-height);
  display: flex;
  flex-direction: column;
  height: 92dvh;
  left: 0;
  overflow: hidden;
  position: fixed;
  width: 100%;
  z-index: 100;
}

.comments-close {
  position: absolute;
  right: 10px;
  top: 30px;
}

.comments-list {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.comment-item {
  align-items: center;
  display: flex;
  padding: 10px;
}

.comment-username {
  font-weight: bold;
  margin-right: 5px;
}

.my-comment {
  background: white;
  bottom: 80px;
  padding: 10px;
}

.new-comment {
  background: white;
  bottom: 0;
  display: flex;
  padding: 10px;
  position: sticky;
}

.comment-input {
  flex: 1;
}

.post-confirm-overlay,
.follow-confirm-overlay,
.password-modal-overlay {
  align-items: center;
  background: rgb(0 0 0 / 50%);
  display: flex;
  height: 100%;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

.post-confirm-inner,
.follow-confirm-inner,
.password-modal-inner {
  background: white;
  border-radius: 8px;
  color: black;
  padding: 20px;
}

.password-requirements {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

.post-confirm-inner,
.follow-confirm-inner {
  text-align: center;
}

.post-buttons-container,
.follow-buttons-container {
  display: flex;
  gap: 20px;
}

.password-input {
  display: block;
  margin: 10px 0;
}

.modal-button {
  background: var(--app-red);
  border: none;
  border-radius: 50px;
  color: var(--app-white);
  cursor: pointer;
  font-size: 16px;
  margin: 8px;
  padding: 8px 16px;
  transition: background 0.1s, transform 0.1s;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
@media (min-width: 768px) {
  .desktop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    height: 100vh;
    overflow: hidden;
    transition: grid-template-columns 0.3s ease;
  }
  .sidebar {
    background: var(--app-white);
    border-right: 1px solid var(--app-gray);
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: padding 0.3s ease;
  }
  .sidebar.collapsed {
    padding: 20px 10px;
  }
  .nav-item {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    color: var(--app-black);
    transition: background 0.2s;
  }
  .nav-item:hover {
    background: var(--app-gray);
  }
    .sidebar-feed-selection {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 16px;
    }
    .sidebar-feed-selection .feed-btn {
      justify-content: flex-start;
      align-items: center;
      padding: 12px;
      background: transparent;
      color: var(--app-black);
      border: 1px solid var(--app-gray);
      font-size: 14px;
    }
    .sidebar-feed-selection .feed-btn:hover:not(:disabled) {
      background: var(--app-gray);
      transform: none;
    }
    .sidebar-feed-selection .feed-btn.active {
      background: var(--app-gray);
      color: var(--app-black);
      border-color: var(--app-gray);
    }
    .sidebar-feed-selection .feed-btn i {
      font-size: 16px;
      width: 20px;
      flex-shrink: 0;
    }
    .sidebar-feed-selection .feed-btn span {
      font-weight: 500;
    }
    .sidebar-feed-selection .feed-btn small {
      display: none;
    }
  .desktop-layout.collapsed {
    grid-template-columns: 70px 1fr;
  }
  .sidebar.collapsed .nav-item {
    padding: 8px;
  }
  .sidebar.collapsed .nav-item span {
    display: none;
  }
  .sidebar.collapsed .sidebar-feed-selection .feed-btn span {
    display: none;
  }
  .sidebar.collapsed .nav-item img {
    margin: 0;
  }
  .sidebar-collapse-btn {
    margin-top: auto;
    padding: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--app-black);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sidebar-collapse-btn:hover {
    background: var(--app-gray);
    border-radius: 8px;
  }
  .sidebar.collapsed .sidebar-collapse-btn {
    justify-content: center;
  }
  .main-content {
    padding: 0;
    height: 100vh;
    overflow: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .main-content::-webkit-scrollbar {
    display: none;
  }
  .video-feed {
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
    height: calc(100dvh);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .video-feed::-webkit-scrollbar {
    display: none;
  }
  .video-container {
    height: 100dvh;
    margin: 0;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    position: relative;
    scroll-snap-align: start;
  }
  .video-container:hover {
    transform: none;
  }
  .video-element {
    height: 100%;
    left: 50%;
    max-width: 75vh;
    object-fit: cover;
    object-position: center center;
    position: absolute;
    top: 0;
    touch-action: manipulation;
    transform: translateX(-50%);
    width: min(100%, 75vh);
  }
  .feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px;
    background: var(--app-white);
    border-radius: 8px;
  }
  .feed-header h2 {
    margin: 0;
    font-size: 24px;
  }
  .feed-header select {
    padding: 8px;
    border: 1px solid var(--app-gray);
    border-radius: 4px;
  }
  .generate-container.desktop-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    height: 100dvh;
  }

  .generate-container.desktop-split .top-progress-container {
    max-width: min(100%, 75vh);
  }


  .generate-container.desktop-split .generate-preview {
    position: absolute;
    left: 50%;
    width: auto;
    max-width: min(100%, 75vh);
    height: 100%;
    object-fit: cover;
  }
  .generate-container.desktop-split .video-generate-overlays {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(var(--overlay-y, 0%));
    width: min(calc(75vh - 64px), calc(100vw - 64px));
    padding: 16px;
    background: transparent;
    border-radius: 8px;
    box-sizing: border-box;
  }

  .editor-content .processing-indicator {
    left: calc(50% + 125px);
  }
  .music-feed {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
    scroll-snap-type: none;
  }
  .audio-container {
    height: 50px !important;
    aspect-ratio: unset !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    transition: none !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 16px !important;
    place-content: center flex-start !important;
    margin: 0 !important;
    position: relative !important;
  }
  .audio-container:nth-child(odd) {
    background: rgb(0 0 0 / 50%) !important;
  }
  .audio-container:nth-child(even) {
    background: rgb(255 255 255 / 10%) !important;
  }
  .audio-container:hover {
    transform: none !important;
  }
}

@media (max-width: 767px) {
  .mobile-content {
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
}


@media (orientation: landscape) and (min-width: 768px) {
  .bottom-nav {
    background: #fff;
    bottom: auto;
    flex-direction: column;
    height: 100vh;
    justify-content: flex-start;
    left: 0;
    padding: 20px 10px;
    position: fixed;
    top: 0;
    width: auto;
    z-index: 10001;
  }

  .nav-item {
    margin-bottom: 20px;
  }

  .video-container {
    margin: 0 auto;
    max-width: 100vw;
    width: calc(100vh * 320 / 480);
  }

  .audio-container {
    margin: 0 auto;
    max-width: 100vw;
    width: calc(100vh * 320 / 480);
  }

  .video-element {
    object-fit: contain;
  }

  .video-user-info,
  .video-actions {
    color: var(--app-text);
    text-shadow: 0 1px 3px var(--app-shadow);
  }

  .music-user-info,
  .music-actions {
    color: var(--app-text);
    text-shadow: 0 1px 3px var(--app-shadow);
  }

  .video-actions i {
    color: var(--app-text);
  }

  .music-actions i {
    color: var(--app-text);
  }

  .video-action.liked i,
  .video-action i.liked {
    color: var(--app-red);
  }

  .video-feed,
  .music-feed,
  .generate-container,
  .profile-container {
    height: 100dvh;
    margin-left: 60px;
    width: calc(100% - 60px);
  }


  .generate-container {
    margin: 0 auto;
    max-width: 100vw;
    width: calc(100vh * 320 / 480);
  }
  .generate-container {
    margin: 0 auto;
    max-width: 100vw;
    width: calc(100vh * 320 / 480);
  }

.generate-preview {
  height: 100dvh;
  object-fit: cover;
  width: calc(100vh * 320 / 480);
  max-width: none;
  transform: translateX(-50%) translateX(var(--preview-pan-x, 0px)) scale(var(--preview-scale, 1)) translateY(var(--preview-translate-y, 0px));
  opacity: var(--preview-opacity, 1);
  transition: var(--preview-transition, 0.3s ease-out);
}

  .video-feed {
    margin: 0 auto;
    max-width: 100vw;
    width: calc(100vh * 320 / 480);
  }

  .generate-overlays {
    position: relative;
    margin-top: 0;
    width: 100%;
    padding: 16px;
    padding-bottom: 20px;
    box-sizing: border-box;
  }
}
.bottom-nav {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

body:not(.nav-hidden) .bottom-nav {
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; 
}

.nav-hidden .bottom-nav {
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}

.nav-hidden .video-feed,
.nav-hidden .music-feed,
.nav-hidden .generate-container,
.nav-hidden .auth-container,
.nav-hidden .profile-container {
  height: 100dvh !important;
  margin-left: 0 !important;
  width: 100% !important;
  padding-bottom: 0 !important;
}

.nav-hidden body {
  overflow: hidden;  
}
.force-portrait .bottom-nav {
  flex-direction: row !important;
  height: var(--nav-height) !important;
  left: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  justify-content: space-around !important;
  padding: 0 env(safe-area-inset-left) 0 env(safe-area-inset-right) !important;
}

.force-portrait .video-feed,
.force-portrait .music-feed,
.force-portrait .generate-container,
.force-portrait .profile-container {
  margin-left: 0 !important;
  width: 100% !important;
}
.style-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

}

.style-buttons button {
  background: gray;
  border: none;
  border-radius: 4px;
  color: white;
  margin: 2px;
  padding: 4px 8px;
}

.advanced-options details {
  margin: 10px 0;
}

.advanced-options details input,
.advanced-options details select,
.advanced-options details label {
  display: block;
  margin-bottom: 10px;
  width: 100%;
}

.upload-section input {
  width: 100%;
}

.instrumental-section,
.song-mode {
  align-items: center;
  display: flex;
  margin: 5px 0;
}

.generate-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.wavesurfer-container {
  background: #444;
  height: 100px;
  width: 100%;
}

.spectrogram {
  background: #f0f0f0;
  height: 128px;
  margin-top: 10px;
  width: 100%;
}

.spectrogram-hidden {
  display: none;
}

.global-player {
  align-items: center;
  background: #333;
  flex: 0 0 auto;
  height: auto;
  overflow: visible;
  padding: 10px;
  width: 100%;
}

.player-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-right: 10px;
}

.player-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

.player-filters {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-right: auto;
}

.filter-icon {
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.filter-icon i {
  color: #888;
  font-size: 16px;
}

.filter-icon:hover {
  background: rgba(255,255,255,0.1);
}

.filter-icon:hover i {
  color: #aaa;
}

.filter-icon.active {
  background: transparent;
}

.filter-icon.active i {
  color: #800080;
}

.player-filter-dropdown {
  margin-left: auto;
}

.player-filter-dropdown .custom-dropdown {
  min-width: 120px;
}

.player-filter-dropdown .custom-dropdown-button {
  padding: 6px 10px;
  font-size: 12px;
}

.player-filter-input {
  padding: 6px 10px;
  font-size: 12px;
  background: #333;
  border: 1px solid #555;
  border-radius: 4px;
  color: #fff;
  width: 100px;
}

.player-filter-input::placeholder {
  color: #888;
}

.player-filter-input:focus {
  outline: none;
  border-color: #800080;
}

.global-player .video-action i {
  color: var(--app-red);
}

.prompt-overlay {
  background: #444;
  border-radius: 0;
  color: rgb(0 0 0);
  left: 0;
  max-width: 100%;
  padding: 0;
  position: absolute;
  text-align: left;
  top: 0;
  z-index: 2;
}

.tabs {
  background: #444;
  border-bottom: 1px solid #555;
  border-top: 1px solid #555;
  color: white;
  display: flex;
  justify-content: space-around;
  min-height: 40px;
  padding: 10px 0;
}

.tabs button {
  background: transparent;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  height: 30px;
  margin: 0 5px;
  padding: 8px 16px;
}

.tabs button.active {
  background: #800080;
}

.music-page-tabs {
  background: #444;
  border-bottom: 1px solid #555;
  border-top: 1px solid #555;
  color: white;
  display: flex;
  justify-content: space-around;
  min-height: 40px;
  padding: 10px 0;
  width: 100%;
}

.music-page-tabs button {
  background: transparent;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  height: 30px;
  margin: 0 5px;
  padding: 8px 16px;
}

.music-page-tabs button.active {
  background: #800080;
}

.tab-content {
  flex: 1;
  margin-top: 0;
  overflow-y: auto;
  padding-top: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}

.tab-content::-webkit-scrollbar {
  display: none;
}

.generate-overlays select {
  appearance: none;
  background: rgb(0 0 0 / 50%);
  border: none;
  border-radius: 8px;
  color: var(--app-white);
  cursor: pointer;
  display: block;
  font-size: 16px;
  margin-bottom: 10px;
  padding: 8px;
  width: 100%;
}

.generate-overlays select:focus {
  outline: none;
}

.progress-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
  width: 100%;
  background: none;
}

.progress-text {
  color: var(--app-text);
  flex: 1;
  font-size: 14px;
  margin: 0;
  text-align: left;
}

.video-poster {
  height: 100dvh;
  left: 50%;
  max-width: 75vh;
  object-fit: cover;
  object-position: center center;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: min(100%, calc(75vh));
  z-index: -1;
}

.waveform-wrapper {
  position: relative;
}

.waveform-visible {
  display: block;
}

.waveform-hidden {
  display: none;
}

.prompt-visible {
  display: block;
}

.prompt-hidden {
  display: none;
}

.edit-button {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  background: rgb(0 0 0 / 70%);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-open .edit-button {
  display: none;
}

.modal-open .edit-button {
  display: none;
}

.edit-button:hover {
  background: rgb(0 0 0 / 90%);
}

.editor-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.editor-content {
  background: rgb(0 0 0 / 80%);
  color: white;
  padding: 20px;
  border-radius: 10px;
  width: 95vw;
  max-height: 90vh;
  overflow: visible;
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 20px;
}

.slots-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  gap: 20px;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.slot {
  min-width: 120px;
  width: 33.33%;
  height: 35vh;
  border: none;
  display: flex;
  background:rgb(255 255 255 / 20%);
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  border-radius: 1px;
  flex-direction: column;
  text-align: center;
  padding: 1px;
  box-sizing: border-box;
  overflow: visible;
}

.slot img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: cover;
  border-radius: 0px;
  flex: 1;
}

.slot p {
  color: rgb(255 255 255 / 70%);
  margin: 0;
  font-size: 14px;
}

.slot {
  touch-action: manipulation;
}

@keyframes slideUp {
  0% {
    transform: translateY(var(--current-y, 0px));
    opacity: 1;
  }
  100% {
    transform: translateY(calc(var(--current-y, 0px) - 100%));
    opacity: 0;
  }
}

.slot img.clearing {
  animation: slideUp 0.3s ease-out forwards;
  pointer-events: none;
}

.edit-btn {
  background: var(--app-red);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
  margin-top: 10px;
}

.edit-btn:hover:not(:disabled) {
  background: #600060;
}

.edit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.clear-slot-button {
  background: var(--app-red);
  border: none;
  border-radius: 50%;
  color: var(--app-white);
  cursor: pointer;
  font-size: 14px;
  outline: none;
  padding: 6px;
  transition: background 0.1s, transform 0.1s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.clear-slot-button i {
  font-size: 12px;
}

.clear-slot-button:active {
  transform: scale(0.95);
}

textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 5px;
  box-sizing: border-box;
  margin-bottom: 20px;
  resize: vertical;
  background: rgb(255 255 255 / 10%);
  color: white;
}

textarea::placeholder {
  color: rgb(255 255 255 / 70%);
}

@media (max-width: 768px) {
  .slots-container {
    flex-direction: row;
    gap: 10px;
    margin-bottom: 15px;
  }

  .slot {
    min-width: 100px;
    width: 33.33%;
    height: 30vh;
    padding: 0px;
  }

  .clear-slot-button {
    display: none;
  }
}

@media (min-width: 768px) {
  .editor-content .slots-container {
    justify-content: center !important;
    gap: 24px;
  }
  .editor-content .slot {
    aspect-ratio: 2/3;
    height: auto;
    width: 28%;
    max-height: 50vh;
    background: transparent !important;
    justify-content: flex-start;
  }
  .editor-content .slot img {
    object-fit: contain;
    height: auto;
    max-height: 100%;
    flex: 1;
  }
  .slots-1 .slot { width: 70%; max-height: 70vh; }
  .slots-2 .slot { width: 42%; max-height: 62vh; }
  .slots-3 .slot { width: 28%; max-height: 55vh; }
}
.generate-container {
  background: #333;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-x: visible;
  overflow-y: hidden;
  position: relative;
  width: 100%;
  transition: height 0.3s ease, padding 0.3s ease;
}

.generate-preview-wide {
  cursor: grab;
  cursor: -webkit-grab;
}

.generate-overlays > * {
  background: none;
}
.generate-overlays textarea {
  background: rgb(0 0 0 / 50%);
}
.generate-overlays textarea:focus {
  outline: 2px solid var(--app-red);
}
.generate-button,
.generate-upload-button {
  background: var(--app-red);
}
.full-width-input {
  width: 100%;
}

.spacer {
  height: 100px;
}

.video-action.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.animate-preview {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.processing-indicator {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 10;
  white-space: nowrap;
  text-shadow: 0 1px 3px var(--app-shadow);
  margin-bottom: 5px;
}

/* Swipe panel styles */
.swipe-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .5);
  z-index: 1000;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  animation: fadeIn 0.3s ease-out;
}

.swipe-panel {
  width: 300px;
  max-width: 80vw;
  height: 80%;
  background: rgba(0, 0, 0, 0.9);
  border-right: 1px solid rgba(255, 0, 0, 0.1);
  border-radius: 0 20px 20px 0;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%) translateY(-50%);
  animation: slideInLeft 0.3s ease-out forwards;
  position: absolute;
  left: 0;
  top: 50%;
}

.panel-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--app-text);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s ease;
  z-index: 1001;
}

.panel-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%) translateY(-50%);
  }
  to {
    transform: translateX(0) translateY(-50%);
  }
}

.swipe-panel-overlay.closing .swipe-panel {
  animation: slideOutLeft 0.3s ease-in forwards;
}

.swipe-panel-overlay.closing {
  animation: fadeOut 0.3s ease-in forwards;
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0) translateY(-50%);
  }
  to {
    transform: translateX(-100%) translateY(-50%);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Feed selection panel styles */
.feed-selection-panel {
  padding: 20px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.feed-selection-panel h3 {
  color: var(--app-text);
  margin-bottom: 20px;
  font-size: 1.2em;
  font-weight: 600;
}

.feed-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.feed-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.1);
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--app-text);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 14px;
}

.feed-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.feed-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.feed-btn i {
  font-size: 18px;
  width: 24px;
}

.feed-btn span {
  font-weight: 600;
  flex: 1;
}

.feed-btn small {
  opacity: 0.7;
  font-size: 12px;
  margin-top: 2px;
  display: block;
}

.feed-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.feed-btn:disabled:hover {
  background: rgba(255,255,255,0.1);
  transform: none;
}

.auth-prompt {
  padding: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  margin-top: auto;
}

.auth-prompt p {
  color: #ccc;
  margin-bottom: 12px;
  font-size: 14px;
}

.login-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.3s ease;
}

.login-btn:hover {
  opacity: 0.9;
}

/* Feed loading indicator */
.loading-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--app-text);
}

.loading-feed i {
  font-size: 24px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.loading-feed p {
  font-size: 14px;
  opacity: 0.7;
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .swipe-panel {
    width: 95vw;
    margin-left: auto;
    border-radius: 16px 0 0 16px;
    border-radius: 0 20px 20px 0;
  }

  .feed-btn {
    padding: 14px;
    gap: 10px;
  }

  .feed-btn span {
    font-size: 13px;
  }

  .feed-btn small {
    display: none;
  }

/* Page Editor */
.page-editor {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #333;
  position: relative;
}

.editor-actions {
  display: flex;
  gap: 0.5rem;
}

.editor-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #4a90d9;
  color: #fff;
  cursor: pointer;
}

.editor-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.editor-actions button.published {
  background: #5cb85c;
}

.editor-actions .done-button {
  background: #5cb85c;
}

.editor-actions .done-button:hover {
  background: #4cae4c;
}

.collaborators {
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #1a1a1a;
  border-radius: 4px;
}

.collaborator-avatar {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  background: #4a90d9;
  color: #fff;
  margin-left: 0.5rem;
  cursor: pointer;
}

.loading {
  text-align: center;
  padding: 2rem;
}

.page-editor-content {
  min-height: 400px;
  padding: 1rem;
  border: 1px solid #333;
  border-radius: 8px;
}

.node-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #333;
}

.node-toolbar button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #444;
  color: #fff;
  cursor: pointer;
}

.node {
  position: relative;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 4px;
}

.node-type {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.node textarea,
.node input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #333;
  border-radius: 4px;
  background: #1a1a1a;
  color: #fff;
  min-height: 100px;
  resize: vertical;
}

.delete-node {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 4px;
  background: #d9534f;
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
}

/* Template Selector */
.template-selector {
  padding: 2rem;
  text-align: center;
}

.template-selector h3 {
  color: var(--app-white);
  margin-bottom: 1.5rem;
  font-size: 24px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.template-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.template-card:hover {
  background: #2a2a2a;
  border-color: #4a90d9;
  transform: translateY(-2px);
}

.template-card h4 {
  color: var(--app-white);
  margin: 0 0 0.5rem 0;
  font-size: 18px;
}

.template-card p {
  color: #888;
  margin: 0;
  font-size: 14px;
}
}

.load-button-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  background: none;
}

.generate-upload-button {
  width: auto;
  max-width: 200px;
}

/* Winamp Page Styles */
.skin-selector {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.8);
  padding: 8px;
  border-radius: 8px;
  color: var(--app-text);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skin-selector label {
  margin: 0;
}

.skin-selector select {
  background: var(--winamp-bg);
  border: 1px solid var(--winamp-accent);
  color: var(--winamp-text);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

.skin-selector select:focus {
  outline: none;
  border-color: var(--app-red);
}

.webamp-container {
  width: 100%;
  height: 100%;
  background: var(--winamp-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  padding-top: env(safe-area-inset-top);
}

/* Skin selector responsive */
@media (max-width: 768px) {
  .skin-selector {
    top: 5px;
    right: 5px;
    padding: 4px;
    font-size: 12px;
  }

  .skin-selector select {
    font-size: 12px;
    padding: 2px 4px;
  }
}

/* Mobile-specific Winamp styles */
@media (max-width: 768px) {
  .webamp-container.webamp-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: auto;
    z-index: 1000;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  .webamp-container.webamp-mobile:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }
}

/* Responsive adjustments for Winamp container */
@media (max-width: 768px) {
  .webamp-container:not(.webamp-mobile) {
    height: calc(100vh - var(--nav-height));
    padding: 10px;
    box-sizing: border-box;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .webamp-container {
    max-width: 800px;
    margin: 0 auto;
  }
}

@media (min-width: 1025px) {
  .webamp-container {
    max-width: 900px;
    margin: 0 auto;
  }
}

/* Override Webamp default styles for better integration */
.webamp-container .webamp * {
  box-sizing: border-box;
}

.webamp-container .webamp {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

/* Mobile scaling for Webamp elements */
@media (max-width: 768px) {
  .webamp-container.webamp-mobile .webamp {
    transform-origin: top left;
    width: 100vw;
    height: auto;
    min-height: 100vh;
    flex: 1;
  }

  .webamp-container.webamp-mobile .webamp button {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Ensure Webamp elements are properly styled */
.webamp-container .webamp .window {
  background: var(--winamp-bg);
  border: 1px solid var(--winamp-accent);
  box-shadow: 0 0 10px var(--winamp-shadow);
}

.webamp-container .webamp .title-bar {
  background: linear-gradient(to right, var(--winamp-accent), var(--app-red));
  color: var(--winamp-text);
  font-weight: bold;
}

.webamp-container .webamp button {
  background: var(--winamp-bg);
  border: 1px solid var(--winamp-accent);
  color: var(--winamp-text);
  transition: background 0.2s ease;
}

.webamp-container .webamp button:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.webamp-container .webamp button:hover {
  background: var(--winamp-accent);
  color: var(--winamp-bg);
}

.webamp-container .webamp .playlist {
  background: var(--winamp-bg);
  color: var(--winamp-text);
  border: 1px solid var(--winamp-accent);
}

.webamp-container .webamp .visualizer {
  background: var(--winamp-bg);
  border: 1px solid var(--winamp-accent);
}

/* Fallback audio list styles (from WinampPageWrapper) */
.fallback-audio-list {
  width: 100%;
  max-width: 600px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  color: var(--app-text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 80vh;
  overflow-y: auto;
}

.fallback-audio-item {
  margin-bottom: 15px;
  padding: 10px;
  background: #444;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fallback-audio-item h4 {
  margin-bottom: 5px;
  font-size: 16px;
}

.fallback-audio-item p {
  margin: 0;
  color: #fff;
  font-size: 16px;
}

.fallback-audio-item audio {
  width: 100%;
  max-width: 400px;
}

.webamp-persistent-container {
  position: fixed;
  z-index: 200;
  pointer-events: none;
}

.webamp-persistent-container > * {
  pointer-events: auto;
}

.webamp-persistent-container.webamp-hidden {
  display: none;
}

.global-player.player-hidden {
  display: none;
}

.trash-overlay {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

.trash-overlay i {
  font-size: 48px;
  color: var(--app-white);
  text-shadow: 0 1px 3px var(--app-shadow);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.trash-overlay i.trash-ready {
  color: #ff9500;
}

@media (orientation: landscape) {
  .trash-overlay {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
  }

  .trash-overlay i {
    font-size: 32px;
  }
}

.animate-preview {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.oauth-button {
  display: inline-block;
  padding: 10px 20px;
  margin: 10px 0;
  background-color: #4285f4;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.oauth-button:hover {
  background-color: #3367d6;
}

/* Toggle Switch Styles */
.toggle-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: relative;
  cursor: pointer;
  width: 60px;
  height: 34px;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--app-red);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.settings-icon {
  align-items: center;
  background: rgb(255 255 255 / 10%);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  padding: 8px;
  margin: 0 auto 15vh auto;
  border: none;
  color: var(--app-text);
  font-size: 24px;
  transition: background 0.3s ease;
  width: fit-content;
}

.settings-icon:hover {
  background: rgb(255 255 255 / 20%);
}

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

/* Page Viewer */
.page-viewer {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.page-not-found {
  text-align: center;
  padding: 4rem 1rem;
}

.page-not-found h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.page-not-found p {
  color: #888;
  margin-bottom: 2rem;
}

.page-not-found a {
  color: #4a90d9;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #333;
}

.page-owner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.owner-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.owner-info h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}

.page-stats {
  display: flex;
  gap: 1rem;
  color: #888;
  font-size: 0.9rem;
}

.view-count,
.follower-count,
.comment-count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.follower-count {
  cursor: pointer;
}

.page-stats .edit-icon {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.page-stats .edit-icon:hover {
  opacity: 1;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
}

.page-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #444;
  color: #fff;
  cursor: pointer;
}

.page-actions button.followed {
  background: #5cb85c;
}

.page-actions button.edit-button {
  background: #4a90d9;
}

.page-content {
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.page-text-node {
  margin-bottom: 1rem;
  white-space: pre-wrap;
}

.page-image-node {
  margin: 1.5rem 0;
}

.page-image-node img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.page-link-node {
  margin: 1rem 0;
}

.page-link-node a {
  color: #4a90d9;
  text-decoration: none;
}

.page-link-node a:hover {
  text-decoration: underline;
}

.page-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.9rem;
  color: #888;
  text-align: center;
}

/* User Page Comments */
.user-page-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #333;
}

.user-page-comments h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.comment-form {
  margin-bottom: 2rem;
}

.comment-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  border: 1px solid #333;
  border-radius: 4px;
  background: #1a1a1a;
  color: #fff;
  margin-bottom: 0.5rem;
  resize: vertical;
}

.comment-form button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #4a90d9;
  color: #fff;
  cursor: pointer;
}

.comment-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-prompt {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #1a1a1a;
  border-radius: 4px;
  text-align: center;
}

.login-prompt a {
  color: #4a90d9;
  text-decoration: none;
}

.login-prompt a:hover {
  text-decoration: underline;
}

.loading-comments,
.no-comments {
  text-align: center;
  padding: 2rem;
  color: #888;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment {
  padding: 1rem;
  background: #1a1a1a;
  border-radius: 4px;
  border: 1px solid #333;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-avatar-placeholder {
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background: #4a90d9;
  color: #fff;
  font-weight: bold;
}

.comment-meta {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-username {
  font-weight: 600;
}

.comment-date {
  font-size: 0.85rem;
  color: #888;
}

.delete-comment {
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 4px;
  background: #d9534f;
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
}

.delete-comment:hover {
  background: #c9302c;
}

.comment-body {
  padding-left: 3.5rem;
  line-height: 1.6;
}

/* Video node styles for PageEditor */
.video-node-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.video-label {
  flex: 1;
  color: #888;
}

.video-node-content button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #444;
  color: #fff;
  cursor: pointer;
}

.video-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.video-picker-content {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.video-picker-content h3 {
  margin: 0 0 1rem 0;
  color: var(--app-text);
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.video-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 4px;
  cursor: pointer;
}

.video-item:hover {
  background: #1a1a1a;
}

.video-item img {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
}

.video-info {
  flex: 1;
}

.video-caption {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--app-text);
}

.video-date {
  font-size: 0.85rem;
  color: #888;
}

.no-videos {
  text-align: center;
  padding: 2rem;
  color: #888;
}

.close-picker {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
  background: #4a90d9;
  color: #fff;
  cursor: pointer;
}

/* Video node styles for PageViewer */
.page-video-node {
  margin: 1.5rem 0;
}

.page-video-node video {
  width: 100%;
  max-width: 600px;
  border-radius: 4px;
  background: #000;
}
/* Music Node Editor */
.music-node-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.music-label {
  flex: 1;
  color: #888;
}

.music-node-content button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #444;
  color: #fff;
  cursor: pointer;
}

/* Comments Node Editor */
.comments-node-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comments-label {
  flex: 1;
  color: #888;
}

.music-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.music-picker-content {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.music-picker-content h3 {
  margin: 0 0 1rem 0;
}

.music-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.music-item {
  padding: 1rem;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 4px;
  cursor: pointer;
}

.music-item:hover {
  background: #1a1a1a;
}

.music-info {
  flex: 1;
}

.music-prompt {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.music-date {
  font-size: 0.85rem;
  color: #888;
}

.no-music {
  text-align: center;
  padding: 2rem;
  color: #888;
}

/* Music Node Viewer */
.page-music-node {
  margin: 1.5rem 0;
}

.page-music-node audio {
  width: 100%;
  max-width: 600px;
  border-radius: 4px;
  background: #1a1a1a;
}

.music-generator {
  padding: 20px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

@media (max-width: 767px) {
  .music-generator {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

.music-generator-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #fff;
}

.generator-presets {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 16px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.preset-btn.active {
  background: #7c3aed;
  border-color: #7c3aed;
}

.generator-section {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #a0a0a0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-header i {
  color: #7c3aed;
}

.lyrics-input,
.tags-input {
  width: 100%;
  min-height: 80px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  font-size: 14px;
  resize: vertical;
  overflow: auto;
  font-family: inherit;
  line-height: 1.5;
  box-sizing: border-box;
}

.lyrics-input:focus,
.tags-input:focus {
  outline: none;
  border-color: #7c3aed;
}

.lyrics-input::placeholder,
.tags-input::placeholder {
  color: #666;
}

.style-buttons-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.style-tag-btn {
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 16px;
  padding: 6px 12px;
  color: #c4b5fd;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.style-tag-btn:hover {
  background: rgba(124, 58, 237, 0.4);
  border-color: #7c3aed;
  color: #fff;
}

.advanced-section {
  border: none;
  background: transparent;
}

.advanced-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #a0a0a0;
  font-size: 14px;
  padding: 8px 0;
}

.advanced-summary:hover {
  color: #fff;
}

.advanced-summary i {
  color: #7c3aed;
}

.advanced-content {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.param-group h4 {
  margin: 0 0 12px 0;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.param-row label {
  flex: 0 0 120px;
  font-size: 13px;
  color: #a0a0a0;
}

.param-row input[type="number"],
.param-row input[type="text"],
.param-row select {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
}

.param-row input[type="range"] {
  flex: 1;
  accent-color: #7c3aed;
}

.param-row select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.exclude-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  box-sizing: border-box;
}

.exclude-input:focus {
  outline: none;
  border-color: #7c3aed;
}

.generator-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  color: #fff;
  font-weight: 600;
}

.create-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.create-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.create-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.custom-dropdown {
  position: relative;
  flex: 1;
  z-index: 1000;
}

.custom-dropdown.open {
  z-index: 10000;
}

.custom-dropdown-button {
  width: 100%;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 8px 36px 8px 12px;
  color: #fff;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
  font-family: inherit;
  position: relative;
  z-index: 1;
}

.custom-dropdown-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.custom-dropdown-button:focus {
  outline: none;
  border-color: #7c3aed;
  background: rgba(255, 255, 255, 0.1);
}

.custom-dropdown-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-dropdown-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #fff;
  transition: transform 0.2s;
  pointer-events: none;
  z-index: 2;
}

.custom-dropdown-arrow.open {
  transform: translateY(-50%) rotate(180deg);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-width: 100%;
  width: 100%;
}

.custom-dropdown-menu::-webkit-scrollbar {
  width: 8px;
}

.custom-dropdown-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.5);
  border-radius: 4px;
}

.custom-dropdown-option {
  padding: 8px 12px;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  background: #1a1a2e;
}

.custom-dropdown-option:hover,
.custom-dropdown-option.highlighted {
  background: rgba(124, 58, 237, 0.4);
  color: #fff;
}

.custom-dropdown-option.selected {
  background: rgba(124, 58, 237, 0.6);
  color: #fff;
  font-weight: 500;
}

@media (min-width: 768px) {
  .param-row {
    gap: 16px;
  }

  .param-row label {
    flex: 0 0 140px;
  }
}

/* DAW Page Styles */
.daw-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-height));
  background: #1a1a1a;
}

.daw-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #0f0f0f;
  border-bottom: 1px solid #333;
}

.daw-project-name {
  font-size: 1rem;
  color: var(--app-text);
  font-weight: 500;
}

.daw-save-button {
  padding: 0.5rem 1.5rem;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.daw-save-button:hover:not(:disabled) {
  background: #555;
}

.daw-save-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.daw-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.daw-page {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: block;
}

.daw-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  display: block;
}

.daw-persistent-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  background: #1a1a1a;
  transition: left 0.3s ease;
}

.daw-persistent-container.daw-visible {
  display: block;
}

.daw-persistent-container .daw-iframe {
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  .daw-persistent-container {
    left: 250px;
  }
  .daw-persistent-container.sidebar-collapsed {
    left: 70px;
  }
}

.daw-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
}

/* DAW Edit Button in MusicItem */
.daw-edit-btn {
  text-decoration: none;
  color: var(--text-secondary);
}

.daw-edit-btn:hover {
  color: var(--accent-color);
}

/* Webamp Container */
.webamp-container {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
  background: var(--bg-secondary);
}

.webamp-container.webamp-hidden {
  display: none;
}

#webamp {
  position: absolute !important;
  top: 20px !important;
  left: 20px !important;
}

/* Title input styles */
.title-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 0.5rem;
}

.title-input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.title-input:focus {
  outline: none;
  border-color: var(--accent-color, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.title-input::placeholder {
  color: var(--text-muted, #9ca3af);
  font-weight: 400;
}

.regenerate-btn {
  padding: 0 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--button-bg) 0%, color-mix(in srgb, var(--button-bg) 90%, white) 100%);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.regenerate-btn:hover {
  background: linear-gradient(135deg, var(--button-hover-bg) 0%, color-mix(in srgb, var(--button-hover-bg) 90%, white) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.regenerate-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.regenerate-btn i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.regenerate-btn:hover i {
  transform: rotate(180deg);
}

/* Media Gallery Styles */
.media-gallery {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 16px 0;
}

.gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--app-gray);
  opacity: 0.7;
}

.gallery-empty i {
  font-size: 48px;
  margin-bottom: 16px;
}

.gallery-empty p {
  font-size: 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 0 4px;
}

.gallery-grid-images {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.gallery-card {
  background: rgb(255 255 255 / 5%);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card-media {
  position: relative;
  aspect-ratio: 9/16;
  overflow: hidden;
  background: #1a1a1a;
}

.image-card .card-media {
  aspect-ratio: 1/1;
}

.card-media video,
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.video-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.video-card:hover .video-thumbnail {
  opacity: 0;
}

.video-card:hover .video-preview {
  z-index: 2;
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-card:hover .card-overlay {
  opacity: 1;
}

.card-overlay i {
  font-size: 32px;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.card-info {
  padding: 10px 12px;
}

.card-caption {
  font-size: 13px;
  color: var(--app-text);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-date {
  font-size: 11px;
  color: var(--app-gray);
  opacity: 0.7;
}

.gallery-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: var(--app-gray);
}

.gallery-loading i {
  font-size: 24px;
}

/* Music Gallery Styles */
.music-gallery {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 16px 0;
}

.music-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.music-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgb(255 255 255 / 5%);
  border-radius: 12px;
  padding: 16px;
  transition: background 0.2s ease;
  min-height: 60px;
}

.music-card:hover {
  background: rgb(255 255 255 / 10%);
}

.music-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--app-red);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease, background 0.2s ease;
}

.music-play-btn:hover {
  background: #600060;
  transform: scale(1.05);
}

.music-play-btn:active {
  transform: scale(0.95);
}

.music-play-btn i {
  font-size: 16px;
  margin-left: 2px;
}

.music-info {
  flex: 1;
  min-width: 0;
}

.music-title {
  font-size: 14px;
  color: var(--app-text);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-date {
  font-size: 12px;
  color: var(--app-gray);
  opacity: 0.7;
}

.music-actions {
  display: flex;
  gap: 8px;
}

.music-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgb(255 255 255 / 10%);
  border: none;
  color: var(--app-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}

.music-action-btn:hover {
  background: rgb(255 255 255 / 20%);
}

.music-action-btn i {
  font-size: 14px;
}

/* Desktop responsive adjustments */
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .gallery-grid-images {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .card-caption {
    font-size: 14px;
  }

  .music-card {
    padding: 14px 20px;
  }

  .music-title {
    font-size: 15px;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .gallery-grid-images {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* Media Preview Modal */
.media-preview-overlay {
  align-items: center;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  height: 100%;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10002;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.media-preview-container {
  background: #1a1a1a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.media-preview-content {
  height: calc(100vh - 140px);
  max-width: 95vw;
  position: relative;
}

.media-preview-video,
.media-preview-image {
  height: 100%;
  max-width: 95vw;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.media-preview-info {
  padding: 12px 20px;
  background: #1a1a1a;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.media-preview-caption {
  font-size: 15px;
  color: #fff;
  margin: 0 0 4px 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-preview-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.media-preview-actions {
  padding: 12px 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  background: #1a1a1a;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.media-preview-action-btn {
  background: var(--app-red, #e53935);
  border: none;
  border-radius: 8px;
  color: white;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.1s ease, background 0.2s ease;
}

.media-preview-action-btn:hover {
  transform: scale(1.02);
}

.media-preview-action-btn:active {
  transform: scale(0.98);
}

.media-preview-action-btn.small {
  background: transparent;
  padding: 4px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
}

.media-preview-action-btn.small:hover {
  color: white;
}

.media-preview-action-btn.danger {
  margin-left: auto;
}

.media-preview-action-btn.danger:hover {
  color: #e53935;
}

@media (max-width: 768px) {
  .profile-tabs {
    justify-content: center;
    overflow: visible;
  }

  .profile-tab {
    padding: 10px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .profile-tab i {
    font-size: 16px;
  }

  .profile-tab-label {
    display: none;
  }

  .profile-tab-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .profile-tab-content::-webkit-scrollbar {
    display: none;
  }

  .profile-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .profile-container::-webkit-scrollbar {
    display: none;
  }

  .media-preview-actions {
    padding-bottom: 24px;
  }
}
