:root {
  --bg: #071025;
  --card: #081227;
  --muted: #b9c6df;
  --accent1: #6d28d9;
  --accent2: #06b6d4;
  --radius: 12px;
  --maxw: 1100px;
}

/* === Base === */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: linear-gradient(180deg, var(--bg), #041223);
  color: #e6f0ff;
}
a { color: var(--accent2); text-decoration: none; }

/* === Layout === */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}
.nav {
  display: flex;
  gap: 10px;
}
.nav-link {
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  transition: 0.2s;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* === Buttons === */
.primary {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  padding: 8px 14px;
  border-radius: 10px;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: 0.25s;
  margin-bottom: 10px;
  margin-top: 10px;
}
.primary:hover {
  opacity: 0.85;
}
.ghost {
  background: rgb(10, 19, 59) ;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: 0.25s;
  display: block;
}
.ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.icon-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
}

/* === Hero === */
.hero {
  padding: 40px 0;
}
.hero-panel {
  background: linear-gradient(90deg, rgba(109,40,217,0.08), rgba(6,182,212,0.06));
  padding: 28px;
  border-radius: 50px;
  text-align: center;
}
.logoe {
  width: 300px;
  height: 300px;
  border-radius: 20px;
}
.sconti {
    background: linear-gradient(90deg, rgba(109,40,217,0.08), rgba(6,182,212,0.06));
  padding: 28px;
  border-radius: 50px;
  text-align: center;
  margin-top: 20px;
}

/* === Categories === */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.category-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.cat-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}
.cat-card:hover {
  transform: scale(1.02);
  border-color: rgba(255,255,255,0.15);
}
.cat-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}
.overlay-close {
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: 0.25s;
  display: flex;
}

/* === Products === */
.controls {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  align-items: center;
}
.controls input, .controls select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: white;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.product {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.product img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}
.product h3 {
  margin: 8px 0 4px;
}
.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.price {
  font-weight: 700;
  color: var(--accent2);
}

/* === Cart Sidebar === */
.cart-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 360px;
  max-height: 80vh;
  overflow-y: auto;
  background: linear-gradient(180deg,#061026,#071227);
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.03);
  display: none;
  z-index: 999;

}
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cart-item img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}
.cart-footer {
  margin-top: 10px;
}
.tot {
  font-weight: 600;
  margin-bottom: 8px;
}
.dscart {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px;
  border-radius: 10px;
  margin-top: 6px;
  text-decoration: none;
}
.closeCart {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: 0.25s;
  display: block;
}

.ghostqty{
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
  padding: 8px 14px;
  border-radius: 10px;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: 0.25s;
  margin-bottom: 10px;
  margin-top: 10px;
}

/* === Overlay Fullscreen (Charlie Style) === */
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.overlay-inner {
  background: var(--card);
  width: 95%;
  max-width: 1000px;
  padding: 18px;
  border-radius: 12px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.overlay-close {
  position: absolute;
  right: 18px;
  top: 18px;
}
.overlay-back {
  position: absolute;
  left: 18px;
  top: 18px;
}
.overlay-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 40px;
}
.overlay-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
}
.overlay-item img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}
.overlay-item .info {
  flex: 1;
}
.overlay-item .info h4 {
  margin: 0 0 4px;
}
.overlay-item .info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* === Profile Panel === */
.panel {
  background: var(--card);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.03);
  margin-top: 10px;
}

/* === Footer === */
.site-footer {
  margin-top: 60px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* === Responsive === */
@media (max-width: 900px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .nav { display: none; }
  .products-grid { grid-template-columns: 1fr; }
  .container { padding: 0 12px; }
  .overlay-inner { width: 98%; }
}

.donations-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.9rem;
}
.donation-item {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
}
.login {

  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  background-color: rgba(255,255,255,0.08);
  cursor: pointer;
  transition: 0.25s;
  display: block;
  margin-top: 10px;
}
.register {

  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: 0.25s;
  display: block;
  background-color: rgba(255,255,255,0.08);
  margin-top: 10px;
}

/* === REGISTER PAGE === */

.register-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.register-box {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  animation: fadeUp 0.7s ease;
}

.register-box h2 {
  margin-bottom: 20px;
  font-size: 1.6rem;
  font-weight: 700;
}

/* Input stile Elysium */
.register-input {
  width: 100%;
  padding: 12px 14px;
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: #e6f0ff;
  font-size: 15px;
  transition: 0.25s;
  outline: none;
}

.register-input:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--accent2);
}

/* Button */
.register-btn {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #fff;
  cursor: pointer;
  transition: 0.25s;
  font-weight: 600;
}

.register-btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* Note bottom */
.register-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.register-note a {
  color: var(--accent2);
  font-weight: 600;
}

