/* style.css — Gothic Garden Phase 3 - Enhanced with Mobile & Gallery Support */
:root{
  --bg:#070607; 
  --card:#0f0d11; 
  --muted:#cfc0ea; 
  --accent:#a300d6; 
  --accent-2:#5a0076;
  --glass: rgba(255,255,255,0.03); 
  --soft:#efeaf7;
  --radius:12px;
  --maxwidth:1160px;
}

*{box-sizing:border-box}

html,body{
  height:100%;
  margin:0;
  font-family:Montserrat,system-ui,Arial;
  background:linear-gradient(180deg,#050405 0%, #0b0810 70%);
  color:var(--soft);
  -webkit-font-smoothing:antialiased;
}

a{color:inherit}

/* ========== HEADER ========== */
.site-head{
  position:sticky;
  top:0;
  z-index:50;
  padding:14px 20px;
  background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid rgba(120,0,140,0.06);
  flex-wrap: wrap;
  gap: 12px;
}

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

.logo{
  width:56px;
  height:56px;
  border-radius:10px;
  background:linear-gradient(135deg,var(--accent-2),var(--accent));
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:UnifrakturCook;
  color:white;
  font-size:28px;
  box-shadow:0 10px 40px rgba(163,0,214,0.12);
}

.site-title{
  font-family:UnifrakturCook;
  font-size:20px;
  color:var(--accent);
  text-shadow:0 0 12px rgba(163,0,214,0.08);
}

.site-sub{
  font-size:12px;
  color:var(--muted);
}

.top-nav{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap: wrap;
}

.nav-btn{
  background:transparent;
  border:0;
  color:var(--muted);
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
  transition: all 0.2s ease;
}

.nav-btn:hover{
  color: var(--soft);
  background: rgba(163, 0, 214, 0.1);
}

.nav-btn.active{
  color:var(--soft);
  box-shadow:0 6px 30px rgba(163,0,214,0.08);
  background:linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
}

.auth-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:12px;
  flex-wrap: wrap;
}

.btn{
  background:linear-gradient(135deg,var(--accent),#5a0070);
  border:0;
  padding:8px 12px;
  border-radius:8px;
  color:white;
  cursor:pointer;
  transition:all 0.2s;
  font-size: 0.9rem;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(163,0,214,0.3);
}

.btn.ghost{
  background:transparent;
  border:1px solid rgba(255,255,255,0.04);
}

.btn.ghost:hover{
  border-color: rgba(163, 0, 214, 0.3);
  background: rgba(163, 0, 214, 0.05);
}

.muted{color:var(--muted)}
.small{font-size:0.9rem;color:var(--muted)}

/* ========== LAYOUT ========== */
.layout{
  max-width:var(--maxwidth);
  margin:20px auto;
  display:flex;
  gap:18px;
  padding:0 16px;
  align-items:flex-start;
}

.content{
  flex:1;
  min-width:0;
}

.sidebar{
  width:320px;
  flex:0 0 320px;
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  padding:14px;
  border-radius:12px;
  border:1px solid rgba(100,20,120,0.06);
  box-shadow:0 12px 40px rgba(10,4,12,0.6);
  margin-bottom: 12px;
}

.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
  flex-wrap:wrap;
  gap:8px;
}

.section-head h2{
  font-family:UnifrakturCook;
  color:var(--accent);
  margin:0;
}

.section-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

/* ========== PLANT GRID ========== */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
  gap:14px;
}

/* ========== PLANT CARD ========== */
.plantCard{
  background:linear-gradient(180deg, rgba(20,10,22,0.6), rgba(12,6,16,0.6));
  border-radius:14px;
  padding:10px;
  border:1px solid rgba(255,255,255,0.03);
  display:flex;
  flex-direction:column;
  gap:8px;
  cursor:pointer;
  transition:transform .18s,box-shadow .18s;
  position:relative;
}

.plantCard:hover{
  transform:translateY(-6px);
  box-shadow:0 18px 60px rgba(163,0,214,0.12);
}

.plantCard .imgwrap{
  height:180px;
  border-radius:10px;
  overflow:hidden;
  background:linear-gradient(180deg,#0b0710,#120612);
  display:flex;
  align-items:center;
  justify-content:center;
  position: relative;
}

.plantCard img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.plantMeta{
  padding: 4px 0;
}

.plantMeta strong{
  display:block;
  color:var(--soft);
  font-size:1.05rem;
  margin-bottom: 4px;
}

.plantMeta .muted{
  color:var(--muted);
  font-size:0.9rem;
}

/* ========== IMAGE GALLERY ========== */
.img-gallery {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 4px !important;
  padding: 0 !important;
  height: 100% !important;
}

.img-gallery img.gallery-img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
  border-radius: 6px;
}

