:root{
  --bg: #09090d;
  --bg2: #111219;
  --text: rgba(255,255,255,0.94);
  --muted: rgba(255,255,255,0.66);
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.18);
  --card: rgba(255,255,255,0.06);
  --shadow: 0 24px 70px rgba(0,0,0,0.40);
  --radius: 22px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(1000px 700px at 10% 0%, rgba(255,255,255,0.08), transparent 55%),
    radial-gradient(900px 700px at 90% 10%, rgba(203,175,255,0.08), transparent 50%),
    linear-gradient(180deg, #07080b, #0c0d12 45%, #09090d);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x:hidden;
}

/* sfondi */
.bg-orb{
  position:fixed;
  border-radius:999px;
  filter:blur(90px);
  opacity:.22;
  pointer-events:none;
  z-index:0;
}
.bg-orb--1{
  width:340px;
  height:340px;
  background:#8f6aff;
  top:-80px;
  left:-60px;
}
.bg-orb--2{
  width:280px;
  height:280px;
  background:#f6b2d1;
  right:-60px;
  top:160px;
}

/* layout */
.wrap{
  max-width:1240px;
  margin:0 auto;
  padding:0 20px 30px;
  position:relative;
  z-index:1;
}

/* header */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:20px 24px;
  backdrop-filter: blur(18px);
  background: rgba(8,9,13,0.55);
  border-bottom:1px solid var(--line);
}

.brand__eyebrow{
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.18em;
  margin-bottom:8px;
}

.brand__title{
  font-family:"Playfair Display", serif;
  font-size:34px;
  line-height:1.05;
  font-weight:700;
  letter-spacing:.01em;
}

.brand__subtitle{
  margin-top:8px;
  color:var(--muted);
  font-size:14px;
}

.topbar__actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

/* bottoni */
.btn{
  border:1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color:var(--text);
  padding:11px 16px;
  border-radius:999px;
  cursor:pointer;
  transition:transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  font-weight:600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
}
.btn:hover{
  transform:translateY(-1px);
  background: rgba(255,255,255,0.10);
  border-color:var(--line-strong);
}
.btn:disabled{
  opacity:.5;
  cursor:not-allowed;
  transform:none;
}

.btn--primary{
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(236,236,236,0.96));
  color:#0b0c10;
  border-color:transparent;
}
.btn--primary:hover{
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(244,244,244,1));
}

.btn--ghost{
  background: rgba(255,255,255,0.06);
}

.btn--icon{
  width:48px;
  height:48px;
  min-width:48px;
  padding:0;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  background: rgba(255,255,255,0.07);
  border:1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}

.btn--upload{
  padding:12px 18px;
  border-radius:16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  border:1px solid rgba(255,255,255,0.14);
}

.music-btn{
  position:static;
  min-width:48px;
  backdrop-filter: blur(10px);
}

/* hero */
.hero{
  padding-top:40px;
  padding-bottom:24px;
}

.hero__content{
  max-width:100%;
}

.hero__kicker{
  margin:0 0 12px;
  color:#d8c7ff;
  text-transform:uppercase;
  letter-spacing:.18em;
  font-size:12px;
}

.hero h1{
  margin:0;
  font-family:"Playfair Display", serif;
  font-size:clamp(38px, 6vw, 72px);
  line-height:.98;
  letter-spacing:-0.02em;
}

.hero__text{
  margin:18px 0 0;
  color:var(--muted);
  font-size:18px;
  line-height:1.7;
  max-width:800px;
}

/* video hero */
.hero-video-card{
  position:relative;
  overflow:hidden;
  width:100%;
  max-width:780px;
  margin:0 auto 28px;
  min-height:320px;
  border-radius:30px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  isolation:isolate;
}

.hero-video{
  display:block;
  width:100%;
  object-fit:cover;
  background:#000;
}

.hero-video-card__overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(
    180deg,
    rgba(10,10,14,0.08) 0%,
    rgba(10,10,14,0.16) 35%,
    rgba(10,10,14,0.62) 100%
  );
  pointer-events:none;
}

.hero-video-card__content{
  position:absolute;
  left:24px;
  bottom:22px;
  z-index:2;
  display:flex;
  flex-direction:column;
  gap:10px;
  pointer-events:none;
}

.hero-video-card__label{
  display:inline-flex;
  align-items:center;
  width:fit-content;
  min-height:28px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.85);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.18em;
  backdrop-filter: blur(8px);
}

.hero-video-card__title{
  font-family:"Playfair Display", serif;
  font-size:36px;
  line-height:1;
  color:#fff;
  text-shadow: 0 6px 20px rgba(0,0,0,0.28);
}

/* pannello upload */
.panel{
  max-width:1240px;
  margin:0 auto 26px;
  padding:22px;
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.035));
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter: blur(10px);
}

.hidden{ display:none; }

.panel__head h2{
  margin:0;
  font-family:"Playfair Display", serif;
  font-weight:700;
  font-size:30px;
}
.panel__head p{
  margin:8px 0 0;
  color:var(--muted);
}

.formgrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:18px;
}

.field span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:7px;
}

