body { font-family: Arial, Helvetica, sans-serif; max-width: 900px; margin: 24px auto; padding: 0 12px; }
h1 { font-size: 1.4rem; margin: 0; }

/* Login */
body.login-page { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; max-width: none; background: #f5f5f5; }
.login-box { background: #fff; padding: 40px; border: 1px solid #ddd; border-radius: 8px; width: 300px; text-align: center; }
.login-box h1 { margin-bottom: 24px; }
.login-box input { display: block; width: 100%; margin: 8px 0; padding: 8px 10px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; font-size: 0.95rem; }
.login-box button { width: 100%; padding: 9px; margin-top: 12px; background: #333; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 0.95rem; }
.login-box button:hover { background: #111; }
.error { color: #c00; font-size: 0.85rem; margin-top: 8px; min-height: 1.2em; }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
#logoutBtn { padding: 6px 14px; background: #666; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
#logoutBtn:hover { background: #333; }

/* Upload form */
form { margin-bottom: 16px; }

/* Gallery */
#gallery { display: flex; flex-wrap: wrap; }
.media-item { position: relative; margin: 8px; }

.media-item img {
  max-width: 200px; display: block;
  border: 1px solid #ddd; border-radius: 4px;
  cursor: zoom-in;
}

.video-thumb {
  position: relative; display: inline-block;
  cursor: zoom-in; border: 1px solid #ddd; border-radius: 4px; overflow: hidden;
}
.video-thumb video { max-width: 200px; display: block; pointer-events: none; }
.play-icon {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: #fff;
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
  background: rgba(0,0,0,0.2);
  transition: background 0.15s;
}
.video-thumb:hover .play-icon { background: rgba(0,0,0,0.4); }

.delete-btn {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.55); color: #fff;
  border: none; border-radius: 50%;
  width: 26px; height: 26px;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.media-item:hover .delete-btn { opacity: 1; }
.delete-btn:hover { background: #c00; }

/* Lightbox */
#lightbox {
  display: none;
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center; justify-content: center;
}
#lightbox-content { display: flex; align-items: center; justify-content: center; }
#lightbox-content img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 4px; display: block; }
#lightbox-content video { max-width: 92vw; max-height: 92vh; border-radius: 4px; display: block; }
#lightbox-close {
  position: fixed; top: 16px; right: 22px;
  color: #fff; font-size: 32px;
  cursor: pointer; opacity: 0.8; line-height: 1;
  z-index: 10000;
}
#lightbox-close:hover { opacity: 1; }