.img-gallery img.gallery-img:hover {
  transform: scale(1.05);
  z-index: 2;
  filter: brightness(1.2);
}

.img-gallery .more-images {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(163, 0, 214, 0.95);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ========== PREVIEW IMAGES ========== */
.photo-preview{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:8px;
}

.photo-preview img{
  width:88px;
  height:88px;
  object-fit:cover;
  border-radius:8px;
  border:1px solid rgba(100,20,120,0.08);
  cursor:pointer;
  transition:transform 0.2s;
}

.photo-preview img:hover{
  transform:scale(1.05);
}

.preview-img-wrap {
  position: relative;
  display: inline-block;
  margin: 4px;
}

.preview-img-wrap img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(100, 20, 120, 0.2);
  cursor: pointer;
  transition: transform 0.2s;
}

.preview-img-wrap img:hover {
  transform: scale(1.05);
}

.delete-img-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(163, 0, 214, 0.95);
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.preview-img-wrap:hover .delete-img-btn {
  opacity: 1;
}

.delete-img-btn:hover {
  background: #ff4444;
  transform: scale(1.1);
}

.preview-new-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(67, 214, 163, 0.95);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ========== EDIT/DELETE ACTION BUTTONS ========== */
.card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.plantCard:hover .card-actions,
.card:hover .card-actions {
  opacity: 1;
}

.btn-icon {
  background: rgba(12, 6, 16, 0.95);
  border: 1px solid rgba(163, 0, 214, 0.3);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  color: var(--muted);
}

.btn-icon:hover {
  background: rgba(163, 0, 214, 0.2);
  border-color: var(--accent);
  transform: scale(1.1);
  color: var(--soft);
  box-shadow: 0 4px 20px rgba(163, 0, 214, 0.3);
}

.btn-icon:active {
  transform: scale(0.95);
}

.btn.small {
  padding: 4px 8px;
  font-size: 0.85rem;
}

/* ========== TAGS ========== */
.tag, .tag-mini {
  display: inline-block;
  background: rgba(163, 0, 214, 0.15);
  border: 1px solid rgba(163, 0, 214, 0.3);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin: 2px;
  font-weight: 500;
}

.tag-mini {
  font-size: 0.75rem;
  padding: 1px 6px;
}

.tags-mini {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* ========== SLIDE PANEL ========== */
.slide-panel{
  position:fixed;
  right:0;
  top:0;
  height:100vh;
  width:420px;
  max-width:100%;
  transform:translateX(100%);
  transition:transform .28s ease;
  z-index:120;
  background:linear-gradient(180deg, rgba(12,6,12,0.98), rgba(18,4,20,0.98));
  border-left:1px solid rgba(120,0,140,0.06);
  padding:18px;
  overflow-y:auto;
}

.slide-panel[aria-hidden="false"]{
  transform:translateX(0);
}

.panel-inner{
  position:relative;
  height:100%;
  overflow:auto;
}

.panel-close{
  position:absolute;
  right:12px;
  top:12px;
  background:none;
  border:0;
  color:var(--soft);
  font-size:24px;
  cursor:pointer;
  z-index:10;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s;
}

.panel-close:hover {
  background: rgba(255, 255, 255, 0.05);
}

.add-form{
  margin-top:28px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.add-form label{
  display:flex;
  flex-direction:column;
  font-weight:600;
  color:#c266ff;
  font-size:0.9rem;
}

.add-form input,
.add-form textarea,
.add-form select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(100, 20, 120, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--soft);
  font-family: inherit;
  margin-top: 4px;
  font-size: 0.95rem;
}

.add-form input:focus,
.add-form textarea:focus,
.add-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(163, 0, 214, 0.1);
}

.add-form input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

.add-form input[type="file"] {
  padding: 4px;
  font-size: 0.9rem;
}

.panel-actions{
  display:flex;
  gap:8px;
  margin-top:12px;
  flex-wrap: wrap;
}

/* ========== SEARCH & SORT ========== */
.search {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(100, 20, 120, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--soft);
  font-size: 0.9rem;
  min-width: 200px;
  transition: border-color 0.2s;
}

.search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(163, 0, 214, 0.1);
}

.search::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.sort-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(100, 20, 120, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--soft);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent);
}

.sort-select option {
  background: #0f0d11;
  color: var(--soft);
}

