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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
  min-height: 100vh;
  overflow-x: hidden;
  color: #e0e0e0;
}

/* Qt App Container */
.qt-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Modern Header */
.qt-header {
  background: linear-gradient(to bottom, #3d3d4f 0%, #2d2d3a 100%);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1a1a24;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.qt-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qt-brand-icon {
  font-size: 24px;
}

.qt-brand-text {
  color: #e0e0e0;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.3px;
}

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

.qt-header-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
  color: #b0b0b0;
}

.qt-header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Main Container */
.qt-main-container {
  display: flex;
  flex: 1;
  background: #1e1e2a;
}

/* Modern Sidebar */
.qt-sidebar {
  width: 240px;
  background: #2d2d3a;
  padding: 16px;
  border-right: 1px solid #1a1a24;
  overflow-y: auto;
  flex-shrink: 0;
}

.qt-group-box {
  border: 1px solid #3d3d4f;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  background: #252532;
}

.qt-group-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: #7aa2f7;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.qt-tree-view {
  background: #1e1e2a;
  border: 1px solid #3d3d4f;
  border-radius: 6px;
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.qt-tree-item {
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  color: #b0b0b0;
  transition: all 0.2s;
  margin: 2px 0;
}

.qt-tree-item:hover {
  background: #3d3d4f;
  color: #e0e0e0;
}

.qt-tree-item.selected {
  background: #7aa2f7;
  color: #1e1e2a;
  font-weight: 500;
}

.qt-tree-arrow {
  font-size: 10px;
  width: 16px;
}

/* Content Area */
.qt-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: #1e1e2a;
}

/* Modern Search */
.qt-search-container {
  display: flex;
  margin-bottom: 24px;
  gap: 10px;
}

.qt-search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #3d3d4f;
  background: #2d2d3a;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  border-radius: 8px;
  color: #e0e0e0;
  transition: all 0.2s;
}

.qt-search-input:focus {
  outline: none;
  border-color: #7aa2f7;
  background: #252532;
  box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.1);
}

.qt-search-input::placeholder {
  color: #666;
}

.qt-search-btn {
  padding: 12px 24px;
  background: #7aa2f7;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  color: #1e1e2a;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s;
}

.qt-search-btn:hover {
  background: #8ab4f8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(122, 162, 247, 0.3);
}

.qt-search-btn:active {
  transform: translateY(0);
}

/* Modern Movie Grid */
.qt-movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.qt-movie-card {
  background: #2d2d3a;
  border: 1px solid #3d3d4f;
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.qt-movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(122, 162, 247, 0.25);
  border-color: #7aa2f7;
}

.qt-movie-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #3d3d4f;
}

.qt-movie-card-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qt-movie-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e0e0e0;
}

.qt-movie-meta {
  font-size: 12px;
  color: #888;
  margin: 0;
}

.qt-btn {
  padding: 10px 18px;
  background: #3d3d4f;
  border: 1px solid #4d4d5f;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  border-radius: 8px;
  color: #b0b0b0;
  transition: all 0.2s;
  font-weight: 500;
}

.qt-btn:hover {
  background: #4d4d5f;
  color: #e0e0e0;
  transform: translateY(-1px);
}

.qt-btn:active {
  transform: translateY(0);
}

.qt-watch-btn {
  width: 100%;
  background: #7aa2f7;
  color: #1e1e2a;
  border: none;
  font-weight: 600;
}

.qt-watch-btn:hover {
  background: #8ab4f8;
}

.qt-fav-btn {
  width: 100%;
}

.qt-fav-btn.active {
  background: #ffc777;
  color: #1e1e2a;
  border: none;
}

/* Modern Player */
.qt-player-container {
  max-width: 1000px;
  margin: 0 auto;
}

.qt-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.qt-player-header h2 {
  margin: 0;
  font-size: 28px;
  color: #e0e0e0;
  font-weight: 600;
}

.qt-video-frame {
  border: 1px solid #3d3d4f;
  border-radius: 10px;
  overflow: hidden;
  background: #252532;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qt-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
  color: #b0b0b0;
}

.qt-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #3d3d4f;
  border-top-color: #7aa2f7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.qt-stream-info {
  padding: 40px;
  text-align: center;
}

.qt-stream-info p {
  margin: 16px 0;
  color: #b0b0b0;
  line-height: 1.6;
}

.qt-stream-btn {
  margin: 20px auto;
  display: inline-block;
  background: #7aa2f7 !important;
  color: #1e1e2a !important;
  border: none !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  padding: 14px 28px !important;
  text-decoration: none;
}

.qt-stream-btn:hover {
  background: #8ab4f8 !important;
  box-shadow: 0 4px 16px rgba(122, 162, 247, 0.3);
}

.qt-stream-note {
  font-size: 12px !important;
  color: #888 !important;
  font-style: italic;
}

.qt-player-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.qt-movie-info {
  background: #2d2d3a;
  border: 1px solid #3d3d4f;
  border-radius: 10px;
  padding: 20px;
}

.qt-movie-info p {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.7;
  color: #b0b0b0;
}

.qt-movie-info strong {
  color: #7aa2f7;
}

/* Footer */
.qt-footer {
  text-align: center;
  padding: 24px;
  background: #2d2d3a;
  border-top: 1px solid #1a1a24;
  color: #b0b0b0;
  font-size: 12px;
}

.qt-footer a {
  color: #7aa2f7;
  text-decoration: none;
  font-weight: 500;
}

.qt-footer a:hover {
  text-decoration: underline;
  color: #8ab4f8;
}

/* Responsive */
@media (max-width: 768px) {
  .qt-header {
    padding: 12px 16px;
  }

  .qt-brand-text {
    font-size: 16px;
  }

  .qt-sidebar {
    width: 200px;
  }

  .qt-content {
    padding: 16px;
  }

  .qt-movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .qt-sidebar {
    display: none;
  }

  .qt-movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .qt-player-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .qt-player-header h2 {
    font-size: 22px;
  }
}

/* Modern Scrollbars */
.qt-sidebar::-webkit-scrollbar,
.qt-tree-view::-webkit-scrollbar,
.qt-content::-webkit-scrollbar {
  width: 12px;
}

.qt-sidebar::-webkit-scrollbar-track,
.qt-tree-view::-webkit-scrollbar-track,
.qt-content::-webkit-scrollbar-track {
  background: #1e1e2a;
}

.qt-sidebar::-webkit-scrollbar-thumb,
.qt-tree-view::-webkit-scrollbar-thumb,
.qt-content::-webkit-scrollbar-thumb {
  background: #3d3d4f;
  border-radius: 6px;
}

.qt-sidebar::-webkit-scrollbar-thumb:hover,
.qt-tree-view::-webkit-scrollbar-thumb:hover,
.qt-content::-webkit-scrollbar-thumb:hover {
  background: #4d4d5f;
}