* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #e94560 100%);
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
  min-height: 100vh;
  color: white;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(233, 69, 96, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(83, 52, 131, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(243, 148, 34, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 60% 60%, rgba(15, 52, 96, 0.3) 0%, transparent 50%);
  animation: floatGradient 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes floatGradient {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(5%, -5%) scale(1.1);
  }
  50% {
    transform: translate(-5%, 5%) scale(0.95);
  }
  75% {
    transform: translate(3%, 3%) scale(1.05);
  }
}

.navbar {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.navbar .container {
  padding: 0 2rem;
  max-width: 1200px;
}

.navbar-brand {
  color: white !important;
  font-weight: 600;
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: 0;
  transition: opacity 0.3s;
}

.navbar-brand:hover {
  opacity: 0.8;
}

.main-container {
  padding: 2rem;
  max-width: 1200px;
}

.glass-card,
.glass-card.card {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card-header {
  background: rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.card-header table {
  margin-bottom: 0;
}

.card-header td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: none;
}

.card-header td:first-child {
  padding-left: 1rem;
  vertical-align: top;
}

.card-header td:nth-child(2) {
  width: 120px;
  padding: 1rem 0.5rem;
}

.card-header td:last-child {
  width: 160px;
  padding: 1rem 0.5rem;
}

.header-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  font-weight: 500;
}

.breadcrumb-wrapper {
  display: flex;
  align-items: center;
}

.desktop-breadcrumb {
  display: block;
}

.mobile-breadcrumb {
  display: none;
}

.current-directory {
  color: white;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.chevron-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.chevron-icon:hover {
  opacity: 1;
}

.card-body {
  padding: 1.5rem;
  background: transparent !important;
}

.welcome-text {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.hidden-login {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
}

.hidden-login.show {
  max-height: 200px;
  opacity: 1;
}

.click-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.table {
  color: white !important;
  margin-bottom: 0;
  background-color: transparent !important;
  --bs-table-bg: transparent !important;
  --bs-table-color: white !important;
  --bs-table-border-color: rgba(255, 255, 255, 0.1) !important;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.05) !important;
  --bs-table-hover-color: white !important;
  --bs-table-striped-bg: transparent !important;
}

.table > :not(caption) > * > * {
  background-color: transparent !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.table thead {
  background: rgba(255, 255, 255, 0.05) !important;
}

.table thead th {
  background: rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: none !important;
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  text-align: center;
}

.table tbody {
  background: transparent !important;
}

.table tbody tr {
  background: transparent !important;
  color: white !important;
}

.table tbody td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-top: none !important;
  padding: 0.75rem 1rem;
  vertical-align: middle;
  background: transparent !important;
  color: white !important;
}

.table tbody td:first-child {
  width: auto;
  padding-left: 1rem;
}

.table tbody td:nth-child(2) {
  width: 120px;
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.table tbody td:last-child {
  width: 160px;
  text-align: center;
  white-space: nowrap;
  padding: 0.75rem 0.5rem;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.table-hover > tbody > tr:hover > * {
  background: rgba(255, 255, 255, 0.05) !important;
  color: white !important;
}

.file-item {
  transition: background-color 0.2s;
}

.file-info-wrapper {
  display: flex;
  align-items: center;
}

.file-info {
  display: flex;
  flex-direction: column;
}

.folder-icon,
.file-icon {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  filter: brightness(0) invert(1);
}

.file-name {
  font-weight: 500;
  color: white !important;
  display: inline-block;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 1.05rem;
}

.file-name-folder {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  display: inline-block;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  font-size: 1.05rem;
}

.file-name-folder:hover {
  text-decoration: underline;
}

.file-name-media {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  display: inline-block;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  font-size: 1.05rem;
}

.file-name-media:hover {
  text-decoration: underline;
}

.file-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.table-wrapper {
  overflow-x: auto;
  padding-bottom: 8px;
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.6);
}

.media-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.media-preview-overlay img,
.media-preview-overlay video {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.media-preview-overlay video {
  background: #000;
}

.media-preview-overlay audio {
  width: 80%;
  max-width: 500px;
}

.audio-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.audio-preview-icon {
  font-size: 6rem;
  opacity: 0.8;
}

.audio-preview-title {
  color: white;
  font-size: 1.2rem;
  text-align: center;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-preview-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  z-index: 2001;
}

.media-preview-close:hover {
  opacity: 1;
}

.breadcrumb {
  background: transparent !important;
  padding: 0;
  margin-bottom: 1.5rem;
}

.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-item a:hover {
  color: white !important;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.6) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5) !important;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1500;
}

.progress-card,
.progress-card.card {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px;
}

.progress-card .card-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
}

.progress-card .card-body {
  color: white !important;
}

.progress {
  background: rgba(255, 255, 255, 0.1);
  height: 8px;
  border-radius: 4px;
}

.progress-bar {
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
  animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
  color: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
}

.btn-light {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

.alert-info {
  background: rgba(79, 172, 254, 0.1) !important;
  border: 1px solid rgba(79, 172, 254, 0.3) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.6) !important;
}

@media (max-width: 768px) {
  .main-container {
    padding: 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  .navbar-brand {
    margin-left: 1rem !important;
    font-size: 1.2rem;
  }

  .desktop-breadcrumb {
    display: none;
  }

  .mobile-breadcrumb {
    display: block;
  }

  .table thead th,
  .table tbody td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }

  .file-name,
  .file-name-folder {
    white-space: nowrap;
  }

  .file-icon,
  .folder-icon {
    font-size: 1rem;
  }

  .btn-outline-primary {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.875rem;
  }

  .progress-card {
    margin: 0 0.5rem;
  }

  .progress-card .card-header {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
  }

  .progress-card .card-body {
    padding: 0.75rem 1rem;
  }

  .table-wrapper::-webkit-scrollbar {
    display: none;
  }

  .table-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

.download-queue-panel {
  max-width: 500px;
}

.chevron-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
  transition: transform 0.2s;
}

.download-list-body {
  max-height: 250px;
  overflow-y: auto;
}

.download-list-body::-webkit-scrollbar {
  width: 6px;
}

.download-list-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.download-list-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.download-list-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.download-task-item {
  background: transparent;
}

.download-task-item:last-child {
  border-bottom: none !important;
}

.download-task-name {
  font-size: 0.9rem;
  color: white;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-task-item .badge {
  font-size: 0.75rem;
}

.disclaimer-container {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.disclaimer-card {
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px;
}

.disclaimer-header {
  padding: 0.75rem 1rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}

.disclaimer-header:hover {
  color: rgba(255, 255, 255, 0.9);
}

.disclaimer-body {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.disclaimer-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.disclaimer-text a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.disclaimer-text a:hover {
  color: rgba(255, 255, 255, 1);
}

.disclaimer-divider {
  border-color: rgba(255, 255, 255, 0.1);
  margin: 1rem 0;
}