/* ========== SEARCH RESULTS DROPDOWN ========== */
.searchResults{
  background:#110e14;
  border-radius:8px;
  padding:6px;
  margin-top:6px;
  max-height:180px;
  overflow:auto;
  border:1px solid rgba(77,0,97,0.12);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.searchItem{
  padding:8px;
  cursor:pointer;
  border-radius:4px;
  transition:background 0.2s;
}

.searchItem:hover{
  background:#1a0f24;
}

/* ========== TIMELINE ========== */
.timeline-section {
  margin-top: 16px;
  padding: 12px;
  background: rgba(163, 0, 214, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(163, 0, 214, 0.1);
}

.timeline-section h4 {
  margin: 0 0 12px 0;
  color: var(--accent);
  font-family: UnifrakturCook;
}

.timeline-container {
  max-height: 200px;
  overflow-y: auto;
}

.timeline-note {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--accent);
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 4px;
  position: relative;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.timeline-text {
  margin-top: 4px;
  color: var(--soft);
  font-size: 0.9rem;
}

.timeline-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 6px;
}

.timeline-delete:hover {
  color: #ff4444;
}

.timeline-note-detail {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(163, 0, 214, 0.1);
}

.timeline-note-detail:last-child {
  border-bottom: none;
}

.timeline-note-detail strong {
  color: var(--accent);
  font-size: 0.85rem;
}

.timeline-note-detail p {
  margin: 4px 0 0 0;
  color: var(--soft);
}

/* ========== DETAIL MODAL ========== */
.detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 0, 6, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 145;
  backdrop-filter: blur(4px);
}

