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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #000;
  color: white;
  overflow: hidden;
}

#player-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading {
  text-align: center;
  color: #fff;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #333;
  border-top: 4px solid #4285f4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error {
  text-align: center;
  color: #ff6b6b;
  padding: 20px;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error p {
  font-size: 18px;
  margin-bottom: 8px;
}

.error small {
  color: #ccc;
  font-size: 12px;
}

.hidden {
  display: none !important;
}

.player {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

#video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

#video-element:hover {
  cursor: pointer;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
}

.top-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ad-badge {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.dv360-logo {
  background: #4285f4;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}

.bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 20px 16px 16px;
  pointer-events: auto;
  z-index: 20;
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.progress-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.progress-fill {
  height: 100%;
  background: #4285f4;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s;
}

.time-display {
  font-size: 12px;
  color: #ccc;
  white-space: nowrap;
}

.click-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.click-overlay.show-hint {
  opacity: 1;
  pointer-events: auto;
}

.click-hint {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .top-bar,
  .bottom-bar {
    padding: 12px;
  }

  .controls {
    gap: 8px;
  }

  .time-display {
    font-size: 10px;
  }

  .ad-badge,
  .dv360-logo {
    font-size: 10px;
    padding: 3px 6px;
  }

  .control-btn {
    padding: 6px;
    font-size: 14px;
  }

  .progress-bar {
    height: 6px;
  }

  .click-hint {
    font-size: 11px;
    padding: 6px 12px;
  }
}

@media (max-height: 400px) {
  .top-bar {
    top: 8px;
  }

  .bottom-bar {
    padding: 8px 12px 6px;
  }

  .ad-badge,
  .dv360-logo {
    font-size: 9px;
    padding: 2px 6px;
  }
}

/* Ensure responsive behavior */
@media (orientation: portrait) {
  #video-element {
    object-fit: cover;
  }
}
