@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --gg-yellow: #eec32b;
  --gg-yellow-dark: #cf9e12;
  --gg-blue: #0a88df;
  --gg-blue-dark: #086bb0;
  --gg-ink: #14181f;
  --gg-gray: #6b7280;
  --gg-line: #e7e9ee;
  --gg-bg: #f7f8fa;
  --gg-card: #ffffff;
  --gg-surface: #ffffff;
  --gg-topbar-bg: rgba(255,255,255,0.92);
  --gg-shadow: rgba(20,24,31,0.08);
  --gg-danger: #ea3d5c;
  --radius: 14px;
  --radius-sm: 9px;
  color-scheme: light;
}

[data-theme="dark"] {
  --gg-ink: #eef1f6;
  --gg-gray: #9aa4b3;
  --gg-line: #262b35;
  --gg-bg: #0c0e13;
  --gg-card: #171a21;
  --gg-surface: #171a21;
  --gg-topbar-bg: rgba(12,14,19,0.88);
  --gg-shadow: rgba(0,0,0,0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  transition: background-color .2s ease;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--gg-bg);
  color: var(--gg-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* -------- Transicion suave entre tema claro / oscuro -------- */
body, .topbar, .bottom-nav, .post-card, .post-comment-form, .modal-box, .modal-backdrop,
.chat-box, .chat-head, .chat-input-form, .chat-bubble, .login-card, .grid-item,
.conv-row, .btn, .dropzone, .search-results, .search-result-item, .story-ring,
input, textarea, .tabs, .tab, .site-footer, .upload-tabs button, .field input, .field textarea,
.avatar {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

/* -------- Accesibilidad -------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gg-blue);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--gg-blue); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
  font-size: 13px; font-weight: 600;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

h1, h2, h3, .brand {
  font-family: 'Baloo 2', 'Inter', sans-serif;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, video { display: block; max-width: 100%; }

::selection { background: var(--gg-yellow); color: var(--gg-ink); }

/* -------- Scrollbar sutil -------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--gg-line); border-radius: 10px; }

/* -------- Barra superior -------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 20px;
  background: var(--gg-topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gg-line);
  box-shadow: 0 1px 0 var(--gg-line), 0 2px 12px var(--gg-shadow);
}

.brand-wordmark { transition: opacity .15s ease; }
.brand-wordmark:hover { opacity: .82; }

.icon-btn svg { transition: transform .15s ease; }
.icon-btn:active svg { transform: scale(.88); }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.brand-wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.brand-wordmark img { height: 30px; width: 30px; border-radius: 8px; }
.brand-wordmark .g1 { color: var(--gg-blue); }
.brand-wordmark .g2 { color: var(--gg-yellow-dark); }

.topbar-search {
  flex: 1;
  max-width: 320px;
  margin: 0 24px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 20px;
  border: 1px solid var(--gg-line);
  background: var(--gg-bg);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.topbar-search input:focus { border-color: var(--gg-blue); background: var(--gg-card); }
.search-results {
  position: absolute;
  top: 42px; left: 0; right: 0;
  background: var(--gg-card);
  border: 1px solid var(--gg-line);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px var(--gg-shadow);
  overflow: hidden;
  display: none;
  max-height: 340px;
  overflow-y: auto;
}
.search-results.show { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
}
.search-result-item:hover { background: var(--gg-bg); }
.search-result-item img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }

.topbar-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  background: none; border: none; padding: 6px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gg-ink); transition: background .15s, transform .1s, color .15s;
}
.icon-btn:hover { background: var(--gg-bg); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.active { color: var(--gg-blue); }

.theme-toggle-floating {
  position: absolute; top: 18px; right: 18px; z-index: 5;
  background: var(--gg-card); border: 1px solid var(--gg-line);
  box-shadow: 0 6px 18px var(--gg-shadow);
}
.theme-toggle-floating:hover { background: var(--gg-card); }

.avatar { border-radius: 50%; object-fit: cover; background: var(--gg-line); }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-lg { width: 88px; height: 88px; }
.avatar-xl { width: 148px; height: 148px; }

/* -------- Layout -------- */
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 14px 90px;
  animation: gg-fade-in .3s ease both;
}
.page-wide { max-width: 940px; }

/* -------- Pie de pagina -------- */
.site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 16px 28px;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: var(--gg-gray);
  border-top: 1px solid var(--gg-line);
}
.site-footer strong { color: var(--gg-ink); }
.site-footer .footer-links { margin-top: 4px; }
.site-footer a { color: var(--gg-gray); text-decoration: none; }
.site-footer a:hover { color: var(--gg-blue); }
.site-footer .dot { margin: 0 6px; opacity: .5; }
@media (max-width: 859px) { .site-footer.with-bottom-nav { padding-bottom: 84px; } }

/* -------- Historias -------- */
.stories-bar {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  margin-bottom: 8px;
}
.story-bubble { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; width: 70px; cursor: pointer; }
.story-ring {
  width: 66px; height: 66px; border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--gg-blue), var(--gg-yellow));
  display: flex; align-items: center; justify-content: center;
}
.story-ring.seen { background: var(--gg-line); }
.story-ring.add { background: none; border: 2px dashed var(--gg-line); }
.story-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--gg-card); }
.story-bubble span { font-size: 12px; color: var(--gg-ink); max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-add-badge {
  width: 66px; height: 66px; border-radius: 50%; border: 2px dashed var(--gg-blue);
  display: flex; align-items: center; justify-content: center; color: var(--gg-blue); font-size: 26px; font-weight: 600;
}

/* -------- Tarjeta de publicacion -------- */
.post-card {
  background: var(--gg-card);
  border: 1px solid var(--gg-line);
  border-radius: var(--radius);
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: 0 1px 3px var(--gg-shadow);
  transition: box-shadow .2s ease, transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.post-card:hover { box-shadow: 0 10px 28px var(--gg-shadow); }
.post-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
}
.post-head-user { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.post-head-user span.time { font-weight: 400; color: var(--gg-gray); font-size: 12px; }
.post-media { width: 100%; max-height: 620px; object-fit: cover; background: #000; }
.post-actions { display: flex; align-items: center; gap: 14px; padding: 12px 14px 4px; }
.post-actions .icon-btn { padding: 2px; }
.post-likes { padding: 4px 14px 0; font-weight: 600; font-size: 14px; }
.post-caption { padding: 6px 14px 0; font-size: 14px; line-height: 1.45; }
.post-caption b { margin-right: 6px; }
.post-comments { padding: 6px 14px 4px; font-size: 13px; color: var(--gg-gray); }
.post-comment-form {
  display: flex; align-items: center; gap: 8px;
  border-top: 1px solid var(--gg-line);
  padding: 8px 14px;
}
.post-comment-form input {
  flex: 1; border: none; outline: none; font-size: 14px; background: none;
}
.post-comment-form button {
  border: none; background: none; color: var(--gg-blue); font-weight: 700; font-size: 13px;
}
.post-comment-form button:disabled { color: var(--gg-gray); }

.heart-fill { color: var(--gg-danger); }
.like-fill { color: var(--gg-blue); }

/* -------- Botones -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 10px; border: none;
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform .12s ease, opacity .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { background: var(--gg-blue); color: #fff; box-shadow: 0 4px 14px rgba(10,136,223,.28); }
.btn-primary:hover:not(:disabled) { background: var(--gg-blue-dark); box-shadow: 0 6px 18px rgba(10,136,223,.36); transform: translateY(-1px); }
.btn-accent { background: var(--gg-yellow); color: var(--gg-ink); box-shadow: 0 4px 14px rgba(238,195,43,.28); }
.btn-accent:hover:not(:disabled) { background: var(--gg-yellow-dark); transform: translateY(-1px); }
.btn-outline { background: var(--gg-card); border: 1px solid var(--gg-line); color: var(--gg-ink); }
.btn-outline:hover:not(:disabled) { border-color: var(--gg-blue); color: var(--gg-blue); background: color-mix(in srgb, var(--gg-blue) 6%, var(--gg-card)); }
.btn-ghost { background: var(--gg-bg); color: var(--gg-ink); }
.btn-ghost:hover:not(:disabled) { background: var(--gg-line); }
.btn-danger { background: var(--gg-danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* -------- Nav inferior (mobile) -------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 58px; background: var(--gg-card); border-top: 1px solid var(--gg-line);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav a { padding: 8px; border-radius: 10px; color: var(--gg-ink); transition: color .15s, transform .1s; }
.bottom-nav a:active { transform: scale(.9); }
.bottom-nav a.active { color: var(--gg-blue); }
@media (min-width: 860px) { .bottom-nav { display: none; } }

/* -------- Pantalla de login -------- */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 20% 15%, rgba(238,195,43,0.16), transparent 45%),
              radial-gradient(circle at 85% 85%, rgba(10,136,223,0.16), transparent 45%),
              var(--gg-bg);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--gg-card); border: 1px solid var(--gg-line); border-radius: 20px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 24px 60px var(--gg-shadow);
  animation: gg-fade-in .4s ease both;
}
@keyframes gg-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.login-logo { width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 18px; object-fit: cover; background: var(--gg-line); }
.login-card h1 { font-size: 28px; margin: 0 0 6px; letter-spacing: -0.02em; }
.login-card .g1 { color: var(--gg-blue); }
.login-card .g2 { color: var(--gg-yellow-dark); }
.login-card p { color: var(--gg-gray); font-size: 14px; margin: 0 0 28px; line-height: 1.5; }
.discord-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px; border-radius: 12px; border: none;
  background: #5865F2; color: #fff; font-weight: 700; font-size: 15px;
  transition: filter .15s;
}
.discord-btn:hover { filter: brightness(1.08); }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--gg-gray); }
.login-error {
  background: #fde8ec; color: var(--gg-danger); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; margin-bottom: 18px; text-align: left;
}

