/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none; /* mantiene il cursore custom */
}
body {
  font-family: "Montserrat", sans-serif;
  background: #0a0118;
  min-height: 100vh;
  color: white;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Canvas background */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

/* Top buttons */
.home-button, .back-button {
  position: absolute;
  top: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}
.home-button { right: 20px; }
.back-button { right: 75px; }
.home-button:hover, .back-button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}
.home-button i, .back-button i {
  color: #fff;
  font-size: 1.2rem;
}

/* Layout */
.content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  padding: 50px 0 0 0;
}

/* Brand */
.brand {
  margin-bottom: 40px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s ease-out forwards;
}
.brand h1 {
  font-size: 4rem;
  letter-spacing: 4px;
  text-shadow: 0 0 14px rgba(180, 80, 255, 0.7);
  margin-bottom: 8px;
}
.brand p {
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
}

/* Gradient titles */
.brand h1, .sold-accounts-section h2 {
  background: linear-gradient(90deg, #e7caff, #c07dff, #e7caff);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientFlow 4s linear infinite;
}

/* Contact link styles */
.contact-link a {
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: #c07dff;
  text-decoration: underline;
  text-decoration-color: rgba(192, 125, 255, 0.5);
  font-weight: 400;
  transition: color 0.3s, text-shadow 0.3s, text-decoration-color 0.3s;
}
.contact-link a:hover {
  color: #e7caff;
  text-decoration-color: rgba(231, 202, 255, 0.8);
  text-shadow: 0 0 8px rgba(231, 202, 255, 0.3);
}

/* Accounts container */
.accounts-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  width: 95%;
  max-width: 1200px;
}

/* Card */
.account-card {
  background: rgba(16, 5, 32, 0.6);
  border: 2px solid rgba(180, 80, 255, 0.35);
  border-radius: 14px;
  width: 340px;
  min-height: 70px;
  padding: 15px 32px 10px 32px;
  box-shadow: 0 0 15px rgba(180, 80, 255, 0.08);
  cursor: pointer;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.1s linear, border-color 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: scale(0.95);
  animation: popIn 0.5s ease-out forwards;
}
.account-card:hover {
  border-color: rgba(220, 140, 255, 0.85);
  box-shadow: 0 0 36px rgba(180, 80, 255, 0.25);
}

/* Card header */
.account-header {
  display: flex;
  flex-direction: column;
  gap: 0px;
  white-space: pre-line;
  transform: translateZ(20px);
}
.account-title {
  font-size: 1.17rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.12;
}
.account-title strong {
  font-weight: bold;
  margin-top: 0px;
  margin-bottom: 0px;
  display: block;
}
.account-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  user-select: none;
}

/* Sold section */
.sold-accounts-section {
  width: 95%;
  max-width: 1200px;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid rgba(180, 80, 255, 0.2);
  opacity: 0;
  animation: fadeIn 1s 0.5s ease-out forwards;
}
.sold-accounts-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 30px;
  letter-spacing: 2px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 1, 24, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal-content {
  background: rgba(30, 8, 55, 0.98);
  border-radius: 20px;
  max-width: 800px;
  width: 96vw;
  max-height: 95vh;
  overflow-y: auto;
  padding: 40px 45px 30px 45px;
  color: #f3efff;
  position: relative;
  box-shadow: 0 0 30px rgba(180, 80, 255, 0.65);
  font-size: 1.13rem;
  line-height: 1.5;
  word-wrap: break-word;
  transform: scale(0.95);
  transition: transform 0.4s ease;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-content h2 {
  margin-bottom: 10px;
  color: #dbaeff;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 1.5px;
  white-space: pre-line;
}
.modal-content h4 {
  margin-bottom: 16px;
  color: rgba(255,255,255,0.7);
  font-size: 1.08rem;
}
.modal-content p {
  margin-bottom: 12px;
  word-break: break-word;
  white-space: normal;
  font-weight: normal;
}
.modal-content strong { color: #e8c0ff; font-weight: 700; }
.modal-content a { color: #dbaeff; text-decoration: underline; }
.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 2.3rem;
  color: #dbaeff;
  cursor: pointer;
  transition: color 0.25s, transform 0.2s;
  user-select: none;
  background: none;
  border: none;
  line-height: 1;
  font-weight: 700;
}
.modal-close:hover {
  color: #fff;
  background: none;
  transform: scale(1.1);
}

/* Custom cursor */
.cursor {
  position: fixed;
  width: 16px;
  height: 16px;
  border: 2px solid #ff00c1;
  border-radius: 50%;
  background: transparent;
  mix-blend-mode: difference;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.1s, border-color 0.2s;
  animation: cursorPulse 1.5s infinite;
}
.cursor-trail {
  position: fixed;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(255, 0, 255, 0.6) 0%,
    rgba(255, 0, 255, 0) 70%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9998;
  filter: blur(8px);
  transition: width 0.3s, height 0.3s;
}

/* Animations */
@keyframes gradientFlow {
  0% { background-position: 200% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes popIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes cursorPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.33);
    opacity: 0.6;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .brand h1 { font-size: 2.3rem; }
  .account-card {
    width: 98vw;
    min-width: 240px;
    min-height: 70px;
    padding: 12px 14px 10px 14px;
  }
  .cursor, .cursor-trail { display: none; }
  .accounts-container { gap: 16px; }
  .sold-accounts-section h2 { font-size: 1.8rem; }
  .home-button, .back-button {
    top: 10px; width: 32px; height: 32px;
  }
  .home-button { right: 12px; }
  .back-button { right: 60px; }
  .content { padding: 22px 2vw 0 2vw; }
  .modal-content {
    padding: 18px 12px 16px 12px;
    font-size: 1rem;
    max-width: 100vw;
  }
}
