:root {
  --bg-color: #0d0e15;
  --panel-bg: rgba(25, 27, 40, 0.6);
  --panel-border: rgba(255, 255, 255, 0.08);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #ec4899;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --star-color: #fbbf24;
  --font-family: "Poppins", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* --- SFONDO ANIMATO (BLOBS) --- */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
  animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: var(--secondary);
  bottom: -150px;
  right: -100px;
  animation-delay: -5s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, 50px) scale(1.1);
  }
}

/* --- CONTENITORE PRINCIPALE --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* --- HEADER --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: left;
}

.logo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.header-text h1 {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(to right, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.subtitle {
  color: var(--primary);
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* --- LAYOUT A GRIGLIA --- */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
  align-items: start;
}

/* --- PANNELLI EFFETTO VETRO --- */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 35px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.glass-panel h2 {
  font-size: 22px;
  margin-bottom: 25px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- FORM --- */
#review-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 15px;
  transition: all 0.3s ease;
}

.input-group textarea {
  resize: vertical;
  min-height: 120px;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* --- CHECKBOX PRIVACY --- */
.privacy-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.privacy-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.privacy-checkbox a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.privacy-checkbox a:hover {
  color: var(--secondary);
}

/* --- BOTTONI --- */
.glow-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
  margin-top: 10px;
}

.glow-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(236, 72, 153, 0.4);
}

.glow-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.outline-btn {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: 500;
  transition: all 0.3s ease;
}

.outline-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

/* --- SEZIONE RECENSIONI --- */
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.badge {
  background: rgba(236, 72, 153, 0.2);
  color: var(--secondary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

#reviews-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

/* --- CARD RECENSIONE --- */
.review-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.review-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(5px);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
}

.user-meta h3 {
  font-size: 16px;
  margin: 0 0 2px 0;
  font-weight: 600;
}

.user-meta .date {
  font-size: 12px;
  color: var(--text-muted);
}

.stars {
  font-size: 14px;
  letter-spacing: 2px;
}

.review-body p {
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0;
}

.load-more-container {
  text-align: center;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- FOOTER --- */
.site-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.legal-links {
  margin-top: 8px;
}

.legal-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-links a:hover {
  color: var(--text-main);
}

.dot {
  margin: 0 8px;
  opacity: 0.5;
}

/* --- RESPONSIVITÀ (MOBILE) --- */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    text-align: center;
  }

  .container {
    padding: 20px 15px;
  }

  .glass-panel {
    padding: 25px 20px;
  }
}
