/* RuDiCo Social styles - Facebook-inspired feed adapted to site theme */
:root{
  --chat-base-right: 18px;
  --chat-gap: 36px;
  --chat-toggle-size: 44px;
  --chat-panel-width: 320px;
  --chat-shift: 0px; /* dynamic extra shift when panels open */
  --chat-initial-right: calc(var(--chat-base-right) + var(--chat-toggle-size) + var(--chat-gap));
  /* layout widths tuned to designer screenshot (dynamic clamps used below) */
  --left-min: 220px;
  --left-max: 340px;
  --center-min: 640px;
  --center-max: 1080px;
  --right-min: 260px;
  --right-max: 420px;
  /* use RuDiCo brand variables from main site when available */
    /* Prefer site-wide variables if available, fall back to RuDiCo defaults */
    --accent: var(--primary-dark, #6b6bff);
    --accent-2: #7a67ff;
    --card: var(--card, #0f0f10);
    --bg: var(--bg-dark, #0b0b0c);
    --muted: var(--muted, #9a9aa8);
    --text: var(--text, #e7e6ea);
    --muted-2: rgba(255,255,255,0.03);
    /* light theme card variables */
    --card-light: var(--card-light, #ffffff);
    --card-border-light: rgba(0,0,0,0.06);
    --card-shadow-light: 0 10px 30px rgba(15,15,15,0.06);
    --card-head-dark: #2b2b2b;
}
body{background:var(--bg);color:var(--text)}
  /* light theme fallback: if body does NOT have .dark, use light vars from main site when present */
  :root{ --light-bg: var(--bg-light, #ffffff); --light-text: var(--text-light, #222); }
  body:not(.dark){ --bg: var(--light-bg); --text: var(--light-text); --card: var(--card, #ffffff); }

  /* dark overrides when body has .dark */
  body.dark{ --bg: var(--bg-dark, #0b0b0c); --text: var(--text-dark, #e7e6ea); --card: #0f0f10; }

/* topbar */
.social-topbar{background:transparent;border-bottom:1px solid rgba(255,255,255,0.03);position:sticky;top:0;z-index:160}
.social-topbar-inner{max-width:1200px;margin:0 auto;display:flex;align-items:center;gap:12px;padding:8px 16px}
.social-topbar .logo{font-weight:700;color:var(--text);margin-right:8px;text-decoration:none;display:inline-flex;align-items:center}
.social-topbar .back{color:var(--muted);text-decoration:none;margin-right:10px;font-size:14px}
.top-center{flex:1;display:flex;flex-direction:column;align-items:center}
.top-title{font-size:13px;color:var(--accent);margin-bottom:4px}
.top-search input{width:100%;padding:8px 12px;border-radius:20px;border:1px solid rgba(255,255,255,0.06);background:rgba(0,0,0,0.12);color:var(--text);box-shadow:inset 0 1px 0 rgba(255,255,255,0.02)}
.top-nav{display:flex;gap:8px;margin-top:8px}
.icon-btn{color:var(--accent);padding:6px 12px;border-radius:8px;text-decoration:none;font-weight:600}
.icon-btn:hover{background:rgba(107,103,255,0.06);color:var(--text)}
.noti-link{position:relative;display:inline-flex;align-items:center;gap:6px}
.social-noti-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#e53935;color:#fff;font-size:11px;font-weight:700;line-height:1;box-shadow:0 3px 8px rgba(229,57,53,0.38)}
.top-right{display:flex;align-items:center;gap:8px}
.header-noti-wrap{position:relative;display:flex;align-items:center}
.social-bell-btn{
  position:relative;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.03);
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:transform .18s ease, background .18s ease, border-color .18s ease;
}

.social-bell-btn:hover,
.social-bell-btn[aria-expanded="true"]{
  transform:translateY(-1px);
  background:rgba(107,103,255,0.12);
  border-color:rgba(107,103,255,0.42);
}

.social-bell-btn svg{
  width:20px;
  height:20px;
  fill:currentColor;
}

.social-bell-btn .social-noti-badge{
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:20px;
  height:20px;
  font-size:10px;
  padding:0 6px;
}

.social-noti-pocket{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  width:min(360px, calc(100vw - 24px));
  max-height:420px;
  overflow:hidden;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.09);
  background:linear-gradient(180deg, rgba(19,19,25,0.96), rgba(13,13,18,0.98));
  box-shadow:0 24px 54px rgba(0,0,0,0.52);
  z-index:220;
}

.social-noti-pocket-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,0.07);
}

.social-noti-pocket-list{
  display:grid;
  gap:2px;
  max-height:356px;
  overflow:auto;
  padding:6px;
}

.social-noti-pocket-item{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:flex-start;
  padding:10px;
  border-radius:10px;
  text-decoration:none;
  color:var(--text);
  border:1px solid transparent;
}

.social-noti-pocket-item:hover{
  background:rgba(255,255,255,0.04);
  border-color:rgba(255,255,255,0.08);
}

.social-noti-pocket-item.is-unread{
  background:rgba(229,57,53,0.08);
  border-color:rgba(229,57,53,0.24);
}

.noti-pocket-avatar{
  width:34px;
  height:34px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
}

.noti-pocket-main{
  min-width:0;
}

.noti-pocket-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.noti-pocket-title-row strong{
  font-size:13px;
  color:var(--text);
}

.noti-pocket-title-row span{
  color:var(--muted);
  font-size:11px;
  white-space:nowrap;
}

.noti-pocket-main p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.noti-pocket-dot{
  width:8px;
  height:8px;
  margin-top:6px;
  border-radius:50%;
  background:#e53935;
  box-shadow:0 0 0 4px rgba(229,57,53,0.18);
}

.social-noti-empty{
  padding:16px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}

body:not(.dark) .social-bell-btn{
  border-color:rgba(16,20,26,0.14);
  background:#ffffff;
  color:var(--text-light);
}

body:not(.dark) .social-bell-btn:hover,
body:not(.dark) .social-bell-btn[aria-expanded="true"]{
  background:rgba(107,103,255,0.12);
  border-color:rgba(107,103,255,0.35);
}

body:not(.dark) .social-noti-pocket{
  background:#ffffff;
  border-color:rgba(16,20,26,0.12);
  box-shadow:0 20px 44px rgba(16,20,26,0.16);
}

body:not(.dark) .social-noti-pocket-head{
  border-bottom-color:rgba(16,20,26,0.1);
}

body:not(.dark) .social-noti-pocket-item:hover{
  background:rgba(16,20,26,0.04);
  border-color:rgba(16,20,26,0.12);
}

body:not(.dark) .social-noti-pocket-item.is-unread{
  background:rgba(229,57,53,0.08);
  border-color:rgba(229,57,53,0.22);
}

@media (max-width: 980px){
  .social-topbar-inner{
    flex-wrap:wrap;
  }

  .top-center{
    order:3;
    width:100%;
  }

  .top-right{
    margin-left:auto;
    flex-wrap:wrap;
    justify-content:flex-end;
  }

  .social-noti-pocket{
    right:0;
  }
}

@media (max-width: 640px){
  .top-right .btn-light,
  .top-right .social-lang{
    display:none;
  }

  .social-noti-pocket{
    width:min(340px, calc(100vw - 18px));
    right:-4px;
  }
}

.top-avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent-2));display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700}
.btn-light{background:transparent;border:1px solid rgba(255,255,255,0.04);padding:8px 10px;border-radius:8px;color:var(--text);text-decoration:none}
.btn-light:hover{background:rgba(255,255,255,0.02)}

.social-grid{display:grid;gap:28px;margin:0 auto;padding:18px 28px;align-items:flex-start;transition:padding-right .28s ease; padding-right: calc(28px + var(--chat-shift));
  grid-template-columns: 
    clamp(var(--left-min), 18vw, var(--left-max)) 
    clamp(var(--center-min), 60vw, var(--center-max)) 
    clamp(var(--right-min), 20vw, var(--right-max));
  justify-content:center;
  width:100%;
}
.social-left{min-width:var(--left-min);}
.social-panel{min-width:var(--center-min);max-width:var(--center-max);justify-self:center}
.social-right{min-width:var(--right-min)}
.social-left,.social-right{position:relative}

/* Stories strip */
.hero-stories{max-width:1200px;margin:0 auto;padding:8px 24px}
.stories{display:flex;gap:12px;overflow:auto;padding:8px 4px}
.story{min-width:120px;height:170px;border-radius:14px;background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;padding:14px;flex-shrink:0;border:1px solid rgba(255,255,255,0.02)}
.story .story-avatar{width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent-2));display:flex;align-items:center;justify-content:center;font-weight:700;margin-bottom:8px}
.story .story-name{font-size:13px;color:var(--text)}

/* Chat heads */
.chat-heads{position:fixed;right:var(--chat-base-right);bottom:110px;display:flex;flex-direction:column;gap:8px;z-index:9999;transition:right .28s cubic-bezier(.2,.9,.2,1)}
.chat-head{width:44px;height:44px;border-radius:50%;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,0.5);cursor:pointer;display:flex;align-items:center;justify-content:center;background:var(--card);color:var(--text)}
.chat-head .badge{position:absolute;right:-2px;top:-2px;background:#ff3b30;color:#fff;border-radius:10px;padding:2px 6px;font-size:11px}

/* Toggle button that shows contacts */
.chat-toggle-btn{position:fixed;right:var(--chat-base-right);bottom:18px;width:48px;height:48px;border-radius:50%;background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;border:none;box-shadow:0 6px 18px rgba(0,0,0,0.5);cursor:pointer;z-index:10001;display:flex;align-items:center;justify-content:center}

 .chat-contacts-panel{position:fixed;right:var(--chat-base-right);bottom:44px;width:var(--chat-panel-width);max-height:420px;background:var(--card);border-radius:12px;box-shadow:0 8px 30px rgba(0,0,0,0.6);overflow:auto;display:none;flex-direction:column;padding:8px;z-index:10000;transition:right .28s cubic-bezier(.2,.9,.2,1), transform .28s cubic-bezier(.2,.9,.2,1)}
.chat-contacts-panel .panel-header{display:flex;align-items:center;justify-content:space-between;padding:6px 8px;border-bottom:1px solid rgba(255,255,255,0.03)}
.chat-contacts-panel .contacts-list{display:flex;flex-direction:column;gap:6px;padding:8px}
.chat-contacts-panel .new-chat{display:flex;gap:8px;padding:8px}
.chat-contacts-panel .new-chat input{flex:1;padding:8px;border-radius:8px;border:1px solid rgba(255,255,255,0.04);background:transparent;color:var(--text)}
.chat-contacts-panel .new-chat button{padding:8px;border-radius:8px;background:var(--accent);color:#fff;border:none}

.composer{background:transparent;padding:20px;border-radius:14px;margin:0 auto 18px;box-sizing:border-box;max-width:min(820px,80%)}
.composer-inner{display:flex;gap:16px;align-items:flex-start}
.composer .avatar{width:64px;height:64px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent-2));display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700}
.composer textarea{flex:1;width:100%;background:transparent;border:1px solid rgba(255,255,255,0.06);color:var(--text);padding:20px;border-radius:14px;resize:none;min-height:180px;max-height:720px;overflow:auto;font-family:monospace}
.composer-actions{display:flex;align-items:center;gap:12px;margin-top:14px}
.composer .btn-primary{background:linear-gradient(90deg,var(--accent),var(--accent-2));border:none;color:#fff;padding:10px 22px;border-radius:10px;min-width:140px;box-shadow:0 6px 18px rgba(106,90,255,0.12)}
.image-preview{margin-top:8px;border-radius:10px;overflow:hidden}
.image-preview img{max-width:100%;height:auto;display:block;border-radius:10px}

/* file input styled */
.composer input[type=file]{display:none}
.composer .file-label{background:rgba(255,255,255,0.03);padding:8px 12px;border-radius:8px;color:var(--muted);cursor:pointer;border:1px dashed rgba(255,255,255,0.03)}

.feed .post{background:linear-gradient(180deg,rgba(255,255,255,0.01),transparent);border-radius:14px;padding:18px;margin-bottom:22px;border:1px solid rgba(255,255,255,0.02);min-height:180px}
.post-header{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.post-header{position:relative}
.avatar{width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent-2));display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:14px}

/* settings gear + pocket */
.settings-btn{position:absolute;right:14px;top:12px;width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.02);border:1px solid rgba(255,255,255,0.04);color:var(--text);cursor:pointer;z-index:10020;box-shadow:0 6px 20px rgba(0,0,0,0.45)}
.settings-btn:hover{background:rgba(255,255,255,0.04)}
.settings-menu{position:absolute;right:14px;top:52px;background:var(--card);border:1px solid rgba(255,255,255,0.04);box-shadow:0 8px 28px rgba(0,0,0,0.6);padding:8px;border-radius:10px;min-width:160px;display:none;flex-direction:column;z-index:10003}
.settings-menu button{background:transparent;border:none;padding:8px 10px;text-align:left;color:var(--text);cursor:pointer;border-radius:6px}
.settings-menu button:hover{background:rgba(255,255,255,0.02)}
.post:hover .settings-btn{opacity:1}
.post-meta{display:flex;flex-direction:column}
.post-meta strong{color:var(--text);font-size:15px}
.post-meta .time{color:var(--muted);font-size:12px}
.post-body{color:var(--text);line-height:1.6;margin:12px 0;text-align:left}

/* Ensure comments use left alignment and sensible spacing */
.comments .comment{ text-align:left }
.comments .comment div{ color:var(--text); }
.comments .comment .time{ color:var(--muted); font-size:12px; display:block }
.post-media{margin-top:8px;border-radius:12px;overflow:hidden}
.post-media img{width:100%;height:auto;display:block;border-radius:12px}

.post-actions{display:flex;gap:8px;border-top:1px solid var(--muted-2);padding-top:10px;margin-top:8px}
.post-actions button{flex:1;background:transparent;border:none;color:var(--muted);padding:10px;border-radius:8px;cursor:pointer}
.post-actions button:hover{background:rgba(255,255,255,0.02);color:var(--text)}
.post-actions .contact-btn{flex:0 0 auto;padding:8px 12px;border-radius:8px;background:transparent;border:1px solid rgba(255,255,255,0.04);color:var(--accent);text-decoration:none}

/* suggestion card and follow btn */
.suggestion{display:flex;gap:12px;align-items:center;padding:10px;border-radius:10px;justify-content:space-between}
.suggestion .avatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent-2));display:flex;align-items:center;justify-content:center;color:#fff}
.suggestion > div:nth-child(2){flex:1;min-width:0;margin-left:8px}
.follow-btn{margin-left:12px;padding:6px 10px;border-radius:8px;background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;border:none;cursor:pointer;white-space:nowrap;flex:0 0 auto}
.follow-btn.following{background:transparent;border:1px solid rgba(255,255,255,0.06);color:var(--muted)}
.post-actions .contact-btn{flex:0 0 auto;padding:8px 12px;border-radius:8px;background:transparent;border:1px solid rgba(0,0,0,0.06);color:var(--accent);text-decoration:none}

