* {
  box-sizing: border-box;
}

:root {
  --bg: #f3f5fa;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(148, 163, 184, 0.22);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.1);
  --pin: #b45309;
  --pin-soft: rgba(217, 119, 6, 0.12);
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --radius: 20px;
  --radius-sm: 14px;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  padding: 0.74rem 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

textarea {
  resize: vertical;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  line-height: 1.1;
}

h2 {
  font-size: 1.15rem;
  margin-bottom: 0.95rem;
}

h3 {
  font-size: 1rem;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.muted {
  color: var(--muted);
}

.public-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.public-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.16rem;
}

.legal-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.legal-shell {
  width: min(860px, 100%);
}

.legal-card {
  padding: 1.5rem;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.is-hidden {
  display: none !important;
}

.stack {
  display: grid;
  gap: 1rem;
}

.top-gap {
  margin-top: 1rem;
}

.inline-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.inline-form input {
  flex: 1;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
}

.field-inline {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.7rem;
}

.field-inline input {
  width: auto;
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 12px;
  border: 1px solid transparent;
  min-height: 2.5rem;
  padding: 0.62rem 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-small {
  min-height: 2.1rem;
  padding: 0.48rem 0.74rem;
  font-size: 0.88rem;
}

.button-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid var(--border);
}

.button-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.16);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  background: rgba(252, 253, 255, 0.88);
  border-right: 1px solid var(--border);
  padding: 1.2rem;
  display: grid;
  align-content: start;
  gap: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  backdrop-filter: blur(18px);
}

.sidebar-brand a {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  display: grid;
  gap: 0.55rem;
}

.sidebar-link {
  display: block;
  padding: 0.72rem 0.88rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  font-weight: 600;
}

.sidebar-section {
  display: grid;
  gap: 0.8rem;
}

.sidebar-section-title {
  font-size: 0.88rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-empty {
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 16px;
  padding: 1rem;
}

.subject-link {
  display: grid;
  gap: 0.18rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.subject-link:hover,
.sidebar-link:hover {
  border-color: rgba(79, 70, 229, 0.24);
}

.sidebar-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-link-count {
  min-width: 1.6rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.subject-link.is-active {
  background: var(--accent-soft);
  border-color: rgba(79, 70, 229, 0.24);
}

.subject-link-title {
  font-weight: 700;
}

.subject-link-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.subject-drag-handle {
  opacity: 0;
  color: var(--muted);
  transition: opacity 0.16s ease;
}

.subject-link:hover .subject-drag-handle,
.subject-link.is-dragging .subject-drag-handle {
  opacity: 1;
}

.subject-link.is-dragging {
  opacity: 0.72;
  transform: scale(0.99);
}

.subject-color-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  display: inline-block;
  flex: 0 0 auto;
}

.subject-link-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.page-shell {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 1.35rem;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.topbar-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

.top-search {
  display: flex;
  gap: 0.75rem;
  width: min(720px, 100%);
}

.top-search input {
  background: rgba(255, 255, 255, 0.98);
}

.page-content {
  padding: 1.35rem;
  display: grid;
  gap: 1.3rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.page-header p {
  margin-top: 0.55rem;
  max-width: 780px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(290px, 360px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(320px, 390px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.panel,
.conversation-card,
.editor-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  backdrop-filter: blur(10px);
}

.conversation-card {
  position: relative;
  overflow: hidden;
}

.conversation-card::before,
.block-card::before,
.editor-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), rgba(37, 99, 235, 0.32));
}

.card-main {
  display: grid;
  gap: 0.85rem;
}

.card-heading-row,
.section-heading,
.block-card-top,
.editor-card-top,
.attachment-row {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: start;
}

.card-meta,
.tag-row,
.block-meta,
.block-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-soft {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-important {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.badge-public {
  background: rgba(8, 145, 178, 0.12);
  color: #0f766e;
}

.badge-pinned {
  background: var(--pin-soft);
  color: var(--pin);
}

.badge-highlight-yellow {
  background: rgba(234, 179, 8, 0.14);
  color: #a16207;
}

.badge-highlight-green {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.badge-highlight-blue {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
}

.badge-highlight-red {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.38rem 0.64rem;
  font-size: 0.84rem;
}

.tag-chip-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  padding: 0;
  line-height: 1;
}

.empty-state {
  padding: 1.15rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.empty-state h3 {
  margin-bottom: 0.45rem;
}

.block-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.95rem 0.95rem 0.9rem 1.1rem;
  overflow: hidden;
}

.block-card-pinned {
  border-color: rgba(180, 83, 9, 0.32);
  box-shadow: 0 16px 32px rgba(180, 83, 9, 0.12);
}

.block-card-pinned::before {
  background: linear-gradient(180deg, #d97706, rgba(217, 119, 6, 0.35));
}

.block-card-highlight-yellow {
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.08), rgba(255, 255, 255, 0.96));
  border-color: rgba(234, 179, 8, 0.28);
}

.block-card-highlight-yellow::before {
  background: linear-gradient(180deg, #eab308, rgba(234, 179, 8, 0.34));
}

.block-card-highlight-green {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), rgba(255, 255, 255, 0.96));
  border-color: rgba(34, 197, 94, 0.26);
}

.block-card-highlight-green::before {
  background: linear-gradient(180deg, #22c55e, rgba(34, 197, 94, 0.34));
}

.block-card-highlight-blue {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(255, 255, 255, 0.96));
  border-color: rgba(59, 130, 246, 0.26);
}

.block-card-highlight-blue::before {
  background: linear-gradient(180deg, #3b82f6, rgba(59, 130, 246, 0.34));
}

.block-card-highlight-red {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), rgba(255, 255, 255, 0.96));
  border-color: rgba(239, 68, 68, 0.26);
}

.block-card-highlight-red::before {
  background: linear-gradient(180deg, #ef4444, rgba(239, 68, 68, 0.34));
}

.highlight-picker {
  position: relative;
}

.export-menu {
  position: relative;
}

.export-menu-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 6;
  min-width: 13rem;
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.12);
}

.export-menu-panel .button {
  width: 100%;
  justify-content: flex-start;
}

.highlight-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 5;
  display: flex;
  gap: 0.45rem;
  padding: 0.55rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.12);
}