.detail-modal-content {
  background: linear-gradient(180deg, #130112, #191019);
  border-radius: 12px;
  border: 1px solid rgba(163, 0, 214, 0.2);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.detail-modal-content h2 {
  margin: 0 0 8px 0;
  color: var(--accent);
  font-family: UnifrakturCook;
  font-size: 1.8rem;
  padding-right: 40px;
}

.detail-section {
  margin-top: 20px;
}

.detail-section h4 {
  margin: 0 0 8px 0;
  color: var(--accent);
  font-size: 1rem;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.detail-gallery-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(163, 0, 214, 0.2);
  transition: transform 0.2s;
}

.detail-gallery-img:hover {
  transform: scale(1.05);
}

.siblings-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* ========== LIGHTBOX ========== */
.lightbox{
  position:fixed;
  inset:0;
  background:rgba(2,0,6,0.9);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:140;
  backdrop-filter:blur(4px);
}

.lightbox img{
  max-width:92%;
  max-height:88%;
  border-radius:12px;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
}

.lightbox .btn{
  position:absolute;
  top:18px;
  right:20px;
}

/* ========== AUTH MODAL ========== */
.auth-modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:150;
  background:rgba(2,0,6,0.7);
  backdrop-filter:blur(4px);
}

.auth-box{
  width:360px;
  max-width: 90%;
  background:linear-gradient(180deg,#130112,#191019);
  padding:18px;
  border-radius:12px;
  border:1px solid rgba(163,0,214,0.06);
  position: relative;
}

.auth-box h3 {
  margin-top: 0;
  color: var(--accent);
  font-family: UnifrakturCook;
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(2,0,6,0.6);
  z-index:999;
  backdrop-filter:blur(2px);
}

.spinner{
  width:64px;
  height:64px;
  border-radius:50%;
  background:conic-gradient(var(--accent), transparent 40%);
  filter:blur(6px);
  animation:rot 1.8s linear infinite;
}

@keyframes rot{to{transform:rotate(360deg)}}

/* ========== STATS CARD ========== */
.stats h3 {
  font-family: UnifrakturCook;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 12px;
}

.statrow {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(100, 20, 120, 0.1);
  align-items: center;
}

.statrow:last-child {
  border-bottom: none;
}

.statrow strong {
  color: var(--accent);
  font-size: 1.1rem;
}

/* ========== TIPS CARD ========== */
.tips h3 {
  font-family: UnifrakturCook;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 12px;
}

.tips ul {
  margin: 0;
  padding-left: 20px;
}

.tips li {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tips code {
  background: rgba(163, 0, 214, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--accent);
}

/* ========== VIEW SWITCHING ========== */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* ========== SCREEN READER ONLY ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========== POLLINATION LIST ========== */
.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list .card {
  margin-bottom: 0;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Tablet */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  
  .sidebar {
    width: 280px;
    flex: 0 0 280px;
  }
}

/* Small tablet */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    flex: 1;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* Mobile */
@media (max-width: 600px) {
  .site-head {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }
  
  .top-nav {
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }
  
  .nav-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
  
  .auth-wrap {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
  
  .slide-panel {
    width: 100%;
    max-width: 100%;
  }
  
  .section-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  
  .search, .sort-select {
    width: 100%;
    min-width: 0;
  }
  
  .detail-modal-content {
    width: 95%;
    max-height: 90vh;
    padding: 16px;
  }
  
  .detail-modal-content h2 {
    font-size: 1.5rem;
  }
  
  .timeline-section {
    display: block !important;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .plantCard .imgwrap {
    height: 200px;
  }
  
  .img-gallery img.gallery-img {
    height: 96px;
  }
  
  .detail-gallery {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .detail-gallery-img {
    height: 100px;
  }
  
  .panel-actions {
    flex-direction: column;
  }
  
  .panel-actions .btn {
    width: 100%;
  }
  
  /* Make action buttons always visible on mobile */
  .card-actions {
    opacity: 1;
  }
  
  .logo {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  
  .site-title {
    font-size: 18px;
  }
  
  .site-sub {
    font-size: 11px;
  }
}

/* Extra small mobile */
@media (max-width: 400px) {
  .plantCard .imgwrap {
    height: 160px;
  }
  
  .img-gallery img.gallery-img {
    height: 76px;
  }
  
  .preview-img-wrap img {
    width: 80px;
    height: 80px;
  }
  
  .photo-preview img {
    width: 70px;
    height: 70px;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(163, 0, 214, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(163, 0, 214, 0.5);
}


/* ============================================================================
   PHASE 4 STYLES - Batch Mode, Lineage Tree, Enhanced UI
   ============================================================================ */

/* ============================================================================
   PHASE 4 CSS ADDITIONS - Add these to your existing style.css
   ============================================================================ */

/* ========== BATCH OPERATIONS ========== */
.batch-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(163, 0, 214, 0.08);
  border: 1px solid rgba(163, 0, 214, 0.2);
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.batch-toolbar span {
  margin-right: auto;
}

.batch-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 6, 16, 0.95);
  border: 2px solid rgba(163, 0, 214, 0.4);
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.batch-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin: 0;
  accent-color: var(--accent);
}

.plantCard:has(.batch-checkbox input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(163, 0, 214, 0.3);
}

/* ========== LINEAGE TREE ========== */
.lineage-tree {
  padding: 20px 0;
  max-width: 100%;
  overflow-x: auto;
}

.tree-level {
  margin: 28px 0;
  text-align: center;
  position: relative;
}

.tree-level h4 {
  color: var(--accent);
  margin-bottom: 16px;
  font-family: UnifrakturCook;
  font-size: 1.1rem;
}

.tree-nodes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
  max-width: 800px;
}

.tree-siblings {
  max-width: 600px;
}

.tree-children {
  max-width: 700px;
}

.tree-node {
  display: inline-block;
  background: linear-gradient(135deg, rgba(163, 0, 214, 0.15), rgba(90, 0, 118, 0.1));
  border: 2px solid rgba(163, 0, 214, 0.3);
  border-radius: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-width: 140px;
  text-align: center;
}

.tree-node:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(163, 0, 214, 0.4);
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(163, 0, 214, 0.25), rgba(90, 0, 118, 0.15));
}

.current-node {
  background: linear-gradient(135deg, rgba(163, 0, 214, 0.3), rgba(90, 0, 118, 0.2));
  border-width: 3px;
  font-weight: 600;
  font-size: 1.1rem;
  min-width: 180px;
  box-shadow: 0 4px 16px rgba(163, 0, 214, 0.2);
}

.current-node:hover {
  transform: translateY(-4px) scale(1.05);
}

.parent-node {
  background: linear-gradient(135deg, rgba(67, 214, 163, 0.15), rgba(67, 163, 214, 0.1));
  border-color: rgba(67, 214, 163, 0.4);
}

.parent-node:hover {
  border-color: rgba(67, 214, 163, 0.8);
  box-shadow: 0 8px 24px rgba(67, 214, 163, 0.3);
}

.sibling-node {
  background: linear-gradient(135deg, rgba(214, 163, 67, 0.15), rgba(214, 120, 67, 0.1));
  border-color: rgba(214, 163, 67, 0.4);
  font-size: 0.95rem;
  padding: 10px 16px;
  min-width: 120px;
}

.sibling-node:hover {
  border-color: rgba(214, 163, 67, 0.8);
  box-shadow: 0 6px 20px rgba(214, 163, 67, 0.3);
}

.child-node {
  background: linear-gradient(135deg, rgba(255, 200, 100, 0.15), rgba(255, 150, 50, 0.1));
  border-color: rgba(255, 200, 100, 0.4);
}

.child-node:hover {
  border-color: rgba(255, 200, 100, 0.8);
  box-shadow: 0 8px 24px rgba(255, 200, 100, 0.3);
}

.tree-date {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
  font-style: italic;
}

.tree-lineage {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
  font-style: italic;
  opacity: 0.8;
}

.tree-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

/* Connecting lines between tree levels */
.tree-level::after {
  content: '';
  display: block;
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
  margin: 12px auto 0;
}

.tree-level:last-child::after {
  display: none;
}

.current-level::before {
  content: '';
  display: block;
  width: 2px;
  height: 24px;
  background: linear-gradient(to top, var(--accent) 0%, transparent 100%);
  margin: 0 auto 12px;
}

/* Tree animation */
@keyframes treeNodeAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tree-node {
  animation: treeNodeAppear 0.4s ease-out;
}

.tree-level:nth-child(1) .tree-node {
  animation-delay: 0.1s;
}

.tree-level:nth-child(2) .tree-node {
  animation-delay: 0.2s;
}

.tree-level:nth-child(3) .tree-node {
  animation-delay: 0.3s;
}

.tree-level:nth-child(4) .tree-node {
  animation-delay: 0.4s;
}

/* ========== IMPORT/EXPORT BUTTONS ========== */
.section-actions button[title="Export JSON"],
.section-actions button[title="Export CSV"],
.section-actions button[title="Import"],
.section-actions button[title="View Public Gallery"] {
  font-size: 0.9rem;
}

/* ========== PUBLIC GALLERY SPECIFIC STYLES ========== */
#detailContent h2:has-text("Public Gallery") {
  color: var(--accent);
  font-family: UnifrakturCook;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 768px) {
  .batch-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .batch-toolbar span {
    margin-right: 0;
    margin-bottom: 8px;
    text-align: center;
  }
  
  .batch-toolbar button {
    width: 100%;
  }
  
  .tree-node {
    min-width: 100px;
    font-size: 0.9rem;
    padding: 10px 14px;
  }
  
  .current-node {
    min-width: 140px;
    font-size: 1rem;
  }
  
  .tree-nodes {
    gap: 8px;
  }
  
  .tree-level h4 {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .section-actions {
    gap: 6px;
  }
  
  .section-actions button {
    font-size: 0.85rem;
    padding: 6px 10px;
  }
  
  .tree-node {
    min-width: 80px;
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  
  .current-node {
    min-width: 120px;
    font-size: 0.95rem;
  }
  
  .sibling-node,
  .child-node {
    min-width: 90px;
    font-size: 0.8rem;
  }
  
  /* Make batch checkbox more visible on mobile */
  .batch-checkbox {
    transform: scale(1.1);
  }
}

/* ========== ENHANCED CARD ACTIONS WITH TREE BUTTON ========== */
.card-actions {
  gap: 6px;
}

.btn-icon[title="Family Tree"] {
  font-size: 18px;
}

/* ========== UTILITY CLASSES ========== */
.flex-wrap {
  flex-wrap: wrap;
}

.gap-8 {
  gap: 8px;
}

.mt-20 {
  margin-top: 20px;
}

/* ========== TREE LEGEND (Optional - Add if you want) ========== */
.tree-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

.legend-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid;
}

.legend-box.parent {
  background: linear-gradient(135deg, rgba(67, 214, 163, 0.15), rgba(67, 163, 214, 0.1));
  border-color: rgba(67, 214, 163, 0.4);
}

.legend-box.current {
  background: linear-gradient(135deg, rgba(163, 0, 214, 0.3), rgba(90, 0, 118, 0.2));
  border-color: var(--accent);
}

.legend-box.child {
  background: linear-gradient(135deg, rgba(255, 200, 100, 0.15), rgba(255, 150, 50, 0.1));
  border-color: rgba(255, 200, 100, 0.4);
}

/* ========== GENDER SYMBOLS IN TREE ========== */
.tree-node:has-text("♀") {
  /* Seed parent styling */
}

.tree-node:has-text("♂") {
  /* Pollen parent styling */
}

/* ========== SMOOTH TRANSITIONS ========== */
* {
  transition-property: background, border-color, box-shadow, transform;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

button, .btn, .btn-icon, .tree-node, .plantCard {
  transition-duration: 0.3s;
}
/* ============================================================================
   PHASE 5 CSS - Print Labels, Wishlist, Network Graph
   Add these styles to the end of your style.css
   ============================================================================ */

/* ========== WISHLIST ========== */
.wishlist-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wishlist-item {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(163, 0, 214, 0.2);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.wishlist-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(163, 0, 214, 0.4);
  transform: translateX(4px);
}

.wishlist-tab {
  padding: 6px 12px !important;
  font-size: 0.9rem !important;
}

.wishlist-tab.active {
  background: rgba(163, 0, 214, 0.2) !important;
  border-color: var(--accent) !important;
}

/* ========== PRINT LABELS ========== */
.label-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.label-preview-item {
  cursor: pointer;
  display: block;
}

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

.label-preview-card {
  padding: 12px;
  background: rgba(163, 0, 214, 0.05);
  border: 1px solid rgba(163, 0, 214, 0.2);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.2s ease;
}

.label-preview-item:hover .label-preview-card {
  background: rgba(163, 0, 214, 0.1);
  border-color: rgba(163, 0, 214, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(163, 0, 214, 0.2);
}

.label-preview-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--soft);
}

.label-checkbox {
  margin: 0 !important;
}

/* ========== NETWORK GRAPH ========== */
#networkCanvas {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1f 100%);
  border: 2px solid rgba(163, 0, 214, 0.2);
  border-radius: 8px;
  cursor: grab;
}

#networkCanvas:active {
  cursor: grabbing;
}

.network-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.network-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.network-legend span {
  font-weight: bold;
  margin-right: 4px;
}

#networkInfo {
  padding: 12px;
  background: rgba(163, 0, 214, 0.05);
  border: 1px solid rgba(163, 0, 214, 0.2);
  border-radius: 8px;
  font-size: 0.95rem;
}

#selectedNodeInfo {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(163, 0, 214, 0.2);
  border-radius: 8px;
  min-height: 80px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .label-preview-grid {
    grid-template-columns: 1fr;
  }
  
  .network-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .network-controls button,
  .network-controls select {
    width: 100%;
  }
  
  #networkCanvas {
    max-height: 400px;
  }
  
  .wishlist-tabs {
    flex-direction: column;
  }
  
  .wishlist-tab {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .wishlist-item {
    padding: 12px;
  }
  
  .wishlist-item > div {
    flex-direction: column;
    align-items: start !important;
  }
  
  .wishlist-item button {
    width: 100%;
    margin-top: 8px;
  }
  
  #networkCanvas {
    max-height: 300px;
  }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wishlist-item {
  animation: fadeInUp 0.3s ease-out;
}

