/* ----------------------------------------------------
   🎨 TEMA DARK MODERNO - PERSONAL WEB
---------------------------------------------------- */
body {
  margin: 0;
  background: linear-gradient(180deg, #0b0e13 0%, #101820 100%);
  color: #fff;
  font-family: 'Poppins', sans-serif;
}

/* ---------- HEADER ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0,180,255,0.3);
}
.logo h1 {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(90deg, #007AFF, #00B4FF);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---------- NAV ---------- */
nav a {
  color: #00B4FF;
  margin-left: 20px;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}
nav a:hover {
  color: #0090d5;
}

/* ---------- MAIN GRID ---------- */
.main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* ---------- POST SECTION ---------- */
.post {
  background: #1b1f24;
  border-radius: 14px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: relative;
  transition: all 0.3s ease;
}
.post:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}
.post-header strong {
  color: #fff;
  font-weight: 600;
}
.post-header small {
  color: #888;
  font-size: 0.8rem;
}

.post p {
  margin: 0.5rem 0;
  line-height: 1.5;
  color: #ddd;
}

.post-img {
  width: 100%;
  margin-top: 10px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.4);
}

/* ---------- PROMO POST (EVIDENZIATO) ---------- */
.promo-post {
  border: 2px solid gold;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}
.promo-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(90deg, #FBBC05, #EA4335);
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  background: #14181e;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.4);
}
.sidebar h3 {
  color: #00B4FF;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.sidebar p {
  color: #ccc;
  line-height: 1.6;
  font-size: 0.95rem;
}

.promo-btn {
  display: block;
  margin: 1.2rem 0;
  padding: 12px 22px;
  background: linear-gradient(90deg, #007AFF, #00B4FF);
  color: white;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
  box-shadow: 0 0 10px rgba(0,180,255,0.3);
}
.promo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0,180,255,0.5);
}

.ad-space {
  margin-top: 2rem;
}
.ad-space h4 {
  color: #FF5252;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1rem;
}

.promo-post-side {
  background: #1b1f24;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid #EA4335;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.promo-post-side p {
  color: #ddd;
  font-size: 0.95rem;
}
.promo-img {
  width: 100%;
  border-radius: 10px;
  margin-top: 0.5rem;
}

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  padding: 20px;
  background: #0d1116;
  color: #888;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ---------- CARD GENERICHE ---------- */
.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.login-card,
.cart-card,
.success-card,
.error-card {
  background: #1b1f24;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}
.success-card { border-left: 4px solid #00B4FF; }
.error-card { border-left: 4px solid #EA4335; }

/* ---------- BUTTONS ---------- */
button,
.back-btn {
  background: linear-gradient(90deg, #007AFF, #00B4FF);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}
button:hover,
.back-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(0,180,255,0.5);
}

/* ---------- TEXTAREAS & INPUTS ---------- */
textarea,
input[type="text"],
input[type="email"],
input[type="datetime-local"],
input[type="file"] {
  width: 100%;
  background: #14181e;
  color: #eee;
  border-radius: 10px;
  border: 1px solid #222;
  padding: 10px;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: 0.3s;
}
textarea:focus,
input:focus {
  outline: none;
  border-color: #00B4FF;
  box-shadow: 0 0 8px rgba(0,180,255,0.3);
}

/* ---------- SIDE INFO BOX ---------- */
.side-info {
  background: #1b1f24;
  padding: 1rem;
  border-radius: 12px;
  max-width: 250px;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.5);
}

/* ---------- MEDIA QUERIES ---------- */
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  .sidebar {
    margin-top: 2rem;
  }
}
