@media (max-width: 768px) {
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #181818;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
  }

  .bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }

  .bottom-nav .nav-item i {
    font-size: 1.1rem !important;
    margin-bottom: 0 !important;
    color: #e91e63;
  }

  .bottom-nav .nav-item span {
    font-size: 0.7rem;
    display: block;
  }

  /* buton Create mai mare */
  .bottom-nav .nav-item.create i {
    font-size: 1.3rem !important;
    color: #ff2e74;
  }

  /* News content styling moved to news.css for better control */
  /* .news-content {
    padding: 0 !important;
  }
  .news-feed {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
  }
  .news-post {
    width: 100%;
    max-width: 100%;
    margin: 1em 0;
    border-radius: 16px;
    box-sizing: border-box;
  } */
  .news-image img {
    width: 100%;
    height: auto;
    border-radius: 16px 16px 0 0;
    object-fit: cover;
    display: block;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
    margin: 0 !important;
  }
  /* Ensure main/news content has bottom spacing so bottom-nav doesn't cover it */
  .main-content,
  .news-content,
  .news-feed {
    padding-bottom: 80px !important; /* space for bottom-nav */
    box-sizing: border-box;
  }
  
  /* Main content and news content styling moved to news.css */
  /* .main-content,
  .news-content {
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
  }
  .news-feed {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
  } */
  /* .news-post {
    width: 100% !important;
    max-width: 100% !important;
    margin: 1em 0 !important;
    border-radius: 16px !important;
    box-sizing: border-box;
  }

  /* Messages responsiveness */

  .chat-area {
    display: none;
    max-width: 100%;
  }

  .chat-header {
    padding: 15px 15px;
  }

  #back-btn {
    display: flex;
    background: none;
    color: #ff4d88;
    border: none;
    font-size: 1.7em;
    margin-right: 15px;
  }

  .conversations-list {
    width: 100%;
  }

  .messages-container {
    margin: 0;
  }

  .img-layout-container img{
    max-width: 388px;
    border: 1px solid #4b4b4b;
  }

  .img-layout-container button {
    right: 0;
    background-color: rgba(233, 30, 98, 0.496);
  }

}

/* Ascunde sidebar și right-sidebar pe mobil/tabletă */
@media (max-width: 768px) {
  .sidebar,
  .right-sidebar {
    display: none !important;
  }
  .feed {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
  }
}

/* Sidebar devine bottom-nav pe mobil (doar dacă ai .bottom-nav în HTML) */
@media (max-width: 768px) {
  .bottom-nav {
    display: flex !important;
  }
}

/* Ascunde bottom-nav pe desktop */
@media (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }
}

/* Postările pe profil: 2 pe rând pe mobil */
@media (max-width: 768px) {
  #posts .post-item {
    width: 50% !important;
    max-width: 50% !important;
    display: inline-block !important;
    vertical-align: top !important;
  }
}

/* Postările pe profil: 1 pe rând pe telefoane mici */
@media (max-width: 430px) {
  #posts .post-item {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Optimizează bottom-nav pentru ecrane foarte mici */
@media (max-width: 430px) {
  .bottom-nav {
    height: 48px;
    padding: 0 2px;
  }
  .bottom-nav .nav-item i {
    font-size: 1rem !important;
  }
  .bottom-nav .nav-item {
    min-width: 32px;
    padding: 0 2px;
  }
}

@media (max-width: 768px) {
  .news-feed {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
  }
  /* News styling moved to news.css */
  /* .news-post {
    width: 100% !important;
    max-width: 100% !important;
    margin: 1em 0 !important;
    border-radius: 16px !important;
    box-sizing: border-box;
  }
  .news-content,
  .news-title,
  .news-meta,
  .news-actions {
    width: 100% !important;
    box-sizing: border-box;
    padding-left: 0 !important;
    padding-right: 0 !important;
  } */
}

@media (max-width: 768px) {
  .create-content {
    padding-top: 24px !important;   /* spațiu suplimentar sus */
    padding-bottom: 80px !important; /* spațiu pentru bottom-nav */
    max-width: 500px;
    margin: 0 auto;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }
  .create-content {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
  }
  .create-form-container {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  .create-form .section-container {
    width: 100%;
    margin: 0 0 16px 0;
    padding: 0;
    box-sizing: border-box;
  }
  .upload-area {
    max-width: 400px;
    margin: 0 auto;
    padding: 8px 0;
    box-sizing: border-box;
  }
  .input-group label,
  .input-group input,
  .input-group textarea,
  .input-group select {
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
  }
  .form-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
  }
}

@media (max-width: 768px) {
  .create-content {
    padding-bottom: 80px !important; /* spațiu pentru bottom-nav */
  }
}

@media (max-width: 768px) {
  .notifications-content {
    padding-top: 32px !important;      /* spațiu suplimentar sus */
    padding-bottom: 80px !important;   /* spațiu pentru bottom-nav */
    max-width: 500px;
    margin: 0 auto;
    box-sizing: border-box;
  }
  .notifications-list {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* cardurile ocupă toată lățimea */
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  .notification-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0.5em 0 !important;
    font-size: 0.85em !important;      /* font mai mic */
    border-radius: 16px;
    box-sizing: border-box;
    padding: 10px 8px !important;      /* padding mic */
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .notification-avatar img {
    width: 28px !important;
    height: 28px !important;
  }
  .follow-btn {
    font-size: 0.75em !important;
    padding: 3px 6px !important;
  }
  .notification-item * {
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
  }
}

/* === PREMIUM PAGE MOBILE ONLY === */
@media (max-width: 768px) {
  /* Container premium: full-width, padding egal stânga/dreapta */
  .premium-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 70px 14px 110px 14px !important;
    box-sizing: border-box;
  }

  /* Back button fix stânga */
  .back-btn {
    position: fixed !important;
    top: 14px;
    left: 14px !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 1300;
  }

  /* Header centrat (sau text-align: left dacă vrei titlu stânga) */
  .premium-header {
    text-align: center;
    margin: 0 0 32px !important;
  }

  /* Grid features: o singură coloană */
  .features-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 0 0 40px !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  .feature-card {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 18px !important;
    text-align: center !important;
  }

  /* Subscribe button full-width */
  .subscribe-btn {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.4rem;
    font-size: 0.95rem;
  }

  /* Balance card (dacă există) */
  .balance-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 16px 14px;
    margin: 24px 0 0;
    border-radius: 14px;
  }
  .balance-list li {
    padding: 10px 12px;
    gap: 10px;
  }
}