/* Error box */
.register-error {
  margin-top: 16px;
  padding: 10px;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.25);
  border-radius: 10px;
  font-size: 0.9rem;
  color: #ff8080;
  display: none;
}

/* Animazione */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === LOGIN PAGE === */

.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  animation: fadeUp 0.7s ease;
}

.login-box h2 {
  margin-bottom: 20px;
  font-size: 1.6rem;
  font-weight: 700;
}

/* Input stile Elysium */
.login-input {
  width: 100%;
  padding: 12px 14px;
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: #e6f0ff;
  font-size: 15px;
  transition: 0.25s;
  outline: none;
}

.login-input:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--accent2);
}

/* Button stile Elysium */
.login-btn {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #fff;
  cursor: pointer;
  transition: 0.25s;
  font-weight: 600;
}

.login-btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* Note bottom */
.login-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-note a {
  color: var(--accent2);
  font-weight: 600;
}

/* Error box */
.login-error {
  margin-top: 16px;
  padding: 10px;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.25);
  border-radius: 10px;
  font-size: 0.9rem;
  color: #ff8080;
  display: none;
}

/* Animazione */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================
   SIDEBAR FULL PAGE — ELYSIUM
   ============================= */

.sidebar {
  position: fixed;
  top: 0;
  left: -260px; /* nascosta */
  width: 260px;
  height: 100vh;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1500;
  transition: left 0.28s ease;
}

/* Sidebar aperta */
.sidebar.open {
  left: 0;
}

.sidebar-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: left;
  padding-left: 6px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.25s;
}

.sidebar-item:hover {
  background: rgba(255,255,255,0.08);
}

.sidebar-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 6px var(--accent2));
}

.sidebar-label {
  font-size: 1rem;
  color: #e8f0ff;
}

/* MENU BUTTON (hamburger) */
.menu-toggle {
  position: fixed;
  top: 22px;
  left: 22px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1600;
  box-shadow: 0 0 14px rgba(0,0,0,0.4);
  transition: 0.25s;
}

.menu-toggle:hover {
  transform: scale(1.06);
}

.menu-toggle span {
  font-size: 28px;
}

/* === Floating Cart Button (bottom right) === */
.floating-cart {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 62px;
  height: 62px;
  border-radius: 10%;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  box-shadow: 0 8px 25px rgba(0,0,0,0.45);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12000;
  transition: 0.25s;
  bottom: 16px;
  right: 1720px;
}

.floating-cart:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
}

.floating-cart img {
  width: 30px;
  height: 30px;
  filter: brightness(1.15);
}

/* Bubble (quantità articoli) */
#floatingCartCount {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff4d4d;
  color: #fff;
  padding: 3px 7px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: none;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
}

.discord-support {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #042246;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: .2s;
}

.discord-support img {
  width: 22px;
  height: 22px;
}

.discord-support:hover {
  background: rgba(255,255,255,0.08);
}

.no {
  visibility: hidden;
}

.discord-support-button
 {display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: .2s;
}

.user-avatar {
    position: fixed;
    bottom: 16px;
  right: 1800px;
    
    width: 65px;
    height: 65px;
    background: rgba(0,0,0,0.6);
    border-radius: 8px;
    padding: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
}

.user-avatar img {
    width: 80%;
    height: 80%;
    image-rendering: pixelated;
}

.account-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 250px;
    background: #111;
    padding: 15px;
    border-radius: 10px;
    color: white;
    z-index: 9999;
    display: none;
}

/* FULLSCREEN ACCOUNT OVERLAY */
.account-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.account-box {
    width: 90%;
    max-width: 450px;
    background: #151515;
    border-radius: 12px;
    padding: 25px;
    color: white;
    text-align: center;
    position: relative;
}

.close-btn {
    position: absolute;
    right: 12px;
    top: 10px;
    background: none;
    border: none;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.acc-row {
    margin: 10px 0;
    font-size: 18px;
}

.big-avatar {
    width: 130px;
    height: 130px;
    margin-top: 15px;
    border-radius: 10px;
    image-rendering: pixelated;
}

.logout-btn {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    border: none;
    background: red;
    color: white;
    cursor: pointer;
    border-radius: 8px;
    font-size: 18px;
}

/* === ACCOUNT NICKNAME INPUT === */
#accountOverlay .acc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

#accountOverlay #nickInput {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 16px;
  outline: none;
  transition: 0.25s;
}

#accountOverlay #nickInput:focus {
  border-color: var(--accent2);
  background: rgba(6,182,212,0.1);
}

#accountOverlay #saveNickBtn {
  padding: 10px 14px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
}

#accountOverlay #saveNickBtn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