/* simple entry animation */
.post{opacity:1;transform:none;transition:opacity .25s ease,transform .25s ease}

.comments{margin-top:10px;border-top:1px dashed rgba(255,255,255,0.02);padding-top:8px}
.comment{padding:6px 8px;border-radius:6px;margin-bottom:6px;background:rgba(255,255,255,0.01)}
.comment .time{display:block;color:var(--muted);font-size:12px}
.comment-form{display:flex;gap:8px;margin-top:8px}
.comment-form input{flex:1;padding:8px;border-radius:6px;border:1px solid rgba(255,255,255,0.04);background:transparent;color:var(--text)}
.comment-form button{padding:8px 10px;border-radius:6px;background:transparent;border:1px solid rgba(255,255,255,0.04);color:var(--muted)}

.social-left .card,.social-right .card{background:var(--card);border-radius:12px;padding:12px;margin-bottom:12px;box-shadow:0 2px 10px rgba(0,0,0,0.4)}
.shortcuts a{display:block;color:var(--text);padding:8px;border-radius:6px;text-decoration:none}
.shortcuts a:hover{background:rgba(255,255,255,0.02)}

@media (max-width:1000px){
  .social-grid{grid-template-columns:1fr; padding:12px}
  .social-panel{grid-column:1}
  .social-left,.social-right{display:none}
}