.label-preview-item {
  animation: fadeInUp 0.3s ease-out;
}

/* ========== PRINT SPECIFIC ========== */
@media print {
  body {
    background: white !important;
  }
  
  .no-print {
    display: none !important;
  }
}  /* <-- this closes the print block */

/* ========== PARENT INFORMATION STYLING ========== */
.detail-section h4 {
  color: var(--accent);
  margin-bottom: 12px;
  font-family: UnifrakturCook;
  font-size: 1.1rem;
}

.parent-info-section {
  background: rgba(163, 0, 214, 0.05);
  border: 1px solid rgba(163, 0, 214, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
}

.parent-info-section p {
  margin: 4px 0;
  font-size: 0.95rem;
}

.parent-info-section strong {
  color: var(--accent);
  font-weight: 600;
}

.seed-parent-section {
  border-left: 3px solid rgba(67, 214, 163, 0.6);
  background: rgba(67, 214, 163, 0.05);
  border-color: rgba(67, 214, 163, 0.2);
}

.pollen-parent-section {
  border-left: 3px solid rgba(255, 163, 67, 0.6);
  background: rgba(255, 163, 67, 0.05);
  border-color: rgba(255, 163, 67, 0.2);
}

.parent-section {
  margin: 16px 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(163, 0, 214, 0.1);
  transition: all 0.2s ease;
}

.parent-section:hover {
  border-color: rgba(163, 0, 214, 0.3);
  box-shadow: 0 4px 12px rgba(163, 0, 214, 0.1);
}

.parent-label {
  display: inline-block;
  background: rgba(163, 0, 214, 0.1);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 8px;
}

.seed-label {
  background: rgba(67, 214, 163, 0.15);
  color: #43d6a3;
}

.pollen-label {
  background: rgba(255, 163, 67, 0.15);
  color: #ffa343;
}

/* Hide empty action bars */
.section-actions:empty {
  display: none !important;
}

.section-actions {
  justify-content: flex-start !important;
}

/* =============================================================================
   MARKETPLACE STYLES
   ============================================================================= */

.marketplace-card {
  background: linear-gradient(180deg, rgba(20,10,22,0.6), rgba(12,6,16,0.6));
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.03);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.marketplace-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(163,0,214,0.2);
}