.field input{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,0.22);
  color:var(--text);
  outline:none;
}

.dropzone{
  margin-top:14px;
  border-radius:18px;
  border:1px dashed rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.03);
  padding:24px 18px;
  transition: background .15s ease, border-color .15s ease;
}
.dropzone.dragover{
  border-color: rgba(255,255,255,0.46);
  background: rgba(255,255,255,0.08);
}
.dropzone__title{
  font-size:18px;
  font-weight:700;
  margin-bottom:6px;
}
.dropzone__hint{
  color:var(--muted);
  font-size:14px;
}

.panel__actions{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:16px;
  flex-wrap:wrap;
}
.spacer{ flex:1; }
.summary{
  color:var(--muted);
  font-size:13px;
}

.uploadlist{
  margin-top:16px;
  display:grid;
  gap:10px;
}

.uprow{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(255,255,255,0.04);
}
.uprow .name{
  flex:1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.uprow .meta{
  color:var(--muted);
  font-size:12px;
}

.bar{
  width:160px;
  height:8px;
  border-radius:999px;
  background: rgba(255,255,255,0.10);
  overflow:hidden;
}
.bar > i{
  display:block;
  height:100%;
  width:0%;
  background: linear-gradient(90deg, #ffffff, #d8c7ff);
}

.status{
  margin-top:14px;
  color:var(--muted);
  font-size:13px;
  white-space:pre-wrap;
}

/* album cards */
.albums{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
  margin:12px 0 28px;
}

.album-card{
  position:relative;
  overflow:hidden;
  min-height:360px;
  border-radius:30px;
  border:1px solid rgba(255,255,255,0.14);
  padding:0;
  text-align:left;
  cursor:pointer;
  isolation:isolate;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  background-color:#12131a;
}
.album-card:hover{
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 30px 80px rgba(0,0,0,0.38);
  border-color: rgba(255,255,255,0.24);
}
.album-card.active{
  border-color: rgba(255,255,255,0.34);
  box-shadow: 0 34px 90px rgba(0,0,0,0.42);
}

.album-card::before{
  content:"";
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  transform: scale(1.02);
  transition: transform .35s ease;
  z-index:0;
}
.album-card:hover::before{
  transform: scale(1.08);
}

.album-card--cerimonia::before{
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.36)),
    url('https://www.edoardoefrancesca.com/PhotoAlbum/assets/cover-cerimonia.jpg');
}
.album-card--party::before{
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.42)),
    url('https://www.edoardoefrancesca.com/PhotoAlbum/assets/cover-party.jpg');
}
.album-card--guest::before{
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.40)),
    url('https://www.edoardoefrancesca.com/PhotoAlbum/assets/cover-vostre-foto.jpg');
}

.album-card__overlay{
  position:absolute;
  inset:0;
  z-index:1;
  background:
    linear-gradient(180deg, rgba(12,13,18,0.10) 0%, rgba(12,13,18,0.16) 24%, rgba(12,13,18,0.72) 100%);
}

.album-card__content{
  position:absolute;
  inset:auto 0 0 0;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  padding:24px;
}

.album-card__label{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.82);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.18em;
  backdrop-filter: blur(8px);
}

.album-card__title{
  font-family:"Playfair Display", serif;
  font-size:40px;
  line-height:0.95;
  letter-spacing:-0.02em;
  color:#fff;
  text-shadow: 0 6px 20px rgba(0,0,0,0.28);
}

.album-card__text{
  display:block;
  max-width:30ch;
  color: rgba(255,255,255,0.82);
  font-size:14px;
  line-height:1.65;
}

.album-card__cta{
  margin-top:6px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  background: rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.14);
  color:#fff;
  font-size:13px;
  font-weight:600;
  backdrop-filter: blur(8px);
}

/* toolbar */
.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

.pill{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color:var(--muted);
  font-size:13px;
  backdrop-filter: blur(8px);
}

/* gallery */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(210px, 1fr));
  gap:14px;
}

.card{
  border-radius:26px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 16px 40px rgba(0,0,0,0.24);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover{
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.20);
  box-shadow: 0 24px 55px rgba(0,0,0,0.30);
}

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

.card .actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:12px 14px 14px;
}
.card .actions .fname{
  color:var(--muted);
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.card .actions .dl{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:999px;
  background: rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  color:#fff !important;
  text-decoration:none;
}

.center{
  display:flex;
  justify-content:center;
  padding:24px 0 34px;
}

/* lightbox */
.lightbox{
  position:fixed;
  inset:0;
  z-index:60;
}
.lightbox__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.76);
  backdrop-filter: blur(12px);
}
.lightbox__card{
  position:relative;
  max-width:980px;
  margin:6vh auto;
  padding:14px;
  background: rgba(255,255,255,0.07);
  border:1px solid var(--line);
  border-radius:26px;
  box-shadow: var(--shadow);
}
.lightbox__card img{
  width:100%;
  max-height:70vh;
  object-fit:contain;
  border-radius:18px;
  display:block;
  background: rgba(0,0,0,0.22);
}
.lightbox__actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding-top:14px;
}
.lightbox__meta{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  padding:4px 4px 12px;
}
.lightbox__name{
  font-family:"Playfair Display", serif;
  font-weight:700;
  letter-spacing:.02em;
  font-size:22px;
}
.lightbox__pos{
  color:var(--muted);
  font-size:13px;
}