/* -------- Perfil -------- */

.profile-head {
display: flex;
gap: 48px;
align-items: flex-start;
padding: 30px 4px 28px;
}

.profile-head .avatar-xl {
width: 150px;
height: 150px;
flex-shrink: 0;
border-radius: 50%;
object-fit: cover;
}

.profile-head-info {
min-width: 0;
flex: 1;
padding-top: 4px;
}

/* Nombre de usuario + botones */
.profile-top-row {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 18px;
}

.profile-name {
font-size: 22px;
font-weight: 600;
line-height: 1.2;
letter-spacing: -0.02em;
}

.profile-username {
font-size: 14px;
color: var(--gg-gray);
margin-top: 2px;
}

/* Estadísticas */
.profile-stats {
display: flex;
align-items: center;
gap: 34px;
margin: 0 0 16px;
}

.profile-stats div {
text-align: left;
cursor: default;
}

.profile-stats b {
display: inline;
font-size: 16px;
font-weight: 700;
color: var(--gg-ink);
}

.profile-stats span {
font-size: 14px;
color: var(--gg-ink);
margin-left: 4px;
}

/* Biografía */
.profile-bio {
font-size: 14px;
margin: 4px 0 0;
white-space: pre-wrap;
line-height: 1.45;
max-width: 480px;
}

