﻿    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg:      #000000;
      --panel:   #1c1c22;
      --border:  #2e2e38;
      --accent:  #fea723;
      --text:    #e8e6f0;
      --muted:   #6b697a;
      --danger:  #e24b4a;
    }

    html, body { min-height: 100%; }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: "Roboto Slab", serif;
      display: flex;
      flex-direction: column;
    }
	.head-box{
		width:100%;
		height:50px;
		box-sizing:border-box;
		padding:1rem 2rem;
	}
	.head-box h2 {
		display: inline-flex;
		align-items: baseline;
		gap: 0;
		white-space: nowrap;
		font-family: "Roboto Slab", serif;
	}
	.tw-char {
		display: inline-block;
		min-width: 0.1em;
	}
	.tw-cursor {
		display: inline-block;
		margin-left: 2px;
		animation: tw-blink 0.75s step-end infinite;
		color: var(--accent);
		line-height: 1;
	}
	@keyframes tw-blink {
		0%, 100% { opacity: 1; }
		50%       { opacity: 0; }
	}
    .canvas-area {
      padding: 1.5rem 2rem 2rem;
    }

    #canvas-wrapper {
      position: relative;
      border: 0px solid var(--border);
      border-radius: 0px;
    }

    /* ── animated GIF layer ───────────────────────────────── */
    #gif-layer {
      position: absolute;
      top: 0;
      left: 0;
      pointer-events: none;
      z-index: 2;
    }

    #gif-layer img {
      position: absolute;
      display: block;
      object-fit: cover;
    }

    #cell-desc-overlay {
      position: absolute;
      pointer-events: none;
      z-index: 10;
      overflow: hidden;
    }

    #cell-url-overlay {
      position: absolute;
      pointer-events: none;
      z-index: 11;
    }

    #cell-url-btn.has-url {
      pointer-events: auto;
    }

    #cell-desc {
      position: absolute;
      top: 50%;
      left: 0;
      transform: translateY(-50%) translateX(-100%);
      width: auto;
      max-width: 80%;
      color: #ffffff;
      font-family: 'Lato', sans-serif;
      line-height: 1.55;
      padding: 0.6rem 0.75rem;
      text-align: left;
      display: none;
    }

    #cell-desc.has-content {
      display: block;
    }

    #cell-url-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.72);
      border: 1px solid rgba(255,255,255,0.25);
      display: none;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      text-decoration: none;
      transition: background 0.15s, border-color 0.15s, transform 0.1s;
    }

    #cell-url-btn.has-url {
      display: flex;
    }

    #cell-url-btn:hover {
      background: var(--accent);
      border-color: var(--accent);
      transform: scale(1.1);
    }

    #cell-url-btn svg {
      width: 14px;
      height: 14px;
      fill: none;
      stroke: #fff;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    /* state screens */
    .screen {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      height: 260px;
      color: var(--muted);
      font-family: 'Lato', sans-serif;
      font-size: 0.78rem;
      text-align: center;
      padding: 2rem;
    }

    .screen .icon {
      font-size: 2rem;
      line-height: 1;
    }

    .screen .hint {
      font-size: 0.65rem;
      opacity: 0.6;
      max-width: 340px;
      line-height: 1.6;
    }

    .screen.err { color: var(--danger); }

    /* progress bar */
    #progress-wrap {
      width: 200px;
      height: 3px;
      background: var(--border);
      border-radius: 2px;
      overflow: hidden;
    }

    #progress-bar {
      height: 100%;
      background: var(--accent);
      width: 0%;
      transition: width 0.15s;
    }

    /* ── lightbox ─────────────────────────────────────────── */
    #lightbox {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: rgba(0, 0, 0, 0.98);
      align-items: center;
      justify-content: center;
      cursor: zoom-out;
    }

    #lightbox.open {
      display: flex;
      animation: lb-in 0.42s ease;
    }

    @keyframes lb-in {
      from { opacity: 0; }
      to   { opacity: 1; }
    }

    #lightbox-inner {
      position: relative;
      display: grid;
      grid-template-columns: 70% 30%;
      width: 92vw;
      max-height: 92vh;
      background: #000;
      border-radius: 8px;
      overflow: hidden;
      cursor: default;
      animation: lb-zoom 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    }

    @keyframes lb-zoom {
      from { transform: scale(0.96); opacity: 0; }
      to   { transform: scale(1);    opacity: 1; }
    }

    #lightbox-img-col {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #000;
      overflow: hidden;
    }

    /* slider track — holds all images side by side */
    #lightbox-slider {
      display: flex;
      width: 100%;
      height: 100%;
      transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    }

    #lightbox-slider .lb-slide {
      flex: 0 0 100%;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    #lightbox-slider .lb-slide img {
      display: block;
      width: 100%;
      height: 100%;
      max-height: 92vh;
      object-fit: contain;
    }

    /* arrow buttons */
    .lb-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 5;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: rgba(0,0,0,0.65);
      border: 1px solid rgba(255,255,255,0.2);
      color: #fff;
      font-size: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.15s, transform 0.1s;
      user-select: none;
    }
    .lb-arrow:hover { background: var(--accent); }
    .lb-arrow.lb-prev { left: 12px; }
    .lb-arrow.lb-next { right: 12px; }
    .lb-arrow.hidden  { display: none; }

    /* slide counter */
    #lb-counter {
      position: absolute;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      font-family: 'Lato', sans-serif;
      font-size: 0.68rem;
      color: rgba(255,255,255,0.5);
      pointer-events: none;
      letter-spacing: 0.08em;
    }

    #lightbox-desc-col {
      display: flex;
      flex-direction: column;
      padding: 2rem 1.5rem;
      background: #000;
      overflow-y: auto;
      border-left: 1px solid rgba(255,255,255,0.08);
      scrollbar-width: thin;
      scrollbar-color: rgba(255,255,255,0.12) transparent;
    }

    #lightbox-desc-col::-webkit-scrollbar { width: 4px; }
    #lightbox-desc-col::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

    #lightbox-desc-text {
      color: #e8e6f0;
      font-family: 'Lato', sans-serif;
      font-size: 0.78rem;
      line-height: 1.7;
    }

    #lightbox-category {
      margin-top: 1.25rem;
      font-family: 'Lato', sans-serif;
      font-size: 0.65rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
    }

    #lightbox-close {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: rgba(28, 28, 34, 0.9);
      border: 1px solid rgba(255,255,255,0.15);
      color: #e8e6f0;
      font-size: 16px;
      line-height: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s, transform 0.1s;
      user-select: none;
      z-index: 10;
    }

    #lightbox-close:hover {
      background: var(--danger);
      border-color: var(--danger);
      transform: scale(1.1);
    }

    /* ── filter bar ───────────────────────────────────────── */
    #filter-bar {
      display: none;
      background: var(--panel);
      border-bottom: 11px solid var(--border);
      padding: 0.8rem 2rem;
	  margin:1.1rem 0 0.1rem 0;
      gap: 0.5rem;
      flex-wrap: wrap;
      align-items: center;
      flex-shrink: 0;
    }

    #filter-bar.visible { display: flex; }

    .filter-btn {
      font-family: 'Lato', sans-serif;
      font-size: 0.68rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 0.38rem 0.95rem;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      transition: background 0.15s, color 0.15s, border-color 0.15s;
      white-space: nowrap;
    }

    .filter-btn:hover {
      border-color: var(--accent);
      color: var(--text);
    }

    .filter-btn.active {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }
  