/* Narrow devices (≈390–430px) */
@media (max-width: 430px) {
  .premium-content {
    padding: 64px 12px 104px 12px !important;
  }
  .back-btn {
    left: 12px !important;
  }
  .features-grid {
    gap: 18px !important;
  }
  .feature-card {
    padding: 1.1rem 0.9rem 1rem;
    border-radius: 16px !important;
  }
  .subscribe-btn {
    font-size: 0.9rem;
    padding: 0.8rem 1.1rem;
  }
  .balance-card {
    padding: 14px 14px 12px;
    border-radius: 12px;
  }
}

/* Ultra narrow (≤360px) */
@media (max-width: 360px) {
  .premium-content {
    padding: 60px 10px 100px 10px !important;
  }
  .back-btn {
    left: 10px !important;
  }
  .feature-card {
    padding: 1rem 0.85rem 0.95rem;
  }
}

/* === PREMIUM PAGE MOBILE (aliniat perfect stânga) === */
@media (max-width: 768px) {
  .premium-content {
    width: 100% !important;
    max-width: 340px !important;     /* lățime îngustă pentru a lăsa spațiu dreapta */
    margin: 0 !important;
    padding: 70px 68px 110px 8px !important; /* stânga 8px (aliniat cu buton), dreapta 68px */
    box-sizing: border-box;
  }

  .back-btn {
    position: fixed !important;
    top: 14px;
    left: 8px !important;            /* aliniat cu padding-left al containerului */
    transform: none !important;
    margin: 0 !important;
    z-index: 1300;
  }

  .premium-header {
    text-align: center;
    margin: 0 0 28px !important;
  }

  .features-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    width: 100% !important;
    margin: 0 0 36px !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  .feature-card {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 16px !important;
    text-align: center !important;
  }

  .subscribe-btn {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.2rem;
    font-size: 0.9rem;
  }

  .balance-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 14px 12px;
    margin: 20px 0 0;
    border-radius: 12px;
  }
  .balance-list li {
    padding: 9px 10px;
    gap: 8px;
  }
}

/* Narrow devices (≤430px) */
@media (max-width: 430px) {
  .premium-content {
    max-width: 320px !important;
    padding: 64px 62px 104px 6px !important; /* stânga 6px, dreapta 62px */
  }
  .back-btn {
    left: 6px !important;
  }
  .features-grid {
    gap: 16px !important;
  }
  .feature-card {
    padding: 1rem 0.85rem 0.95rem;
    border-radius: 14px !important;
  }
  .subscribe-btn {
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }
  .balance-card {
    padding: 12px 12px 10px;
    border-radius: 10px;
  }
}

/* Ultra narrow (≤360px) */
@media (max-width: 360px) {
  .premium-content {
    max-width: 300px !important;
    padding: 60px 58px 100px 4px !important; /* stânga 4px, dreapta 58px */
  }
  .back-btn {
    left: 4px !important;
  }
  .feature-card {
    padding: 0.9rem 0.75rem 0.85rem;
  }
}
