/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: #000;
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
  overflow-x: hidden;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(0,0,0,0.9);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 4%;
  background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
  transition: background 0.3s ease;
}

.navbar.scrolled {
  background: rgba(0,0,0,0.9);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: #e50914;
}

.nav-brand i {
  font-size: 1.8rem;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #e50914;
}

.nav-actions {
  display: flex;
  gap: 1rem;
}

.cta-btn i {
  margin-right: 0.5rem;
}

.search-btn,
.profile-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 0.3s ease;
  background: rgba(255,255,255,0.1);
}

.search-btn:hover,
.profile-btn:hover {
  background: rgba(255,255,255,0.2);
}

/* Video Library */
.video-library {
  margin-top: 60px;
  min-height: calc(100vh - 60px);
}

.hero-section {
  height: 90vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
  position: relative;
  overflow: hidden;
  padding: 0 5%;
  padding-bottom: 10vh;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 20%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 50%;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
}

.cta-btn {
  background: #e50914;
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.cta-btn:hover {
  background: #f40612;
  transform: scale(1.05);
}

/* Content Sections */
.content-sections {
  padding: 2rem 4%;
}

.content-row {
  margin-bottom: 3rem;
}

.content-row h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #fff;
  padding-left: 1rem;
  border-left: 4px solid #e50914;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: #181818;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.video-card:hover {
  transform: scale(1.08);
  box-shadow: 0 20px 40px rgba(0,0,0,0.7);
  z-index: 10;
}

.video-card:hover .video-info {
  opacity: 1;
  transform: translateY(0);
}

.video-thumbnail {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.1);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.video-overlay i {
  font-size: 3rem;
  color: #fff;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.video-card:hover .video-overlay i {
  transform: scale(1);
}

.video-info {
  padding: 1rem;
  background: #181818;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.video-info p {
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.4;
}

/* VR Player */
.vr-player {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(255,255,255,0.2);
  display: flex;
  flex-direction: column;
}

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

.player-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.back-btn,
.vr-toggle-btn {
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

.back-btn:hover,
.vr-toggle-btn:hover {
  background: rgba(255,255,255,0.2);
}

#videoTitle {
  font-size: 1.2rem;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#viewer {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Modern Video Controls */
.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
  padding: 1.5rem 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vr-player:hover .video-controls,
.vr-player:focus-within .video-controls {
  opacity: 1;
}

.controls-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.control-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.1s ease;
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.control-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

.control-btn:active {
  transform: scale(1);
}

.play-pause-btn {
  background: rgba(229, 9, 20, 0.8);
  border-color: transparent;
}

.play-pause-btn:hover {
  background: #e50914;
}

.progress-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #ccc;
  padding: 0 5px;
}

.progress-bar {
  position: relative;
  height: 5px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  cursor: pointer;
  transition: height 0.2s ease;
}

.progress-bar:hover {
  height: 8px;
}

.seek-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #e50914;
  border-radius: 2px;
  transition: width 0.1s ease;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.volume-slider {
  position: relative;
  width: 0;
  opacity: 0;
  transition: width 0.3s ease, opacity 0.2s ease;
  margin-left: -1rem;
}

.volume-btn:hover + .volume-slider,
.volume-slider:hover {
  width: 80px;
  opacity: 1;
  margin-left: 0;
}

.volume-slider input {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.speed-btn {
  position: relative;
}

.speed-menu {
  position: absolute;
  bottom: 120%;
  right: 0;
  background: rgba(20,20,20,0.95);
  border-radius: 8px;
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.speed-btn:hover .speed-menu {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.speed-menu button {
  background: none;
  border: none;
  color: #fff;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s ease;
  white-space: nowrap;
}

.speed-menu button:hover,
.speed-menu button.active {
  background: #e50914;
}

/* Fullscreen Styles */
.vr-player:fullscreen .video-controls {
  padding-bottom: 4rem;
}

.vr-player:fullscreen .player-header {
  padding-top: 2rem;
}

.vr-player:fullscreen .hero-content h1 {
  font-size: 2.5rem;
}

.vr-player:fullscreen .hero-content {
  max-width: 80%;
}

.vr-player:fullscreen .hero-content p {
  font-size: 1rem;
}

.vr-player:fullscreen .content-sections {
  padding: 1rem 2%;
}

.vr-player:fullscreen .video-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.vr-player:fullscreen .controls-main {
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 1.5rem;
}

.vr-player:fullscreen .progress-container {
  order: -1;
  width: 100%;
}

.vr-player:fullscreen .controls-right {
  width: 100%;
  justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem 2%;
  }
  
  .nav-menu {
    display: none;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1.2rem;
  }
  
  .content-sections {
    padding: 1rem 2%;
  }
  
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .controls-main {
    flex-direction: column;
    gap: 1rem;
  }
  
  .controls-right {
    width: 100%;
    justify-content: center;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Three.js Canvas Styles */
#viewer canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #181818 0%, #e50914 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1);
}

.splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 3rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 2rem;
  letter-spacing: 2px;
  text-shadow: 0 4px 24px #e50914, 0 1px 2px #000;
  animation: splash-pop 1s cubic-bezier(.4,0,.2,1);
}

@keyframes splash-pop {
  0% { transform: scale(0.7); opacity: 0; }
  80% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.loader {
  width: 60px;
  height: 60px;
  border: 6px solid #fff2;
  border-top: 6px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 24px #e50914;
}

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