/* Botones del perfil */
.profile-actions {
display: flex;
align-items: center;
gap: 8px;
margin-top: 16px;
}

.profile-actions .btn {
min-width: 100px;
padding: 7px 16px;
font-size: 13px;
border-radius: 8px;
}

/* -------- Perfil móvil -------- */

@media (max-width: 700px) {

```
.profile-head {
    display: grid;
    grid-template-columns: 90px 1fr;
    column-gap: 20px;
    row-gap: 14px;
    align-items: center;
    padding: 18px 4px 20px;
    text-align: left;
}

.profile-head .avatar-xl {
    width: 90px;
    height: 90px;
    grid-row: 1 / span 2;
}

.profile-head-info {
    width: 100%;
    padding-top: 0;
}

.profile-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.profile-name {
    font-size: 20px;
}

.profile-username {
    font-size: 13px;
}

.profile-stats {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    margin: 0;
}

.profile-stats div {
    text-align: center;
}

.profile-stats b {
    display: block;
    font-size: 16px;
    line-height: 1.1;
}

.profile-stats span {
    display: block;
    font-size: 12px;
    color: var(--gg-gray);
    margin: 2px 0 0;
}

.profile-bio {
    grid-column: 1 / -1;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.45;
    margin: 0;
}

.profile-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: stretch;
    gap: 8px;
    margin-top: 0;
}

.profile-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: 13px;
}
```

}

/* -------- Pestañas del perfil -------- */

.tabs {
    display: flex;
    width: 100%;
    border-top: 1px solid var(--gg-line);
    margin-top: 8px;
    background: var(--gg-bg);
    position: sticky;
    top: 60px;
    z-index: 5;
}

.tab {
    flex: 1;
    height: 48px;
    text-align: center;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;

    color: var(--gg-gray);
    border-top: 2px solid transparent;

    cursor: pointer;
    transition:
        color .15s ease,
        border-color .15s ease;
}

.tab:hover {
    color: var(--gg-ink);
}

.tab.active {
    color: var(--gg-ink);
    border-top-color: var(--gg-ink);
}

.tab svg {
    width: 16px;
    height: 16px;
}

