/* ---------------------------
   SeeToday — styles completos
   --------------------------- */

:root {
  --bg: #f6f5ff;
  --panel: #efeafe;
  --card: #ffffff;
  --accent: #7b6bff;
  --accent-2: #bfb7ff;
  --muted: #7f7aa4;
  --text: #222034;
  --glass: rgba(255, 255, 255, 0.6);
  --shadow: 0 10px 30px rgba(70, 50, 120, 0.07);
  --radius: 14px;
  --radius-sm: 10px;
}

/* Base */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  background: linear-gradient(180deg, #faf9ff 0%, var(--bg) 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.4;
}

/* Topbar */
.topbar {
  padding: 18px 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(6px);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(90deg, var(--card), #fbfaff);
  padding: 10px 16px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 6px 18px rgba(123, 107, 255, 0.25);
}
.brand-text .title {
  font-weight: 800;
  font-size: 18px;
}
.brand-text .subtitle {
  font-size: 12px;
  color: var(--muted);
}

/* Nav */
.nav {
  display: flex;
  gap: 8px;
  margin-left: 6px;
}
.nav-link {
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.nav-link.active {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  color: white;
  box-shadow: 0 6px 18px rgba(123, 107, 255, 0.15);
}

/* Actions */
.actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #eee;
  width: 240px;
  outline: none;
  font-size: 14px;
  background: transparent;
}
.btn {
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(123, 107, 255, 0.12);
}
.btn.small {
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 8px;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  gap: 18px;
}
.col {
  min-height: 200px;
}

/* Cards */
.card {
  background: var(--card);
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Left column: profile */
.profile-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;

  /* Nuevo para centrar y ajustar la imagen */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#creator-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-image: url("ruta-del-avatar.jpg");
  background-size: cover; /* ajusta la imagen para llenar el div */
  background-position: center; /* centra la imagen */
  background-repeat: no-repeat;
}

.creator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ajusta la imagen y mantiene proporción */
}

.post-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: white;

  /* Fallback si no hay imagen */
  background-color: var(--accent);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0; /* para que no se achique */
}

.profile-name {
  font-weight: 800;
  font-size: 16px;
}
.profile-role {
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}
.profile-visibility {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.profile-bio {
  color: var(--muted);
  font-size: 13px;
  padding-top: 4px;
}

/* members */
.members-card h4 {
  margin: 0 0 10px 0;
}
.members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.member-item {
  display: flex;
  gap: 8px;
  align-items: center;
}
.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.member-meta .name {
  font-weight: 700;
}
.member-meta .role {
  font-size: 12px;
  color: var(--muted);
}

/* Main column: post creator & feed */
.post-creator {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.creator-top {
  display: flex;
  gap: 12px;
}
.creator-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
}
.creator-input input,
.creator-input textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #f0eefb;
  outline: none;
  font-size: 14px;
  margin-bottom: 8px;
}
.creator-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.file-label {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed #eee;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}
.file-label input {
  display: none;
}

.creator-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Feed */
.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.post {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  align-items: flex-start;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(80, 60, 140, 0.06);
}
.post .meta {
  display: flex;
  gap: 12px;
  flex: 1;
}
.post .thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #eee;
  object-fit: cover;
}
.post .post-body {
  flex: 1;
}
.post .post-title {
  font-weight: 800;
}
.post .post-desc {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
}
.post .post-info {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

/* images in post */
.images-grid {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.images-grid img {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

/* Right column */
.info-card .quick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}
.recent-card .albums-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#modal-edit-profile .modal-card {
  width: 480px;
  max-width: 95%;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), var(--panel));
  box-shadow: 0 30px 60px rgba(80, 60, 140, 0.12);
  text-align: center;
  position: relative;
}
#modal-edit-profile .avatar-edit {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

#modal-edit-profile .avatar-edit label {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  cursor: pointer;
}

#modal-edit-profile #edit-avatar {
  display: none; /* ocultamos input file real */
}

#modal-edit-profile .avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  margin-top: 8px;
  box-shadow: 0 8px 24px rgba(123, 107, 255, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease;
}

