* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

:root {
  --main-bg: #0f0f0f;
  --secondary-bg: #272727;
  --text-color: #fff;
  --secondary-text: #aaa;
  --hover-color: #3f3f3f;
  --red: #ff0000;
}

body {
  background-color: var(--main-bg);
  color: var(--text-color);
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--main-bg);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: none;
}

.logo span {
  color: var(--red);
}

.search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 40%;
}

.search input {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--secondary-bg);
  background-color: var(--secondary-bg);
  color: var(--text-color);
}

.user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.main-content {
  display: flex;
  margin-top: 4rem;
  padding: 2rem;
  overflow: hidden;
}

.sidebar {
  width: 240px;
  position: fixed;
  height: calc(100vh - 4rem);
  overflow-y: auto;
  padding-right: 1rem;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 10px;
}

.nav-item:hover {
  background-color: var(--hover-color);
}

.nav-item.active {
  background-color: var(--hover-color);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-left: 240px;
  width: 100%;
}

.video-card {
  cursor: pointer;
}

.thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  background-color: var(--secondary-bg);
}

.video-info {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.channel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.video-details h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.video-details p {
  color: var(--secondary-text);
  font-size: 0.9rem;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

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

.modal-content {
  background-color: var(--main-bg);
  border-radius: 8px;
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

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

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

.upload-area {
  border: 2px dashed var(--secondary-bg);
  border-radius: 8px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
}

.upload-area i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--secondary-text);
}

.upload-btn {
  background-color: var(--red);
  color: var(--text-color);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.upload-form {
  margin-top: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--secondary-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--secondary-bg);
  border: 1px solid var(--hover-color);
  border-radius: 4px;
  color: var(--text-color);
}

.progress-bar {
  width: 100%;
  height: 4px;
  background-color: var(--secondary-bg);
  border-radius: 2px;
  margin: 1rem 0;
}

.progress {
  height: 100%;
  background-color: var(--red);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

.cancel-btn {
  background-color: var(--secondary-bg);
  color: var(--text-color);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.edit-btn {
  background: none;
  border: none;
  color: var(--secondary-text);
  cursor: pointer;
  padding: 0.25rem;
}

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

.edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edit-form input,
.edit-form textarea {
  width: 100%;
  padding: 0.5rem;
  background-color: var(--secondary-bg);
  border: 1px solid var(--hover-color);
  border-radius: 4px;
  color: var(--text-color);
}

.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.edit-actions button {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.edit-actions button:first-child {
  background-color: var(--secondary-bg);
  color: var(--text-color);
}

.edit-actions button:last-child {
  background-color: var(--red);
  color: var(--text-color);
}

.description {
  margin-top: 0.5rem;
  color: var(--secondary-text);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.selected-file {
  margin-bottom: 1rem;
  color: var(--secondary-text);
}

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

.video-player-content {
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--main-bg);
  border-radius: 8px;
  position: relative;
}

.video-player-content::-webkit-scrollbar {
  display: none;
}

.video-player-content {
  -ms-overflow-style: none;  
  scrollbar-width: none;  
}

.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: black;
}

.video-player {
  width: 100%;
  height: 100%;
}

.video-details {
  padding: 1rem;
  border-bottom: 1px solid var(--secondary-bg);
}

.video-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.video-category {
  color: var(--secondary-text);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.video-stats {
  color: var(--secondary-text);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.video-description {
  color: var(--secondary-text);
  white-space: pre-wrap;
  margin-top: 1rem;
}

.comments-section {
  padding: 1rem;
}

.comments-section::-webkit-scrollbar {
  display: none;
}

.comments-section {
  -ms-overflow-style: none;  
  scrollbar-width: none;  
}

.comment-input {
  margin: 1rem 0;
}

.comment-input textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--secondary-bg);
  border: 1px solid var(--hover-color);
  border-radius: 4px;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.reply-indicator {
  background-color: var(--secondary-bg);
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reply-indicator button {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
}

.comment {
  margin: 1rem 0;
  padding: 1rem;
  background-color: var(--secondary-bg);
  border-radius: 4px;
}

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

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

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

.comment-time {
  color: var(--secondary-text);
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

.reply-btn {
  background: none;
  border: none;
  color: var(--secondary-text);
  cursor: pointer;
  padding: 0.5rem 0;
}

.replies {
  margin-left: 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--hover-color);
}

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

.thumbnail-btn {
  background-color: var(--secondary-bg);
  color: var(--text-color);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.5rem;
}

select {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--secondary-bg);
  border: 1px solid var(--hover-color);
  border-radius: 4px;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.docs-button {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: inherit;
  color: var(--text-color);
}

.docs-modal {
  max-width: 800px;
  max-height: 90vh;
}

.docs-content {
  padding: 1rem;
  overflow-y: auto;
}

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

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

.docs-content section {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--secondary-bg);
}

.docs-content h3 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.docs-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--secondary-text);
}

.docs-content ul, 
.docs-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-text);
}

.docs-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.docs-content code {
  background-color: var(--secondary-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
}

.docs-content ul ul {
  margin-top: 0.5rem;
  margin-left: 2rem;
}

.custom-video-player {
  position: relative;
  width: 100%;
  background: black;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.custom-video-player:fullscreen {
  width: 100vw;
  height: 100vh;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-video-player:fullscreen video {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
}

.custom-video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.custom-video-player:fullscreen .video-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2147483647;
}

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s;
  flex-wrap: wrap;
  justify-content: space-between;
}

.video-controls > * {
  margin-bottom: 5px;
}

.custom-video-player:hover .video-controls {
  opacity: 1;
}

.play-btn,
.volume-btn,
.fullscreen-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px;
}

.time-control {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 14px;
  min-width: 200px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  position: relative;
}

.progress-bar .progress {
  position: absolute;
  height: 100%;
  background: var(--red);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100px;
}

.volume-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.3);
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
}

.playback-rate-control {
  display: flex;
  gap: 5px;
}

.playback-rate-control button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 5px 8px;
  cursor: pointer;
  border-radius: 3px;
}

.playback-rate-control button:disabled {
  background: rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
}

.loop-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px;
}

.loop-btn .looping {
  color: var(--red);
}

.cinema-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px;
}

.cinema-btn .active {
  color: var(--red);
}

.custom-video-player.cinema-mode video {
  object-fit: contain;
}

.custom-video-player:fullscreen.cinema-mode video {
  object-fit: contain;
}

.personal-area {
  flex: 1;
  padding: 2rem;
  margin-left: 240px;
}

.personal-stats {
  background: var(--secondary-bg);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--secondary-text);
}

.user-videos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-select {
  padding: 0.5rem;
  background: var(--secondary-bg);
  border: 1px solid var(--hover-color);
  color: var(--text-color);
  border-radius: 4px;
}