/* -------- Grid del perfil -------- */

.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 3px;
margin-top: 3px;
}

@media (min-width: 700px) {
.grid {
gap: 5px;
}
}

.grid-item {
position: relative;
aspect-ratio: 1 / 1;
overflow: hidden;
background: var(--gg-line);
cursor: pointer;
border-radius: 0;
}

.grid-item img,
.grid-item video {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform .3s ease;
}

.grid-item:hover img,
.grid-item:hover video {
transform: scale(1.04);
}

/* Indicador de Reel */
.grid-item.reel::after {
content: '▶';
position: absolute;
top: 8px;
right: 8px;
color: #fff;
font-size: 13px;
text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5));
}

/* Overlay al pasar el mouse */
.grid-overlay {
position: absolute;
inset: 0;
background: rgba(10, 12, 16, .48);
display: flex;
align-items: center;
justify-content: center;
gap: 22px;
opacity: 0;
transition: opacity .15s ease;
pointer-events: none;
}

.grid-item:hover .grid-overlay {
opacity: 1;
}

.grid-overlay-stat {
display: flex;
align-items: center;
gap: 6px;
color: #fff;
font-weight: 700;
font-size: 14px;
}

.grid-overlay-stat svg {
width: 18px;
height: 18px;
}

/* Estado vacío */
.empty-state {
text-align: center;
padding: 50px 20px;
color: var(--gg-gray);
}

.empty-state .icon {
font-size: 40px;
margin-bottom: 10px;
}


/* -------- Subida -------- */
.upload-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.upload-tabs button {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--gg-line);
  background: var(--gg-card); font-weight: 600; font-size: 13px; color: var(--gg-gray);
}
.upload-tabs button.active { border-color: var(--gg-blue); color: var(--gg-blue); background: color-mix(in srgb, var(--gg-blue) 12%, var(--gg-card)); }