.highlight-option {
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  border-radius: 999px;
  border: 2px solid rgba(17, 24, 39, 0.12);
}

.highlight-option.is-active {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.08);
}

.highlight-option-yellow {
  background: #facc15;
}

.highlight-option-green {
  background: #22c55e;
}

.highlight-option-blue {
  background: #3b82f6;
}

.highlight-option-red {
  background: #ef4444;
}

.block-content {
  margin-top: 0.8rem;
  color: var(--text);
}

.block-content p,
.quote-block {
  color: var(--text);
}

.block-footer {
  margin-top: 0.8rem;
  justify-content: space-between;
  font-size: 0.84rem;
}

.review-progress-panel {
  gap: 0.85rem;
}

.review-progress-bar {
  width: 100%;
  height: 0.8rem;
  border-radius: 999px;
  background: var(--panel-soft);
  overflow: hidden;
  border: 1px solid var(--border);
}

.review-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  transition: width 0.2s ease;
}

.review-card {
  min-height: 420px;
}

.review-actions {
  justify-content: flex-end;
}

.share-page {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 30%),
    radial-gradient(circle at bottom right, rgba(14, 116, 144, 0.08), transparent 28%),
    var(--bg);
}

.share-shell {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
  display: grid;
  gap: 1.5rem;
}

.share-hero,
.share-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.share-hero {
  display: grid;
  gap: 0.9rem;
}

body.study-mode .lesson-side-column {
  display: none;
}

body.study-mode .two-column-layout {
  grid-template-columns: 1fr;
}

body.study-mode #lesson-summary {
  max-width: 68ch;
}

body.study-mode .block-card .row-actions,
body.study-mode .block-card .block-meta,
body.study-mode .block-card .block-footer {
  display: none;
}

body.study-mode .block-card {
  padding-top: 1.15rem;
}

body.study-mode .block-content {
  margin-top: 0;
}

.quote-block {
  margin: 0;
  padding: 0.85rem 0.95rem;
  background: var(--panel-soft);
  border-left: 4px solid rgba(37, 99, 235, 0.3);
  border-radius: 12px;
}

.code-shell {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #111827;
}

.code-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-language {
  font-size: 0.82rem;
  text-transform: lowercase;
}

.code-shell pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
}

.code-shell code {
  color: #e5e7eb;
  font-family: "SFMono-Regular", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92rem;
}

.inline-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.attachment-row {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.1rem 0;
}

.login-page {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.1), transparent 28%),
    var(--bg);
}

.login-shell {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
}

.login-hero {
  display: grid;
  gap: 1rem;
  padding-right: 1rem;
}

.brand-mark {
  display: inline-flex;
  width: fit-content;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.login-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 0.3rem;
}

.auth-grid {
  display: grid;
  gap: 1rem;
}

.auth-card {
  padding: 1.15rem;
}

.toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.65rem;
  z-index: 100;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  background: #111827;
  color: #fff;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 18px 32px rgba(17, 24, 39, 0.22);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast-success {
  background: #14532d;
}

.toast-danger {
  background: #7f1d1d;
}

.toast-exit {
  opacity: 0;
  transform: translateY(6px);
}

@media (max-width: 1080px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .page-shell {
    min-width: 0;
  }

  .content-grid,
  .two-column-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar,
  .page-header,
  .section-heading,
  .attachment-row,
  .block-card-top,
  .editor-card-top,
  .card-heading-row {
    flex-direction: column;
    align-items: stretch;
  }

  .top-search,
  .inline-form {
    flex-direction: column;
  }

  .page-content,
  .sidebar,
  .topbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .topbar-actions,
  .topbar-actions > *,
  .page-header .row-actions,
  .page-header .row-actions > * {
    width: 100%;
  }

  .msg-file-card .row-actions,
  .msg-file-card .row-actions > * {
    width: 100%;
  }

  .topbar-actions .button,
  .page-header .button,
  .msg-file-card .row-actions > * {
    justify-content: center;
  }
}

/* ── modal ─────────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
}

.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
  padding: 1.5rem;
  width: min(600px, 100%);
  display: grid;
  gap: 1.25rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.modal-header h2 {
  margin-bottom: 0;
}
/* ── attachment image previews ─────────────────────────────────────────────── */

/* Image attachment inline preview */
.msg-image-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  cursor: zoom-in;
  transition: opacity 0.18s ease;
}

.msg-image:hover {
  opacity: 0.88;
}

.msg-image-placeholder {
  padding: 1rem;
  font-size: 0.9rem;
}

/* Generic file attachment card */
.msg-file-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.msg-file-icon {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.msg-file-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: min(18rem, 100%);
  overflow: hidden;
  flex: 1;
}

.msg-file-info strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
}

.msg-file-info span {
  font-size: 0.82rem;
}

/* ── image fullscreen viewer ──────────────────────────────────────────────────── */

.image-fullscreen-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 90vw;
  max-height: 90vh;
}

.image-fullscreen-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  border: 0;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 101;
}

.image-fullscreen-close:hover {
  background: #fff;
  transform: scale(1.1);
}

.image-fullscreen-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.image-fullscreen-name {
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
  max-width: 80vw;
  word-break: break-word;
  margin: 0;
}
