*{
  box-sizing:border-box;
}

/* =========================
   IMAGE OVERLAY (LIGHTBOX)
   ========================= */

.img-overlay {
  display: none;              /* Standard: AUS */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 9999;

  justify-content: center;
  align-items: center;
}

.img-overlay img {
  max-width: 90vw;
  max-height: 90vh;

  width: auto;
  height: auto;

  object-fit: contain;

  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.img-overlay .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  user-select: none;
}

/* =========================
   BASE LAYOUT
   ========================= */

.container {
  width: 900px;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.2);
  border-radius: 0px 10px 10px 0px;
}

body{
  margin:0;
  font-family:Arial;
  background:#f4f4f4;
}

/* =========================
   HEADER
   ========================= */

header{
  background:#097390;
  color:white;
  padding:15px;
  text-align: center;
}

h1{margin:0;}

.userbar{
  font-size:12px;
  margin-top:5px;
}

.authbtn{
  color:white;
  opacity:0.7;
  margin-left:10px;
}

.authbtn:hover{
  opacity:1;
}

/* =========================
   UPLOAD
   ========================= */

.upload-box{
  background:white;
  padding:15px;
}

/* ⚠️ iOS ZOOM FIX */
input,button{
  width:100%;
  padding:12px;
  margin-top:10px;
  font-size:14px;
  border-radius: 3px;
}

/* 🔥 iOS input zoom prevention */
#uploadForm input,
#loginModal input {
  font-size: 16px;
}

/* =========================
   BUTTONS
   ========================= */

button{
  background:#c04b1d;
  border: 1px solid #c04b1d;
  color:white;
}

button:hover{
  color: #c04b1d;
  background: #fff;
}

button.del {
  margin: 0px;
  padding: 0px;
  background:#c04b1d;
  color: #fff;
}

button.del:hover{
  background:#000;
  color: #fff;
}

/* =========================
   GALLERY
   ========================= */

#gallery{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:10px;
  padding:10px;
}

.item{
  position:relative;
  border-radius:8px;
  overflow:hidden;
}

.item img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.overlay{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  background:rgba(0,0,0,0.5);
  color:white;
  font-size:11px;
  padding:5px;
}

.copy{font-weight:bold;}

.del{
  position:absolute;
  top:5px;
  right:5px;
  width:26px;
  height:26px;
  border-radius:50%;
  background:red;
  color:white;
  border:none;

  z-index:10;
  display:block !important;
}

/* =========================
   LOADER
   ========================= */

.loader{
  display:none;
  margin-top:10px;
  color:#097390;
}

/* =========================
   MODAL
   ========================= */

.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
}

.modal-content{
  background:white;
  padding:20px;
  margin:100px auto;
  max-width:300px;
}

/* =========================
   LOGIN FOOTER
   ========================= */

.login-footer{
  text-align:center;
  padding:20px;
}

.login-footer button{
  width:auto;
  background:#999;
  font-size:12px;
  color:#fff !important;
  border:0 !important;
}

.login-footer button:hover {
  border:0 !important;
  color:#fff !important;
  background:#ddd;
}

/* =========================
   SPECIAL
   ========================= */

.time{
  display:none;
}