.marketplace-image {
  height: 220px;
  overflow: hidden;
  background: linear-gradient(180deg,#0b0710,#120612);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.marketplace-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marketplace-image .no-image {
  color: var(--muted);
  font-size: 0.9rem;
}

.listing-badges-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.marketplace-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.marketplace-title {
  margin: 0;
  color: var(--soft);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.marketplace-title:hover {
  color: var(--accent);
}

.marketplace-seller {
  padding: 10px 0;
  border-bottom: 1px solid rgba(163, 0, 214, 0.1);
}

.seller-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.seller-name {
  font-weight: 600;
  color: var(--soft);
  font-size: 0.95rem;
}

.seller-rating {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.seller-location {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.plant-location {
  font-size: 0.85rem;
  color: var(--muted);
}

.marketplace-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.marketplace-contact-btn {
  width: 100%;
  margin-top: 8px;
  font-weight: 600;
}

.owner-badge {
  text-align: center;
  padding: 10px;
  background: rgba(163, 0, 214, 0.1);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Listing Detail View */
.listing-detail-container {
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
}

.listing-header {
  margin-bottom: 24px;
}

.listing-header h2 {
  margin: 0 0 12px 0;
  color: var(--soft);
  font-size: 2rem;
  font-family: UnifrakturCook;
}

.listing-badges-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.listing-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.listing-gallery-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
  border: 1px solid rgba(163, 0, 214, 0.2);
}

.listing-gallery-img:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

.listing-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.listing-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(163, 0, 214, 0.1);
  border-radius: 12px;
  padding: 24px;
}

.detail-card h3 {
  margin: 0 0 16px 0;
  color: var(--accent);
  font-size: 1.3rem;
}

.listing-description {
  line-height: 1.7;
  color: var(--soft);
  margin-bottom: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(163, 0, 214, 0.1);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

.detail-value {
  color: var(--soft);
  line-height: 1.6;
}

.seller-card {
  position: sticky;
  top: 24px;
}

.seller-profile {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(163, 0, 214, 0.1);
}

.seller-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.seller-name-large {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--soft);
}

.seller-rating-large {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 4px;
}

.seller-bio {
  margin-top: 16px;
  padding: 16px;
  background: rgba(163, 0, 214, 0.05);
  border-radius: 8px;
  border-left: 4px solid var(--accent);
}

.seller-bio strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
}

.seller-bio p {
  margin: 0;
  line-height: 1.6;
  color: var(--soft);
}

.listing-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
}

.btn-secondary:hover {
  background: rgba(163, 0, 214, 0.1);
}

.reviews-section {
  margin-top: 24px;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(163, 0, 214, 0.1);
  border-radius: 8px;
}

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

.review-stars {
  color: #ffd700;
  margin-top: 4px;
  font-size: 0.9rem;
}

.review-text {
  margin: 0;
  line-height: 1.6;
  color: var(--soft);
}

.btn-close-modal {
  width: 100%;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .listing-detail-grid {
    grid-template-columns: 1fr;
  }
  
  .seller-card {
    position: static;
  }
  
  .listing-detail-container {
    padding: 16px;
  }
  
  .listing-gallery {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   MESSAGING STYLES
   ============================================================================= */

.messages-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: 600px;
  max-height: 600px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border: 1px solid rgba(100,20,120,0.06);
  border-radius: 12px;
  overflow: hidden;
}

.message-threads {
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid rgba(163, 0, 214, 0.2);
  padding: 0;
  overflow-y: auto;
  max-height: 600px;
}

.message-thread-item {
  padding: 16px;
  border-bottom: 1px solid rgba(163, 0, 214, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.message-thread-item:hover {
  background: rgba(163, 0, 214, 0.1);
}

.message-thread-item.active {
  background: rgba(163, 0, 214, 0.2);
  border-left: 3px solid var(--accent);
}

.message-conversation {
  display: flex;
  flex-direction: column;
  min-height: 600px;
  max-height: 600px;
}

.conversation-header {
  padding: 20px;
  border-bottom: 1px solid rgba(163, 0, 214, 0.2);
  background: rgba(163, 0, 214, 0.05);
}

.conversation-header h3 {
  margin: 0;
  color: var(--accent);
  font-size: 1.2rem;
}

.message-list {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.05));
}

.message-item {
  display: flex;
  margin-bottom: 4px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-item.own {
  justify-content: flex-end;
}

.message-item.other {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  word-wrap: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.message-item.own .message-bubble {
  background: linear-gradient(135deg, rgba(163, 0, 214, 0.4), rgba(163, 0, 214, 0.25));
  border: 1px solid rgba(163, 0, 214, 0.5);
  border-bottom-right-radius: 4px;
}

.message-item.other .message-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(163, 0, 214, 0.15);
  border-bottom-left-radius: 4px;
}

.message-bubble p {
  margin: 0 0 6px 0;
  color: var(--soft);
  line-height: 1.5;
  word-break: break-word;
}

.message-bubble small {
  font-size: 0.75rem;
  opacity: 0.7;
}

.message-input-container {
  padding: 16px 20px;
  border-top: 1px solid rgba(163, 0, 214, 0.2);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 12px;
  align-items: center;
}

.message-input-container input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 24px;
  border: 1px solid rgba(163, 0, 214, 0.3);
  background: rgba(0, 0, 0, 0.4);
  color: var(--soft);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.message-input-container input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(163, 0, 214, 0.15);
  background: rgba(0, 0, 0, 0.5);
}

.message-input-container input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.message-input-container .btn {
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 600;
  min-width: 80px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  height: 100%;
}

.empty-state p:first-child {
  font-size: 1.1rem;
  color: var(--soft);
  margin-bottom: 8px;
}

.badge {
  background: var(--accent);
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-block;
  min-width: 20px;
  text-align: center;
}

/* =============================================================================
   RESPONSIVE - MARKETPLACE & MESSAGING
   ============================================================================= */

@media (max-width: 768px) {
  .messages-layout {
    grid-template-columns: 1fr;
    max-height: 500px;
  }
  
  .message-threads {
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid rgba(163, 0, 214, 0.2);
  }
  
  .message-bubble {
    max-width: 85%;
  }
  
  .listing-badges {
    flex-direction: column;
  }
  
  .message-conversation {
    min-height: 300px;
    max-height: 300px;
  }
}

@media (max-width: 600px) {
  .star-rating {
    font-size: 1.5rem;
    gap: 4px;
  }
  
  .message-input-container {
    padding: 12px;
  }
  
  .message-input-container input {
    font-size: 0.9rem;
    padding: 10px 14px;
  }
  
  .message-input-container .btn {
    padding: 10px 16px;
    min-width: 60px;
  }
}

/* =============================================================================
   PROFILE SETTINGS
   ============================================================================= */

.profile-settings-container {
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
}

.profile-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid rgba(163, 0, 214, 0.2);
  padding-bottom: 0;
}

.profile-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 12px 20px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -2px;
}

