/* Shared styles for Fan Shooting Experience */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  background-image: url('/resources/UCLF_2026_Poster_Landscape_RGB.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(13, 13, 30, 0.85);
  border-radius: 16px;
}

/* Header */
header {
  margin-bottom: 2rem;
}

.back-link {
  display: inline-block;
  color: #a0a0a0;
  text-decoration: none;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

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

h1 {
  font-size: 1.75rem;
  font-weight: 600;
}

/* Upload page */
.upload-area {
  max-width: 500px;
  margin: 0 auto;
}

.file-picker {
  margin-bottom: 1.5rem;
}

.file-picker input[type="file"] {
  display: none;
}

.file-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  border: 2px dashed #4a4a6a;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.file-label:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.file-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.file-text {
  color: #a0a0a0;
}

.file-name {
  margin-top: 1rem;
  text-align: center;
  color: #667eea;
  word-break: break-all;
}

.upload-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.upload-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

/* Progress bar */
.progress-container {
  margin-top: 1.5rem;
}

.progress-bar {
  height: 8px;
  background: #2a2a4a;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  margin-top: 0.5rem;
  color: #a0a0a0;
  font-size: 0.9rem;
}

/* Status messages */
.status {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.status:empty {
  display: none;
}

.status.success {
  background: rgba(46, 204, 113, 0.2);
  border: 1px solid #2ecc71;
}

.status.error {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid #e74c3c;
}

.url-display {
  margin-top: 0.5rem;
  word-break: break-all;
  font-size: 0.85rem;
}

.url-display a {
  color: #667eea;
}

/* Gallery */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #a0a0a0;
}

.upload-link {
  display: inline-block;
  margin-top: 1rem;
  color: #667eea;
  text-decoration: none;
}

.upload-link:hover {
  text-decoration: underline;
}

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

.clip-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  padding: 1rem;
}

.clip-card video,
.clip-card img {
  pointer-events: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.clip-video {
  width: 100%;
  border-radius: 8px;
  background: #000;
}

.qr-container {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  background: #fff;
  border-radius: 8px;
  padding: 0.5rem;
}

.qr-container canvas {
  display: block;
}

.clip-name {
  text-align: center;
  font-size: 0.85rem;
  color: #a0a0a0;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1rem 0;
}

.pagination[hidden] { display: none; }

.page-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-info {
  color: #a0a0a0;
  font-size: 0.95rem;
}

.clip-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.clip-modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.9); }
.modal-content { position: relative; z-index: 1; width: 90%; max-width: 500px; background: #1a1a2e; border-radius: 16px; padding: 1.5rem; text-align: center; }
.modal-close { position: absolute; top: 0.5rem; right: 0.75rem; background: none; border: none; color: #a0a0a0; font-size: 2rem; cursor: pointer; }
.modal-close:hover { color: #fff; }
.modal-video { width: 100%; max-height: 50vh; border-radius: 8px; background: #000; margin-bottom: 1.5rem; }
.modal-qr { display: flex; justify-content: center; background: #fff; border-radius: 12px; padding: 1rem; margin-bottom: 0.75rem; }
.modal-hint { color: #a0a0a0; font-size: 0.9rem; }
.modal-delete { padding: 0.5rem 1.5rem; font-size: 0.85rem; color: #ff6b6b; background: none; border: 1px solid #ff6b6b; border-radius: 8px; cursor: pointer; margin-top: 1rem; }
.modal-delete:hover { background: rgba(255, 107, 107, 0.1); }

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .file-label {
    padding: 2rem 1rem;
  }

  .clips-grid {
    grid-template-columns: 1fr;
  }
}
