/* Moments - Family Video Sharing */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #000;
  color: #fff;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Video Feed - TikTok Style */
.video-feed {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.video-feed::-webkit-scrollbar {
  display: none;
}

.video-item {
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.video-item video {
  max-height: 100dvh;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.video-info {
  position: absolute;
  bottom: 80px;
  left: 16px;
  right: 70px;
  z-index: 10;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.video-info .username {
  font-weight: 500;
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.video-info .title {
  font-size: 16px;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 4px;
}

.video-info .description {
  font-size: 12px;
  opacity: 0.7;
}

.video-info .date {
  font-size: 11px;
  opacity: 0.5;
  margin-top: 4px;
}

/* Action buttons */
.video-actions {
  position: absolute;
  right: 16px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 10;
  padding: 20px;
}

.video-actions button {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.video-actions button:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

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

/* Delete confirmation overlay */
.delete-confirm {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  backdrop-filter: blur(4px);
}

.delete-confirm p {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.delete-pin {
  width: 140px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 20px;
  text-align: center;
  letter-spacing: 8px;
  margin-bottom: 8px;
  outline: none;
}

.delete-pin:focus {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.12);
}

.delete-pin-error {
  color: #fc8181;
  font-size: 13px;
  margin-bottom: 12px;
}

.delete-confirm-actions {
  display: flex;
  gap: 12px;
}

.btn-delete-yes,
.btn-delete-no {
  padding: 10px 28px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete-yes {
  background: #e53e3e;
  color: #fff;
}

.btn-delete-yes:hover {
  background: #c53030;
}

.btn-delete-no {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.btn-delete-no:hover {
  background: rgba(255,255,255,0.25);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 32px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 20px;
  font-weight: 700;
}

.header-nav {
  display: flex;
  gap: 12px;
}

.header-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  transition: all 0.2s;
}

.header-nav a:hover {
  background: rgba(255,255,255,0.2);
}

/* Login Page */
.login-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 20px;
}

.login-container {
  background: rgba(255,255,255,0.05);
  padding: 40px;
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  backdrop-filter: blur(10px);
}

.login-container h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 28px;
}

.login-container p {
  text-align: center;
  opacity: 0.6;
  margin-bottom: 32px;
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  opacity: 0.8;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 16px;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Upload Page */
.upload-page {
  min-height: 100dvh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 20px;
}

.upload-container {
  max-width: 600px;
  margin: 0 auto;
  padding-top: 80px;
}

.upload-container h1 {
  margin-bottom: 24px;
}

.upload-area {
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 24px;
}

.upload-area:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.02);
}

.upload-area.dragover {
  border-color: #667eea;
  background: rgba(102,126,234,0.1);
}

.upload-area svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.upload-area p {
  opacity: 0.6;
  margin-bottom: 8px;
}

.upload-area .hint {
  font-size: 12px;
  opacity: 0.4;
}

#file-input {
  display: none;
}

.selected-file {
  background: rgba(255,255,255,0.05);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.selected-file .name {
  font-weight: 600;
  margin-bottom: 4px;
}

.selected-file .size {
  font-size: 12px;
  opacity: 0.5;
}

/* Upload buttons */
.upload-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
}

.btn-secondary:active {
  transform: scale(0.97);
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  text-align: center;
  padding: 40px;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  opacity: 0.3;
}

.empty-state h2 {
  margin-bottom: 8px;
  opacity: 0.8;
}

.empty-state p {
  opacity: 0.5;
  margin-bottom: 24px;
}

/* Upload status messages */
.upload-status {
  text-align: center;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 12px;
}

.upload-status-error {
  color: #fc8181;
  background: rgba(252, 129, 129, 0.1);
}

.upload-status-success {
  color: #68d391;
  background: rgba(104, 211, 145, 0.1);
}

.upload-status-info {
  color: #63b3ed;
  background: rgba(99, 179, 237, 0.1);
}

/* Progress bar */
.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 16px;
}

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

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 24px 32px;
  }
  
  .header h1 {
    font-size: 18px;
  }
  
  .header-nav a {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .video-info {
    padding: 24px;
    bottom: 60px;
    left: 12px;
    right: 50px;
  }
  
  .video-actions {
    right: 8px;
    bottom: 80px;
  }
  
  .video-actions button {
    width: 38px;
    height: 38px;
  }
}

/* Scroll indicator */
.scroll-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  text-align: center;
  opacity: 0.5;
  animation: bounce 2s infinite;
}

.scroll-hint svg {
  width: 24px;
  height: 24px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}