.profile-tab:hover {
  color: var(--soft);
  background: rgba(163, 0, 214, 0.05);
}

.profile-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(163, 0, 214, 0.1);
}

.profile-tab-content {
  display: none;
}

.profile-tab-content.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

.profile-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(163, 0, 214, 0.1);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.profile-section h3 {
  margin: 0 0 8px 0;
  color: var(--accent);
  font-size: 1.2rem;
}

.profile-field {
  margin-bottom: 20px;
}

.profile-field:last-child {
  margin-bottom: 0;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.field-label strong {
  color: var(--soft);
  font-size: 0.95rem;
}

.required {
  color: #ff6b9d;
  font-weight: bold;
}

.profile-field input[type="text"],
.profile-field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(163, 0, 214, 0.3);
  background: rgba(0, 0, 0, 0.3);
  color: var(--soft);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.profile-field input[type="text"]:focus,
.profile-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(163, 0, 214, 0.15);
  background: rgba(0, 0, 0, 0.4);
}

.profile-field small {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
}

.profile-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.location-preview {
  background: rgba(163, 0, 214, 0.05);
  border: 1px solid rgba(163, 0, 214, 0.2);
  border-radius: 8px;
  padding: 16px;
}

.shipping-tips {
  background: rgba(163, 0, 214, 0.05);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px;
  margin-top: 20px;
}

