/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f0f5;
  color: #222;
}

/* ===== NAVBAR ===== */
.navbar {
  background: #1f1b78;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.logo-area { display: flex; align-items: center; gap: 10px; }

.logo-area img {
  height: 36px; width: 36px;
  border-radius: 6px;
  object-fit: contain;
  background: white;
}

.brand-name {
  color: white;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}

.navbar nav { display: flex; align-items: center; gap: 4px; }

.navbar nav a {
  color: white;
  padding: 6px 14px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 4px;
  transition: background 0.2s;
}

.navbar nav a:hover { background: rgba(255,255,255,0.15); }

.navbar nav a.active {
  color: white;
  background: transparent;
  border-bottom: 3px solid white;
  border-radius: 0;
  padding-bottom: 3px;
}

/* ===== DROPDOWN ===== */
.dropdown { position: relative; display: inline-block; }

.dropbtn {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.5);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
}

.dropbtn:hover { background: rgba(255,255,255,0.15); border-color: white; }

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #1f1b78;
  min-width: 180px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  z-index: 9999;
  border: 2px solid rgba(255,255,255,0.25);
}

.dropdown-content a {
  display: block;
  padding: 13px 20px;
  text-decoration: none;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  transition: background 0.15s;
}

.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background: rgba(255,255,255,0.18); }
.dropdown:hover .dropdown-content { display: block; }

/* ===== SEARCH BAR ===== */
.search-bar input {
  padding: 7px 14px;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  outline: none;
  width: 180px;
  background: rgba(255,255,255,0.9);
}

/* ===== SLIDER WRAPPER — single centered small card ===== */
.slider-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px 20px 10px;
}

.slider-section {
  background: white;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  width: 100%;
  max-width: 360px;
}

/* ===== SLIDER ===== */
.slider-container {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  display: none;
}

.slider-container.active { display: block; }

.slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.slides img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(31,27,120,0.7);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.slider-btn:hover { background: rgba(31,27,120,0.95); }
.slider-btn.prev { left: 6px; }
.slider-btn.next { right: 6px; }

.slider-dots {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.dot.active { background: white; }

.no-images-msg {
  color: #aaa;
  font-size: 13px;
  text-align: center;
  padding: 30px 0;
}

/* ===== WINNERS SECTION ===== */
.winners-section { padding: 10px 20px 30px; }

.winners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* WINNER CARD */
.winner-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s;
}

.winner-card:hover { box-shadow: 0 4px 18px rgba(31,27,120,0.12); }

.winner-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #e0e0f0;
  background: #ddd;
}

.winner-info { flex: 1; }
.winner-info h3 { font-size: 16px; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; }
.winner-info p  { font-size: 13px; color: #888; margin-bottom: 10px; }

.view-prizes-btn {
  background: #1f1b78;
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.1s;
}

.view-prizes-btn:hover { background: #2e28a0; transform: translateY(-1px); }
.view-prizes-btn:active { transform: translateY(0); }

.no-winners-msg { text-align: center; color: #aaa; padding: 40px 0; }

/* ===== VERIFIED BADGE (public homepage) ===== */
.winner-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.verified-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ===== LOGIN PAGE ===== */
.login-container {
  width: 340px;
  margin: 100px auto;
  background: white;
  padding: 36px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.login-container h2 { color: #1f1b78; margin-bottom: 24px; font-size: 22px; }

.login-container input {
  width: 100%;
  padding: 10px 14px;
  margin: 7px 0;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.login-container input:focus { border-color: #1f1b78; }

.login-container button {
  width: 100%;
  padding: 11px;
  margin-top: 18px;
  background: #1f1b78;
  color: white;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}

.login-container button:hover { background: #2e28a0; }

/* ===== SAVE TOAST ===== */
.save-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a7a3a;
  color: white;
  padding: 13px 28px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 9999;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== SAVE BADGE ===== */
.save-badge {
  background: #e6f7ec;
  color: #1a7a3a;
  border: 1.5px solid #a3d9b1;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  align-self: flex-start;
}

/* ===== CARD HEADER ===== */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}

.card-header > div:first-child { flex: 1; }

/* ===== IMG COUNT ===== */
.img-count-info { font-size: 12px; color: #888; margin-bottom: 10px; }
.img-count-info.ready { color: #1a7a3a; font-weight: 600; }
.img-count-info.warn  { color: #b85c00; font-weight: 600; }

/* ===== SAVED LABEL ===== */
.saved-label { display: block; font-size: 11px; color: #1a7a3a; font-weight: 600; margin-top: 4px; }

/* ===== BTN ROW ===== */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }

/* ===== FORM ROW ===== */
.form-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ===== PREVIEW LINK ===== */
.preview-link {
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,0.15);
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.2s;
}
.preview-link:hover { background: rgba(255,255,255,0.3); }

/* ===== ADMIN DASHBOARD ===== */
.dashboard-container { max-width: 860px; margin: 32px auto; padding: 0 20px 60px; }
.dash-title { font-size: 26px; color: #1f1b78; margin-bottom: 6px; }
.dash-subtitle { font-size: 13px; color: #888; margin-bottom: 28px; }

.admin-card {
  background: white;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.admin-card h2 { font-size: 17px; font-weight: 700; color: #1f1b78; margin-bottom: 4px; }
.admin-card p  { font-size: 13px; color: #777; margin-bottom: 0; }

.upload-btn {
  display: inline-block;
  background: #1f1b78;
  color: white;
  padding: 9px 20px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-right: 10px;
  margin-top: 8px;
}

.upload-btn:hover { background: #2e28a0; }
.upload-btn input[type="file"] { display: none; }
.upload-btn.small-btn { padding: 7px 14px; font-size: 12px; }

.danger-btn {
  background: #cc2200;
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.danger-btn:hover { background: #aa1a00; }

.primary-btn {
  background: #1f1b78;
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.primary-btn:hover { background: #2e28a0; }

.admin-nav-btn {
  background: #cc2200;
  color: white;
  border: none;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-nav-btn:hover { background: #aa1a00; }

.img-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }

.thumb-wrap { position: relative; width: 90px; height: 70px; border-radius: 8px; overflow: visible; }

.thumb-wrap img {
  width: 90px; height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #ddd;
}

.thumb-remove {
  position: absolute;
  top: -6px; right: -6px;
  background: #cc2200;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.current-logo-preview { margin-bottom: 14px; }
.current-logo-preview img { height: 60px; border-radius: 8px; border: 2px solid #ddd; object-fit: contain; }

.add-winner-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  margin-bottom: 24px;
}

.add-winner-form input[type="text"] {
  padding: 9px 14px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.add-winner-form input[type="text"]:focus { border-color: #1f1b78; }

.admin-winners-list { display: flex; flex-direction: column; gap: 12px; }

.admin-winner-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8f8fc;
  border-radius: 10px;
  padding: 12px 16px;
}

.admin-winner-row img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid #ddd; }

.admin-winner-info { flex: 1; }
.admin-winner-info strong { font-size: 14px; display: block; }
.admin-winner-info span  { font-size: 12px; color: #888; }

.delete-winner-btn {
  background: #cc2200;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.delete-winner-btn:hover { background: #aa1a00; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .winners-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .slider-wrapper { padding: 12px 12px 6px; }
  .slider-section { max-width: 100%; }
  .slider-container { height: 160px; }
  .winners-grid { grid-template-columns: 1fr; }
  .navbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px; }
  .search-bar input { width: 100%; }
  .winner-card { padding: 14px; gap: 12px; }
  .winner-avatar { width: 56px; height: 56px; }
}