.dropzone {
  border: 2px dashed var(--gg-line); border-radius: var(--radius);
  padding: 30px; text-align: center; cursor: pointer; margin-bottom: 16px;
  transition: border-color .15s, background .15s;
  background: var(--gg-card);
}
.dropzone:hover { border-color: var(--gg-blue); background: color-mix(in srgb, var(--gg-blue) 6%, var(--gg-card)); }
.dropzone.has-file { padding: 0; overflow: hidden; }
.dropzone.has-file img, .dropzone.has-file video { width: 100%; max-height: 420px; object-fit: contain; background: #000; }
.dropzone p { color: var(--gg-gray); font-size: 13px; margin: 6px 0 0; }
.dropzone .icon { font-size: 34px; color: var(--gg-blue); }

textarea.caption-input {
  width: 100%; border: 1px solid var(--gg-line); border-radius: 10px; padding: 12px;
  font-size: 14px; font-family: inherit; resize: vertical; min-height: 80px; outline: none;
}
textarea.caption-input:focus { border-color: var(--gg-blue); }

/* -------- Reels -------- */
.reels-viewport {
  height: calc(100vh - 60px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  background: #000;
}
@media (min-width: 860px) { .reels-viewport { height: calc(100vh - 60px); max-width: 420px; margin: 0 auto; border-left: 1px solid #111; border-right: 1px solid #111; } }
.reel-slide {
  height: calc(100vh - 60px);
  scroll-snap-align: start;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.reel-slide video { width: 100%; height: 100%; object-fit: cover; }
.reel-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 18px 60px 22px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: #fff;
}
.reel-overlay .user { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.reel-overlay .caption { font-size: 13px; opacity: .92; }
.reel-side-actions {
  position: absolute; right: 10px; bottom: 90px;
  display: flex; flex-direction: column; align-items: center; gap: 20px; color: #fff;
}
.reel-side-actions button { background: none; border: none; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; }

/* -------- Modal historias -------- */
.story-modal {
  position: fixed; inset: 0; background: #000; z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.story-modal-inner { position: relative; width: 100%; max-width: 420px; height: 100%; max-height: 780px; background: #000; }
.story-progress { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 5; }
.story-progress .bar { flex: 1; height: 3px; background: rgba(255,255,255,0.35); border-radius: 3px; overflow: hidden; }
.story-progress .bar i { display: block; height: 100%; width: 0%; background: #fff; }
.story-modal-head { position: absolute; top: 20px; left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; z-index: 5; color: #fff; }
.story-modal-head .user { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.story-modal-media { width: 100%; height: 100%; object-fit: contain; background: #000; }
.story-nav-zone { position: absolute; top: 0; bottom: 0; width: 30%; z-index: 4; }
.story-close { background: none; border: none; color: #fff; font-size: 22px; }

/* -------- Toast -------- */
.toast {
  position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%);
  background: var(--gg-ink); color: #fff; padding: 10px 18px; border-radius: 30px;
  font-size: 13px; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, -6px); }

/* -------- Modal generico (comentarios / subir) -------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8,10,14,0.6); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: gg-fade-in .15s ease both;
}
.modal-box {
  background: var(--gg-card); border-radius: 16px; width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto; padding: 22px;
  box-shadow: 0 24px 60px var(--gg-shadow);
}
.modal-box h3 { margin: 0 0 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--gg-gray); }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--gg-line); border-radius: 9px; padding: 10px 12px;
  font-size: 14px; font-family: inherit; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--gg-blue); }

.loader { display: flex; align-items: center; justify-content: center; padding: 60px 0; color: var(--gg-gray); font-size: 14px; }

/* -------- Visor de publicaciones (lightbox del perfil) -------- */
.viewer-box { max-width: 560px; padding: 0; overflow: hidden; position: relative; }
.viewer-close {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  background: rgba(8,10,14,0.55); color: #fff;
}
.viewer-close:hover { background: rgba(8,10,14,0.75); }
.viewer-media { width: 100%; max-height: 62vh; background: #000; display: flex; align-items: center; justify-content: center; }
.viewer-media img, .viewer-media video { width: 100%; max-height: 62vh; object-fit: contain; }
.viewer-info { padding: 16px 18px 18px; max-height: 30vh; overflow-y: auto; }
.viewer-likes { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 8px; color: var(--gg-danger); }
.viewer-caption { font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
.viewer-caption b { margin-right: 6px; }
.viewer-comments { display: flex; flex-direction: column; gap: 8px; }
.viewer-comment { font-size: 13px; line-height: 1.4; }
.viewer-comment b { margin-right: 6px; }
.viewer-comment.muted { color: var(--gg-gray); }

/* -------- Globito de no-leidos en la navegacion -------- */
.icon-btn { position: relative; }
.nav-badge {
  position: absolute; top: 2px; right: 2px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gg-danger); border: 2px solid var(--gg-card);
  display: none;
}
.nav-badge.show { display: block; }

/* -------- Bandeja de mensajes -------- */
.conv-list { display: flex; flex-direction: column; }
.conv-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px; border-radius: 12px; cursor: pointer;
  transition: background .15s;
}
.conv-row:hover { background: var(--gg-bg); }
.conv-row.unread .conv-name, .conv-row.unread .conv-preview { font-weight: 700; color: var(--gg-ink); }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-size: 14px; font-weight: 600; }
.conv-name span { font-weight: 400; color: var(--gg-gray); font-size: 13px; margin-left: 4px; }
.conv-preview {
  font-size: 13px; color: var(--gg-gray); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px;
}
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.conv-time { font-size: 12px; color: var(--gg-gray); }
.conv-unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gg-blue); }

/* -------- Chat 1 a 1 -------- */
.chat-box {
  display: flex; flex-direction: column;
  height: calc(100vh - 60px - 20px);
  background: var(--gg-card); border: 1px solid var(--gg-line); border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 859px) { .chat-box { height: calc(100vh - 60px - 58px - 20px); } }
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--gg-line); flex-shrink: 0;
}
.chat-head-user { display: flex; align-items: center; gap: 10px; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.chat-bubble-row { display: flex; }
.chat-bubble-row.mine { justify-content: flex-end; }
.chat-bubble {
  max-width: 72%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.4;
  background: var(--gg-bg); color: var(--gg-ink); word-wrap: break-word;
}
.chat-bubble-row.mine .chat-bubble { background: var(--gg-blue); color: #fff; }
.chat-input-form {
  display: flex; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--gg-line); flex-shrink: 0;
}
.chat-input-form input {
  flex: 1; border: 1px solid var(--gg-line); border-radius: 20px; padding: 10px 16px;
  font-size: 14px; outline: none;
}
.chat-input-form input:focus { border-color: var(--gg-blue); }
.chat-input-form button {
  border: none; background: var(--gg-blue); color: #fff; font-weight: 700; font-size: 13px;
  padding: 0 18px; border-radius: 20px;
}
.chat-input-form button:disabled { background: var(--gg-line); color: var(--gg-gray); }