.lbnav{
  position:fixed;
  top:50%;
  transform:translateY(-50%);
  width:50px;
  height:50px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.10);
  color:var(--text);
  cursor:pointer;
  z-index:70;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:32px;
  line-height:1;
  backdrop-filter: blur(12px);
}
.lbnav:hover{
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.22);
}
.lbnav--prev{ left:20px; }
.lbnav--next{ right:20px; }

/* responsive */
@media (max-width: 1100px){
  .albums{
    grid-template-columns:1fr;
  }

  .album-card{
    min-height:260px;
  }
}

@media (max-width: 900px){
  .topbar{
    flex-direction:column;
    align-items:flex-start;
    gap:14px;
    padding:16px;
  }

  .topbar__actions{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
  }

  .brand__title{
    font-size:28px;
  }

  .brand__subtitle{
    font-size:13px;
  }

  .hero{
    padding-top:24px;
    padding-bottom:18px;
  }

  .hero h1{
    font-size:clamp(34px, 10vw, 52px);
    line-height:1.02;
  }

  .hero__text{
    font-size:16px;
    line-height:1.6;
  }

  .hero-video-card{
    min-height:220px;
    border-radius:22px;
    margin-bottom:20px;
  }

  .hero-video{
    height:220px;
  }

  .hero-video-card__content{
    left:16px;
    right:16px;
    bottom:16px;
  }

  .hero-video-card__title{
    font-size:26px;
  }

  .albums{
    grid-template-columns:1fr;
    gap:14px;
    margin:10px 0 20px;
  }

  .album-card{
    min-height:220px;
    border-radius:24px;
  }

  .album-card__content{
    padding:18px;
  }

  .album-card__title{
    font-size:30px;
  }

  .album-card__text{
    max-width:100%;
    font-size:13px;
    line-height:1.55;
  }

  .toolbar{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }

  .toolbar__left,
  .toolbar__right{
    width:100%;
  }

  #refresh{
    width:100%;
  }

  .pill{
    width:100%;
    justify-content:center;
  }

  .panel{
    margin:0 14px 20px;
    padding:16px;
    border-radius:20px;
  }

  .formgrid{
    grid-template-columns:1fr;
    gap:12px;
  }

  .panel__actions{
    flex-direction:column;
    align-items:stretch;
  }

  .panel__actions .btn{
    width:100%;
    justify-content:center;
  }

  .spacer{
    display:none;
  }

  .summary{
    width:100%;
    text-align:center;
  }

  .uprow{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
  }

  .bar{
    width:100%;
  }

  .grid{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .card{
    border-radius:20px;
  }

  .card img{
    height:170px;
  }

  .card .actions{
    padding:10px 12px 12px;
  }

  .card .actions .fname{
    font-size:11px;
  }

  .center{
    padding:18px 0 28px;
  }

  #loadMore{
    width:100%;
  }

  .lightbox__card{
    margin:8vh 12px;
    padding:12px;
    border-radius:20px;
  }

  .lightbox__name{
    font-size:18px;
  }

  .lightbox__actions{
    flex-direction:column;
  }

  .lightbox__actions .btn{
    width:100%;
    justify-content:center;
  }

  .lbnav{
    width:42px;
    height:42px;
    font-size:26px;
  }

  .lbnav--prev{ left:8px; }
  .lbnav--next{ right:8px; }
}

@media (max-width: 560px){
  .wrap{
    padding:0 14px 22px;
  }

  .topbar{
    padding:12px 14px;
    gap:10px;
  }

  .brand__eyebrow{
    font-size:10px;
  }

  .brand__title{
    font-size:22px;
    line-height:1.1;
  }

  .brand__subtitle{
    font-size:12px;
  }

  .topbar__actions{
    display:flex;
    gap:8px;
    width:100%;
  }

  #musicToggle{
    width:44px;
    height:44px;
    flex:0 0 44px;
  }

  #toggleUpload{
    flex:1;
    height:44px;
    font-size:14px;
  }

  .hero{
    padding-top:18px;
  }

  .hero__kicker{
    font-size:11px;
  }

  .hero h1{
    font-size:30px;
    margin-top:6px;
  }

  .hero__text{
    font-size:15px;
  }

  .hero-video-card{
    min-height:180px;
    border-radius:20px;
  }

  .hero-video{
    height:180px;
  }

  .hero-video-card__title{
    font-size:20px;
  }

  .album-card{
    min-height:180px;
    border-radius:20px;
  }

  .album-card__content{
    padding:16px;
    gap:6px;
  }

  .album-card__title{
    font-size:24px;
  }

  .album-card__text{
    font-size:12px;
  }

  .album-card__cta{
    padding:8px 12px;
    font-size:11px;
  }

  .grid{
    grid-template-columns:1fr;
  }

  .card img{
    height:220px;
  }

  .lightbox__meta{
    flex-direction:column;
    align-items:flex-start;
  }
}