.pv-alert { padding: 12px 16px; border-radius: 6px; margin: 12px 0; }
.pv-success { background: #e8f5e9; border-left: 4px solid #66bb6a; }
.pv-error { background: #ffebee; border-left: 4px solid #ef5350; }
.pv-warning { background: #fff8e1; border-left: 4px solid #ffca28; }

.pv-btn { background: #EE7622; color: #fff; border: none; padding: 10px 16px; border-radius: 8px; cursor: pointer; transition: transform .05s ease, opacity .2s ease; }
.pv-btn:hover { opacity: .9; }
.pv-btn:active { transform: scale(0.98); }
.pv-btn[disabled] { opacity: .5; cursor: not-allowed; }
.pv-btn-outline { background: transparent; color: #EE7622; border: 2px solid #EE7622; }

.pv-frontend .pv-login-block { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 12px 0 20px; }
.pv-login-heading { font-size: 1rem; font-weight: 600; margin: 2px 0 6px; color: #333; width: 100%; }
@media (max-width: 480px){ .pv-login-heading { font-size: .95rem; } }
.pv-login-form .pv-field { margin-bottom: 10px; }
.pv-login-form input[type=text],
.pv-login-form input[type=email] { width: 260px; max-width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.pv-login-form .pv-terms { font-size: .95em; }

.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pv-card { background: #fff; border: 1px solid #eee; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.pv-card-media img { width: 100%; height: auto; display: block; }
.pv-card-body { padding: 12px; }
.pv-poster-id { font-size: .85em; color: #666; }
.pv-title { margin: 4px 0 6px; font-size: 1rem; line-height: 1.25; }
.pv-authors { font-size: .9em; color: #555; margin-bottom: 8px; }

.pv-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pv-res-card { border: 1px solid #eee; border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.pv-res-media img { width: 100%; height: auto; display: block; }
.pv-res-body { padding: 12px; }
.pv-res-rank { font-size: 1.2em; font-weight: 700; }
.pv-top { box-shadow: 0 0 0 3px rgba(238,118,34,.2) inset; }

/* Lightbox */
.pv-lightbox { position: fixed; inset: 0; z-index: 100000; display:none; }
.pv-lightbox-backdrop { position:absolute; inset:0; background: rgba(0,0,0,.7); }
.pv-lightbox-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); max-width: 95vw; max-height: 90vh; }
.pv-lightbox-content img { max-width: 95vw; max-height: 90vh; display:block; border-radius: 8px; background:#fff; }

/* Close button — prettier, mobile-friendly */
.pv-lightbox-close {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100001;
  background: linear-gradient(180deg,#ff5a5f,#e53935);
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 54px;
  height: 54px;
  font-size: 28px;
  font-weight: 700;
  line-height: 52px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.32);
  transition: transform .08s ease, filter .15s ease;
}
.pv-lightbox-close:hover { filter: brightness(.95); }
.pv-lightbox-close:active { transform: scale(.98); }
@media (max-width: 480px){
  .pv-lightbox-close{ width: 60px; height: 60px; font-size: 30px; line-height: 58px; }
}

/* Voted marker */
.pv-card-voted { box-shadow: 0 0 0 3px rgba(102,187,106,.35) inset; }
.pv-voted-badge { position: absolute; top: 10px; right: 10px; background: #66bb6a; color:#fff; padding: 4px 8px; border-radius: 999px; font-size: .85em; }


/* --- PV override v1.3.3: responsive close button with localized text --- */
.pv-lightbox { position: fixed; inset: 0; z-index: 100000; }
.pv-lightbox-close{
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  min-height: 36px;
  max-width: calc(100vw - 32px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(12px, 2.8vw, 16px);
  line-height: 1.1;
  color: #fff;
  background: linear-gradient(180deg,#ff5a5f,#e53935);
  box-shadow: 0 10px 24px rgba(0,0,0,.32);
  z-index: 100001;
}
@supports (backdrop-filter: blur(6px)){
  .pv-lightbox-close{ backdrop-filter: blur(4px); }
}
/* ensure backdrop/content don't cover the button */
.pv-lightbox-backdrop{ z-index: 99998; }
.pv-lightbox-content{ z-index: 99999; }