#modal-edit-profile .avatar-preview:hover {
  transform: scale(1.05);
}
#modal-edit-profile input,
#modal-edit-profile select {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid #f0eefb;
  margin-bottom: 12px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

#modal-edit-profile input:focus,
#modal-edit-profile select:focus {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(123, 107, 255, 0.08);
}
#modal-edit-profile .modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

#modal-edit-profile .modal-actions .btn {
  min-width: 100px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  transition: all 0.2s ease;
}

#modal-edit-profile .modal-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(123, 107, 255, 0.12);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 30, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
}
.modal-card {
  width: 420px;
  max-width: 92%;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--card), #fbfaff);
  box-shadow: 0 30px 60px rgba(80, 60, 140, 0.12);
}
.modal-card h3 {
  margin: 0 0 10px 0;
}
.modal-card input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #f0eefb;
  margin-bottom: 8px;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

/* Utilities */
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.error {
  color: #b00020;
}

/* Responsive behaviour */
@media (max-width: 980px) {
  .container {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .left-col,
  .right-col {
    order: 2;
  }
  .main-col {
    order: 1;
  }
  .topbar-inner {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .nav {
    justify-content: space-between;
    width: 100%;
  }
}

/* Extra polish (buttons, shadows, inputs) */
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 6px 18px rgba(123, 107, 255, 0.06);
  border-color: rgba(123, 107, 255, 0.14);
}

/* Tiny helpers for layout spacing inside cards */
.card .muted.small {
  margin-top: 8px;
  color: var(--muted);
}

/* End of big CSS */

/* --- LOGIN MODAL MODIFICADO --- */
.login-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 24px;
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 32px;
  box-shadow: 0 8px 20px rgba(123, 107, 255, 0.25);
}

.login-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.login-header p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.login-form input {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #f0eefb;
  font-size: 14px;
  outline: none;
}

.login-form input:focus {
  box-shadow: 0 6px 18px rgba(123, 107, 255, 0.06);
  border-color: rgba(123, 107, 255, 0.14);
}