.shipping-tips ul {
  color: var(--soft);
  font-size: 0.9rem;
}

.shipping-tips li {
  margin-bottom: 4px;
}

.profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(163, 0, 214, 0.2);
}

@media (max-width: 768px) {
  .profile-tabs {
    flex-direction: column;
    border-bottom: none;
  }
  
  .profile-tab {
    border-bottom: 1px solid rgba(163, 0, 214, 0.2);
    border-left: 3px solid transparent;
    margin-bottom: 0;
  }
  
  .profile-tab.active {
    border-left-color: var(--accent);
    border-bottom-color: rgba(163, 0, 214, 0.2);
  }
  
  .profile-field-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-settings-container {
    padding: 16px;
  }
  
  .profile-section {
    padding: 16px;
  }
}

/* Badge Styles for Star Rating Modal */
.star-rating {
  display: flex;
  gap: 8px;
  font-size: 2rem;
  cursor: pointer;
}

.star {
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.star:hover {
  transform: scale(1.2);
}

.listing-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid;
  backdrop-filter: blur(8px);
}

.sale-badge {
  background: rgba(67, 214, 163, 0.9);
  border-color: #43d6a3;
  color: white;
  box-shadow: 0 4px 12px rgba(67, 214, 163, 0.3);
}

.swap-badge {
  background: rgba(163, 0, 214, 0.9);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(163, 0, 214, 0.3);
}
