* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f1115;
  color: #f0f0f0;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-box {
  background: #1a1d24;
  padding: 2.5rem;
  border-radius: 12px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-box h1 { margin: 0 0 1rem; font-size: 1.4rem; text-align: center; }
.auth-box label { font-size: 0.85rem; color: #aaa; margin-top: 0.5rem; }
.auth-box input {
  padding: 0.7rem;
  border-radius: 6px;
  border: 1px solid #333;
  background: #0f1115;
  color: #fff;
}

.auth-box button, .upload-box button, .copy-btn, .delete-btn {
  margin-top: 1rem;
  padding: 0.7rem;
  border: none;
  border-radius: 6px;
  background: #4a7dff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.delete-btn { background: #d9534f; margin-top: 0; }
.error { color: #ff6b6b; font-size: 0.9rem; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #1a1d24;
}

.brand { color: #fff; text-decoration: none; font-weight: 600; }
.logout-link { color: #ff6b6b; text-decoration: none; }

.container { max-width: 900px; margin: 0 auto; padding: 1.5rem; }

.upload-box {
  background: #1a1d24;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.upload-box form { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

.progress-bar {
  margin-top: 1rem;
  height: 10px;
  background: #0f1115;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #4a7dff;
  transition: width 0.2s ease;
}

#upload-progress { margin-top: 0.5rem; font-size: 0.85rem; color: #aaa; }

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

.video-card { background: #1a1d24; border-radius: 10px; overflow: hidden; }
.video-card video { width: 100%; display: block; background: #000; max-height: 220px; }
.video-card-body { padding: 0.8rem; display: flex; flex-direction: column; gap: 0.6rem; }

.share-link {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #333;
  background: #0f1115;
  color: #ccc;
  font-size: 0.8rem;
}

.video-card-actions { display: flex; gap: 0.6rem; }
.video-card-actions form { flex: 1; }
.video-card-actions button { width: 100%; margin: 0; padding: 0.5rem; }

.watch-container { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }
.watch-container video { width: 100%; border-radius: 10px; background: #000; }


.success { color: #58d68d; font-size: 0.9rem; }
.redirect-settings {
  background: #1a1d24;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
}
.redirect-settings h2 { margin-top: 0; }
.redirect-settings p { color: #aaa; }
.redirect-form { display: flex; flex-direction: column; gap: 0.8rem; }
.redirect-form input {
  width: 100%;
  padding: 0.7rem;
  border-radius: 6px;
  border: 1px solid #333;
  background: #0f1115;
  color: #fff;
}
.redirect-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.redirect-actions button { margin-top: 0; }
.redirect-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #0f1115;
  color: #f0f0f0;
  padding: 2rem;
}
.redirect-screen h1 { margin: 1rem 0 0.35rem; font-size: 1.35rem; }
.redirect-screen p { margin: 0; color: #aaa; }
.loader {
  width: 52px;
  height: 52px;
  border: 5px solid #2b303a;
  border-top-color: #4a7dff;
  border-radius: 50%;
  animation: gif-share-spin 0.8s linear infinite;
}
@keyframes gif-share-spin { to { transform: rotate(360deg); } }
.crawler-fallback {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.crawler-fallback img { max-width: 100%; max-height: 100vh; width: auto; height: auto; display: block; }
@media (max-width: 600px) {
  .redirect-actions { flex-direction: column; }
  .redirect-actions button { width: 100%; }
}