.modal-actions {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.modal-actions .btn {
  width: 100%;
}

/* Botón de cierre moderno */
.close-btn {
  position: absolute;
  top: 12px; /* Ajusta según altura del padding del modal */
  right: 12px; /* Pegado a la esquina derecha */
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(123, 107, 255, 0.1); /* Fondo sutil con tu color accent */
  color: var(--accent);
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.close-btn:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

.creator-right {
  display: flex;
  justify-content: center; /* centra el botón */
  gap: 8px;
  align-items: center;
  width: 100%;
  margin-top: 10px;
}

/* Estilo general, siguiendo tu diseño */
.select-modern {
  position: relative;
  display: inline-block;
  min-width: 160px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.select-modern .select-selected {
  background: linear-gradient(180deg, var(--card), var(--panel));
  color: var(--text);
  padding: 10px 40px 10px 14px;
  border-radius: var(--radius);
  border: 1px solid #eee;
  box-shadow: var(--shadow);
  position: relative;
  user-select: none;
}

.select-modern .select-selected::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.select-modern .select-items {
  position: absolute;
  background: linear-gradient(180deg, var(--card), var(--panel));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 4px;
  width: 100%;
  z-index: 99;
}

.select-modern .select-items div {
  padding: 10px 14px;
  color: var(--text);
  transition: background 0.2s;
}

.select-modern .select-items div:hover {
  background: var(--accent-2);
  color: white;
}

.select-hide {
  display: none;
}

/* ---------------------------
   SeeToday — styles completos (Responsive safe)
   --------------------------- */

/* ...[TODO tu CSS original que me diste arriba]... */

/* ---------------------------
   MEDIA QUERIES RESPONSIVE
   --------------------------- */

/* Tablets: pantallas medianas */
@media (max-width: 980px) {
  .container {
    grid-template-columns: 1fr; /* columnas apiladas */
    padding: 12px;
    gap: 12px;
  }

  .left-col,
  .right-col {
    order: 2;
  }

  .main-col {
    order: 1;
  }

  .topbar-inner {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .nav {
    justify-content: space-between;
    width: 100%;
  }

  .search {
    width: 100%;
  }
}

/* Móviles: pantallas pequeñas */
@media (max-width: 600px) {
  /* Topbar */
  .topbar-inner {
    padding: 10px;
    border-radius: 12px;
  }
  .logo {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .brand-text .title {
    font-size: 16px;
  }
  .brand-text .subtitle {
    font-size: 10px;
  }
  .nav-link {
    font-size: 12px;
    padding: 6px 8px;
  }
  .btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  /* Container */
  .container {
    padding: 8px;
  }

  /* Avatares */
  .avatar,
  .post-avatar,
  .creator-avatar,
  .member-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* Perfil */
  .profile-name {
    font-size: 14px;
  }
  .profile-role {
    font-size: 11px;
  }

  /* Feed */
  .post .thumb {
    width: 48px;
    height: 48px;
  }
  .images-grid img {
    width: 100px;
    height: 70px;
  }

  /* Inputs y forms */
  .creator-input input,
  .creator-input textarea {
    font-size: 13px;
  }
  .file-label {
    font-size: 12px;
  }

  /* Modales */
  .modal-card,
  #modal-edit-profile .modal-card {
    width: 95%;
    padding: 16px;
  }

  .login-card {
    padding: 20px;
  }
  .login-logo {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  /* Botones dentro de creator-right */
  .creator-right {
    flex-direction: column;
    gap: 6px;
  }
}

/* Muy pequeños: smartphones vertical */
@media (max-width: 400px) {
  .search {
    font-size: 12px;
  }
  .btn {
    font-size: 12px;
    padding: 6px 8px;
  }
  .nav-link {
    padding: 4px 6px;
  }
  .profile-bio {
    font-size: 12px;
  }
  .post .post-desc {
    font-size: 13px;
  }
  .post .post-info {
    font-size: 11px;
  }
  .images-grid img {
    width: 90px;
    height: 60px;
  }
  .creator-input input,
  .creator-input textarea {
    font-size: 12px;
  }
}

/* ---------------------------
   MEDIA QUERIES RESPONSIVE
--------------------------- */

/* Tablets: pantallas medianas */
@media (max-width: 980px) {
  .container {
    grid-template-columns: 1fr; /* columnas apiladas */
    padding: 12px;
    gap: 12px;
  }
  .left-col,
  .right-col {
    order: 2;
  }
  .main-col {
    order: 1;
  }

  .topbar-inner {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .nav {
    justify-content: space-between;
    width: 100%;
  }
  .search {
    width: 100%;
  }
}

/* Móviles: pantallas pequeñas */
@media (max-width: 600px) {
  .topbar-inner {
    padding: 10px;
    border-radius: 12px;
  }
  .logo {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .brand-text .title {
    font-size: 16px;
  }
  .brand-text .subtitle {
    font-size: 10px;
  }
  .nav-link {
    font-size: 12px;
    padding: 6px 8px;
  }
  .btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  .container {
    padding: 8px;
  }

  .avatar,
  .post-avatar,
  .creator-avatar,
  .member-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .profile-name {
    font-size: 14px;
  }
  .profile-role {
    font-size: 11px;
  }

  .post .thumb {
    width: 48px;
    height: 48px;
  }
  .images-grid img {
    width: 100px;
    height: 70px;
  }

  .creator-input input,
  .creator-input textarea {
    font-size: 13px;
  }
  .file-label {
    font-size: 12px;
  }

  .modal-card,
  #modal-edit-profile .modal-card {
    width: 95%;
    padding: 16px;
  }
  .login-card {
    padding: 20px;
  }
  .login-logo {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .creator-right {
    flex-direction: column;
    gap: 6px;
  }
}

/* Muy pequeños: smartphones vertical */
@media (max-width: 400px) {
  .search {
    font-size: 12px;
  }
  .btn {
    font-size: 12px;
    padding: 6px 8px;
  }
  .nav-link {
    padding: 4px 6px;
  }
  .profile-bio {
    font-size: 12px;
  }
  .post .post-desc {
    font-size: 13px;
  }
  .post .post-info {
    font-size: 11px;
  }
  .images-grid img {
    width: 90px;
    height: 60px;
  }
  .creator-input input,
  .creator-input textarea {
    font-size: 12px;
  }
}
