* { margin: 0; padding: 0; box-sizing: border-box; }

.spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 2rem; opacity: 0; transition: opacity 0.3s ease; }
.modal.active { display: flex; opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background-color: rgba(0, 0, 0, 0.95); backdrop-filter: blur(12px); }
.modal-close { position: absolute; top: 2rem; right: 2rem; z-index: 10; padding: 0.5rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px; color: rgba(255, 255, 255, 0.6); cursor: pointer; transition: all 0.2s ease; }
.modal-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.modal-close svg { width: 1.5rem; height: 1.5rem; display: block; }
.modal-download { right: 5rem; text-decoration: none; }
.modal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; padding: 0.75rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px; color: rgba(255, 255, 255, 0.6); cursor: pointer; transition: all 0.2s ease; }
.modal-nav:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.modal-nav svg { width: 1.75rem; height: 1.75rem; display: block; }
.modal-prev { left: 1.5rem; }
.modal-next { right: 1.5rem; }
.modal-content { position: relative; max-width: 90vw; max-height: 90vh; transform: scale(0.95); opacity: 0; transition: all 0.4s cubic-bezier(0.25, 0.4, 0.25, 1); }
.modal.active .modal-content { transform: scale(1); opacity: 1; }
.modal-content img { max-width: 100%; max-height: 90vh; width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); transition: opacity 0.2s ease; }
.modal-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }

.gallery-fab { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 40; padding: 0.6rem 1rem; font-size: 0.9rem; font-family: inherit; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; color: rgba(255, 255, 255, 0.85); cursor: pointer; backdrop-filter: blur(6px); transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease; }
.gallery-fab:hover { background: rgba(255, 255, 255, 0.14); color: #fff; transform: translateY(-2px); }

@media (max-width: 768px) {
  .modal-nav { padding: 0.5rem; }
  .modal-prev { left: 0.5rem; }
  .modal-next { right: 0.5rem; }
  .modal-download { right: 4.5rem; }
  .gallery-fab { bottom: 1rem; right: 1rem; font-size: 0.8rem; }
}