@media (max-width:700px){
  .composer textarea{min-height:48px}
  .avatar{width:36px;height:36px}
}

.container .hero{max-width:1200px;margin:0 auto 1rem;padding-top:12px}

/* Chat widget bottom-right */
.chat-widget{position:fixed;right:var(--chat-initial-right);bottom:18px;width:var(--chat-panel-width);max-height:420px;background:var(--card);border-radius:12px;box-shadow:0 12px 36px rgba(0,0,0,0.7);overflow:hidden;display:flex;flex-direction:column;transition:right .28s cubic-bezier(.2,.9,.2,1);z-index:10002}
.chat-header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid rgba(255,255,255,0.03);background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent)}
.chat-header-actions{display:flex;gap:8px;align-items:center}
.chat-hbtn{background:rgba(255,255,255,0.02);border:1px solid rgba(255,255,255,0.03);color:var(--text);border-radius:8px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.chat-hbtn:hover{background:rgba(255,255,255,0.04)}
.chat-list{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:var(--card);border-radius:8px;border:1px solid rgba(255,255,255,0.04)}

/* placeholder when conversation is empty */
.chat-empty{padding:18px;border-radius:8px;background:rgba(255,255,255,0.01);color:var(--muted);font-style:italic;min-height:120px;display:flex;align-items:center}
.chat-input{display:flex;padding:8px;border-top:1px solid rgba(255,255,255,0.03)}
.chat-input input{flex:1;padding:8px;border-radius:8px;border:1px solid rgba(255,255,255,0.04);background:transparent;color:var(--text)}
.chat-input button{margin-left:8px;padding:8px;border-radius:8px;background:var(--accent);color:#fff;border:none}
.chat-contact{display:flex;align-items:center;gap:8px;padding:6px;border-radius:8px;cursor:pointer}
.chat-contact .avatar{width:36px;height:36px}
.chat-message{padding:8px;border-radius:8px;background:rgba(255,255,255,0.02);max-width:80%}
.chat-message.me{background:linear-gradient(90deg,var(--accent),#ff7a7a);color:#fff;margin-left:auto}

/* minimized state: show only header */
.chat-widget.minimized{height:auto;max-height:none}
.chat-widget.minimized .chat-list,.chat-widget.minimized .chat-input{display:none}

/* when a panel is open shift widget left using CSS var */
.chat-widget{right: calc(var(--chat-initial-right) + var(--chat-shift));}
.chat-contacts-panel{right: calc(var(--chat-base-right) + var(--chat-shift));}
.chat-heads{right: calc(var(--chat-base-right) + var(--chat-shift));}

/* when contacts panel is open, place the chat widget to the left of the panel
   so the conversation box doesn't sit behind the contacts panel */
.chat-panel-open .chat-widget{
  right: calc(var(--chat-base-right) + var(--chat-shift) + var(--chat-panel-width) + var(--chat-gap));
}

/* keep left sidebar visible while scrolling */
.social-left .card{position:sticky;top:96px}

/* reserve right-hand space so main content doesn't get overlapped by chat UI on large screens */
/* the grid padding-right now uses --chat-shift and is updated by JS when the contacts panel opens */

/* Light theme — Neutral palette adapted to site accent colors */
:root{
  --bg-light: #e9e9e9;             /* page background */
  --card-light: #fbfcfe;           /* card surface (not pure white) */
  --card-border-light: rgba(16,20,26,0.06);
  --card-shadow-light: 0 10px 30px rgba(16,20,26,0.06);
  --text-light: #1f2328;          /* slightly darker text for readability */
  --muted-light: #6b6f76;
}

body:not(.dark){ background:var(--bg-light); color:var(--text-light); }

body:not(.dark) .card,
body:not(.dark) .feed .post,
body:not(.dark) .composer{
  background: var(--card-light);
  color: var(--text-light);
  border: 1px solid var(--card-border-light);
  box-shadow: var(--card-shadow-light), 0 2px 8px rgba(107,103,255,0.03);
  transition: box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

/* headings slightly tinted using accent */
body:not(.dark) .card h4,
body:not(.dark) .card strong{
  color: var(--card-head-dark, #222);
}

/* suggestions card uses the same subtle surface but keeps the follow button intact */
body:not(.dark) .suggestion{
  background:var(--card-light);
  box-shadow:var(--card-shadow-light), 0 2px 6px rgba(107,103,255,0.02);
  border:1px solid var(--card-border-light);
}
/* emphasize follow button using the site accent gradient */
body:not(.dark) .follow-btn{ background: linear-gradient(90deg, var(--accent), var(--accent-2)); color:#fff }

/* Ensure the small "← Torna al sito" back link is readable in light theme */
body:not(.dark) .social-topbar .back {
  color: var(--muted-light);
}

/* Light topbar border for better separation on light backgrounds */
body:not(.dark) .social-topbar{
  border-bottom: 1px solid var(--card-border-light);
}

/* Explore page restyle */
.explore-page{
  max-width: 1020px;
  margin: 0 auto;
  padding: 16px 24px 26px;
}

.explore-page .card{
  max-width: none;
  width: 100%;
  flex: initial;
}

.explore-page .card:hover{
  transform: none;
}

.explore-hero{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.05);
  background: var(--card);
  margin-bottom: 12px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.explore-hero-headline h1{
  margin: 0;
  font-size: clamp(26px, 2.4vw, 36px);
}

.explore-hero-headline p{
  margin: 7px 0 0;
}

.explore-search-wrap{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(420px, 100%);
}

.explore-search-input{
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  color: var(--text);
}

.explore-chip-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.explore-controls-panel{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.explore-control-block{
  display: grid;
  gap: 7px;
}

.explore-control-block label{
  font-size: 13px;
  color: var(--muted);
}

.explore-control-input{
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background-color: rgba(255,255,255,0.02);
  background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.7) 50%), linear-gradient(135deg, rgba(255,255,255,0.7) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--text);
  padding: 10px 34px 10px 11px;
}

.explore-control-input option{
  background: #15161a;
  color: var(--text);
}

.explore-checkbox-row{
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.explore-checkbox-row input[type="checkbox"]{
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.explore-chip{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  cursor: pointer;
}

.explore-chip:hover{
  border-color: rgba(122,103,255,0.6);
  color: #fff;
}

.explore-results-panel{
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.explore-section-head{
  margin-bottom: 10px;
}

.explore-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.explore-card{
  min-height: 120px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}

.explore-card-head{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.explore-card .avatar{
  width: 44px;
  height: 44px;
}

.explore-card-actions{
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}

.explore-card-actions .btn-light{
  width: auto;
  min-width: 170px;
  text-align: center;
}

.explore-empty{
  grid-column: 1 / -1;
}

.explore-skeleton{
  position: relative;
  overflow: hidden;
}

.explore-skeleton::after{
  content: '';
  position: absolute;
  top: 0;
  left: -120px;
  width: 120px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: exploreShimmer 1.2s linear infinite;
}

.explore-skeleton-line{
  height: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 10px;
}

.explore-skeleton-line.short{
  width: 38%;
}

@keyframes exploreShimmer {
  0% { left: -120px; }
  100% { left: 100%; }
}

body:not(.dark) .explore-hero,
body:not(.dark) .explore-card{
  background: var(--card-light);
  border-color: var(--card-border-light);
  box-shadow: var(--card-shadow-light);
}

body:not(.dark) .explore-search-input,
body:not(.dark) .explore-chip{
  border-color: rgba(16,20,26,0.14);
  background: rgba(16,20,26,0.02);
  color: var(--text-light);
}

body:not(.dark) .explore-controls-panel,
body:not(.dark) .explore-control-input{
  border-color: rgba(16,20,26,0.14);
  background: rgba(16,20,26,0.02);
  color: var(--text-light);
}

body:not(.dark) .explore-control-input{
  background-color: rgba(255,255,255,0.9);
  background-image: linear-gradient(45deg, transparent 50%, rgba(16,20,26,0.55) 50%), linear-gradient(135deg, rgba(16,20,26,0.55) 50%, transparent 50%);
}

body:not(.dark) .explore-control-input option{
  background: #ffffff;
  color: var(--text-light);
}

@media (max-width: 980px){
  .explore-page{
    padding: 12px;
  }

  .explore-hero{
    flex-direction: column;
    align-items: stretch;
  }

  .explore-search-wrap{
    min-width: 0;
  }

  .explore-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  .explore-grid{ grid-template-columns: 1fr; }
}

/* Notifications page */
.notifications-page{
  --notifications-content-max: 920px;
  padding: 16px 24px 28px;
}

main.notifications-page{
  width: 100%;
  max-width: var(--notifications-content-max);
  margin: 0 auto;
  box-sizing: border-box;
}

.notifications-page > *{
  width: 100%;
  max-width: var(--notifications-content-max);
  margin-left: auto;
  margin-right: auto;
}

.notifications-page .card{
  max-width: none;
  width: 100%;
  flex: initial;
}

.notifications-page .card:hover{
  transform: none;
}

.notifications-hero{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.05);
  background: var(--card);
  margin-bottom: 12px;
}

.notifications-hero-headline h1{
  margin: 0;
  font-size: clamp(26px, 2.3vw, 36px);
}

.notifications-hero-headline p{
  margin: 8px 0 0;
}

.notifications-stat-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notifications-stat{
  min-width: 102px;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}

.notifications-stat strong{
  display: block;
  color: var(--text);
  font-size: 17px;
}

.notifications-stat span{
  color: var(--muted);
  font-size: 12px;
}

.notifications-controls-panel{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.notifications-filter-col,
.notifications-browser-col,
.notifications-actions-col{
  display: grid;
  gap: 8px;
}

.notifications-controls-panel label{
  color: var(--muted);
  font-size: 13px;
}

.notifications-select{
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  padding: 10px 12px;
}

.notifications-checkbox-row{
  display: flex;
  align-items: center;
  gap: 8px;
}

.notifications-checkbox-row input[type="checkbox"]{
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.notifications-panel{
  width: 100%;
}

.notifications-section-head{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  margin-bottom: 10px;
}

.notifications-list{
  display: grid;
  gap: 10px;
}

.notification-item{
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
}

.notification-item.is-unread{
  border-color: rgba(229,57,53,0.4);
  box-shadow: 0 0 0 1px rgba(229,57,53,0.15) inset;
}

.notification-leading .avatar{
  width: 42px;
  height: 42px;
}

.notification-main{
  min-width: 0;
}

.notification-title-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.notification-main p{
  margin: 4px 0 8px;
}

.notification-actions{
  display: flex;
  gap: 8px;
}

.noti-actor{
  font-weight: 700;
}

.notification-dot{
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: #e53935;
  box-shadow: 0 0 0 5px rgba(229,57,53,0.15);
}

body:not(.dark) .notifications-hero,
body:not(.dark) .notifications-controls-panel,
body:not(.dark) .notification-item{
  background: var(--card-light);
  border-color: var(--card-border-light);
  box-shadow: var(--card-shadow-light);
}

body:not(.dark) .notifications-select{
  border-color: rgba(16,20,26,0.14);
  background: #fff;
  color: var(--text-light);
}

@media (max-width: 900px){
  .notifications-page{padding:12px}
  main.notifications-page{max-width:100%}
  .notifications-hero{flex-direction:column;align-items:stretch}
  .notifications-stat-row{justify-content:flex-start}
}

/* Profile page restyle */
.profile-page{
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 24px 28px;
}

.profile-hero{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 16px;
}

.profile-hero-headline h1{
  margin: 0;
  font-size: clamp(24px, 2.2vw, 34px);
  letter-spacing: -0.01em;
}

.profile-hero-headline p{
  margin: 8px 0 0;
  max-width: 64ch;
}

.profile-stat-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-stat{
  min-width: 108px;
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  text-align: center;
}

.profile-stat strong{
  display: block;
  font-size: 17px;
  color: var(--text);
}

.profile-stat span{
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.profile-grid .social-panel{
  min-width: 0;
}

.profile-grid{
  grid-template-columns: minmax(220px, 280px) minmax(0, 760px) minmax(220px, 280px);
  gap: 20px;
  align-items: start;
}

.profile-grid .social-panel{
  max-width: 760px;
  width: 100%;
}

/* Neutralize global .card constraints from style.css on profile page */
.profile-page .card{
  max-width: none;
  width: 100%;
  flex: initial;
}

.profile-page .card:hover{
  transform: none;
}

.profile-user-card,
.profile-info-card{
  border: 1px solid rgba(255,255,255,0.04);
}

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

.profile-user-email{
  font-size: 13px;
  margin-top: 2px;
}

.profile-section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 0 10px;
}

.profile-section-head h3{
  margin: 0;
  font-size: 20px;
}

.profile-feed .post{
  border: 1px solid rgba(255,255,255,0.04);
}

.social-empty-state{
  padding: 20px;
}

body:not(.dark) .profile-hero{
  background: var(--card-light);
  border-color: var(--card-border-light);
  box-shadow: var(--card-shadow-light);
}

body:not(.dark) .profile-stat{
  background: rgba(16,20,26,0.03);
  border-color: rgba(16,20,26,0.08);
}

@media (max-width: 1000px){
  .profile-page{
    padding: 12px;
  }

  .profile-hero{
    flex-direction: column;
    align-items: stretch;
  }

  .profile-stat-row{
    justify-content: flex-start;
  }
}

.profile-rating-inline{
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-stars{
  display: inline-flex;
  gap: 3px;
  line-height: 1;
}

.profile-stars .star{
  font-size: 17px;
}

.profile-stars.small .star{
  font-size: 14px;
}

.profile-stars .star.full{
  color: #f5b400;
}

.profile-stars .star.half{
  color: #d9a132;
}

.profile-stars .star.empty{
  color: rgba(255,255,255,0.24);
}

body:not(.dark) .profile-stars .star.empty{
  color: rgba(16,20,26,0.22);
}

.profile-identity-list{
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}

.profile-identity-list div{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}

.profile-identity-list dt{
  color: var(--muted);
  font-size: 12px;
}

.profile-identity-list dd{
  margin: 0;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  font-size: 13px;
}

.profile-badge-card h4{
  margin: 0 0 8px;
}

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

.profile-badge{
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
}

.profile-kpi-card{
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  overflow: visible;
  margin-bottom: 14px;
}

.profile-kpi-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.profile-kpi-grid div{
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
  background: rgba(255,255,255,0.02);
  padding: 10px;
}

.profile-kpi-grid small{
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}

.profile-kpi-grid strong{
  color: var(--text);
  font-size: 18px;
  word-break: break-word;
}

.profile-actions{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-actions button,
.profile-actions a{
  width: 100%;
  text-align: center;
}

.profile-review-form{
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.profile-review-star-picker{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-review-star-picker.disabled{
  opacity: 0.6;
}

.profile-review-star-picker .star-pick{
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  color: rgba(255,255,255,0.35);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, color .14s ease;
}

.profile-review-star-picker .star-pick:hover{
  transform: translateY(-1px);
}

.profile-review-star-picker .star-pick.is-active{
  color: #f5b400;
  border-color: rgba(245,180,0,0.45);
  background: rgba(245,180,0,0.1);
}

.profile-review-star-picker .star-pick:disabled{
  cursor: not-allowed;
}

.profile-review-form label{
  font-size: 13px;
  color: var(--muted);
}

.profile-review-form select,
.profile-review-form textarea{
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
}

.profile-reviews-list{
  display: grid;
  gap: 10px;
}

.profile-review-item{
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  padding: 10px;
}

.profile-review-head{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.profile-review-item p{
  margin: 6px 0 0;
  line-height: 1.5;
}

.profile-request-item{
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  padding: 10px;
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.profile-request-main{
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-request-actions{
  display: flex;
  gap: 8px;
}

.profile-request-actions button{
  flex: 1;
}

body:not(.dark) .profile-identity-list div,
body:not(.dark) .profile-kpi-grid div,
body:not(.dark) .profile-review-item,
body:not(.dark) .profile-request-item{
  background: rgba(16,20,26,0.025);
  border-color: rgba(16,20,26,0.08);
}

body:not(.dark) .profile-kpi-card{
  background: rgba(16,20,26,0.025);
  border-color: rgba(16,20,26,0.08);
}

body:not(.dark) .profile-review-form select,
body:not(.dark) .profile-review-form textarea{
  border-color: rgba(16,20,26,0.15);
  background: #fff;
  color: var(--text-light);
}

body:not(.dark) .profile-review-star-picker .star-pick{
  border-color: rgba(16,20,26,0.2);
  background: rgba(16,20,26,0.02);
  color: rgba(16,20,26,0.3);
}

body:not(.dark) .profile-review-star-picker .star-pick.is-active{
  color: #b67a00;
  border-color: rgba(182,122,0,0.45);
  background: rgba(182,122,0,0.1);
}

@media (max-width: 1180px){
  .profile-kpi-grid{
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 760px){
  .profile-kpi-grid{
    grid-template-columns: 1fr;
  }

  .profile-hero-headline h1{
    font-size: 24px;
  }

  .profile-stat{
    min-width: 96px;
  }
}








