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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #0f0f0f;
  color: #f1f1f1;
  line-height: 1.6;
}

/* Make all links white regardless of visited state */
a,
a:visited,
a:link {
  color: #f1f1f1;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

header,
footer {
  padding: 20px 0;
  border-bottom: 1px solid #303030;
  margin-bottom: 30px;
}

footer {
  border-bottom: none;
  border-top: 1px solid #303030;
  margin-bottom: 0;
  margin-top: 60px;
  text-align: center;
}

header h1 {
  font-size: 36px;
  font-weight: 500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.header-icon {
  height: 48px;
  object-fit: contain;
}

header h1 a,
footer a {
  color: #f1f1f1;
  text-decoration: none;
}

header h1 a:hover,
footer a:hover {
  color: #fff;
}

/* Video player styles */
.video-wrapper {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto 30px;
}

.video-container {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.video-container video {
  width: 100%;
  height: auto;
  display: block;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 1;
  transition: opacity 0.3s;
  pointer-events: none;
}

.video-overlay.hidden {
  opacity: 0;
}

.play-button {
  background: none;
  border: none;
  cursor: pointer;
  pointer-events: all;
  transition: transform 0.2s;
}

.play-button:hover {
  transform: scale(1.1);
}

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

.video-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #202020;
  border-radius: 0 0 12px 12px;
}

.control-button {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.control-button:hover {
  opacity: 0.7;
}

.progress-bar {
  flex: 1;
  height: 5px;
  background: #404040;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

.progress-filled {
  height: 100%;
  background: #3ea6ff;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.time-display {
  color: #aaa;
  font-size: 13px;
  min-width: 100px;
  text-align: center;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.volume-slider-container {
  width: 0;
  overflow: hidden;
  transition: width 0.3s ease;
}

.volume-control:hover .volume-slider-container {
  width: 80px;
}

.volume-slider {
  width: 80px;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: #404040;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

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

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #3ea6ff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.video-info {
  margin-top: 20px;
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 0;
}

.title-section {
  flex: 1;
  min-width: 0;
}

.video-info h2 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 10px;
}

.video-info .metadata {
  color: #aaa;
  font-size: 14px;
}

.video-info .metadata .author {
  color: #f1f1f1;
  font-weight: 500;
}

.video-description {
  margin-top: 16px;
  color: #f1f1f1;
  font-size: 15px;
  line-height: 1.5;
}

.video-stats {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #303030;
}

.video-stats h3 {
  font-size: 14px;
  font-weight: 500;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 13px;
  color: #aaa;
  font-weight: 500;
}

.stat-value {
  font-size: 14px;
  color: #f1f1f1;
  font-family: 'Courier New', Courier, monospace;
}

.video-music,
.video-links {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #303030;
}

.video-music h3,
.video-links h3 {
  font-size: 14px;
  font-weight: 500;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.music-details {
  color: #f1f1f1;
}

.music-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.music-artist {
  font-size: 15px;
  color: #ccc;
  margin-bottom: 2px;
}

.music-album {
  font-size: 14px;
  color: #aaa;
  font-style: italic;
}

.video-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.video-links li {
  margin-bottom: 8px;
}

.video-links a {
  color: #3ea6ff;
  text-decoration: none;
  font-size: 14px;
  word-break: break-all;
}

.video-links a:hover {
  text-decoration: underline;
}

/* Index page grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.video-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.video-card:hover {
  transform: scale(1.02);
}

.video-card a {
  text-decoration: none;
  color: inherit;
}

.video-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: #181818;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.video-thumbnail video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card-info h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-card-info .metadata {
  color: #aaa;
  font-size: 14px;
}

/* Download button */
.video-download {
  flex-shrink: 0;
}

.download-button {
  display: inline-block;
  padding: 10px 16px;
  background: #3ea6ff;
  color: #0f0f0f;
  text-decoration: none;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
  white-space: nowrap;
}

.download-button:hover {
  background: #4fb3ff;
}

/* Other videos section */
.other-videos-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #303030;
}

.other-videos-section > h3 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 20px;
}

/* Back link */
.back-link {
  display: inline-block;
  color: #3ea6ff;
  text-decoration: none;
  margin-bottom: 20px;
  font-size: 14px;
}

.back-link:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }

  .container {
    padding: 15px;
  }

  .title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .video-download {
    width: 100%;
  }

  .download-button {
    width: 100%;
    text-align: center;
  }
}
