
:root {
  /* Light Mode (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-tertiary: #f0f0f0;
  --text-primary: #0a0a0a;
  --text-secondary: #333333;
  --text-tertiary: #666666;
  --grid-line: rgba(0, 0, 0, 0.12);
  --accent-color: #000000;
  --top-bar-height: 72px;
  --top-bar-height-mobile: 64px;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.12);
  --scrollbar-width: 0px;
  --btn-bg: rgba(0, 0, 0, 0.03);
  --banana-base-opacity: 0.12;
}

.scrollbar-light {
  --scrollbar-thumb: #cccccc;
  --scrollbar-thumb-hover: #aaaaaa;
}

.dark-mode {
  --bg-primary: #131313;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #212121;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-tertiary: #787878;
  --grid-line: #444746;
  --accent-color: #e0e0e0;
  --glass-bg: rgba(19, 19, 19, 0.8);
  --glass-border: #444746;
  --btn-bg: rgba(255, 255, 255, 0.05);
}

.scrollbar-dark {
  --scrollbar-thumb: #2a2a2a;
  --scrollbar-thumb-hover: #3a3a3a;
}

/* Smooth Theme Transition (fallback for browsers without View Transitions API) */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              fill 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              stroke 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* View Transitions API — smooth GPU-accelerated cross-fade.
   Old state fades out to reveal new state underneath,
   so both light→dark and dark→light look equally smooth. */
::view-transition-group(root) {
  animation-duration: 0.4s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

::view-transition-old(root) {
  animation: theme-fade-out 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

::view-transition-new(root) {
  animation: none;
}

@keyframes theme-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Preferences panel transitions in sync with root */
::view-transition-group(preferences-panel) {
  animation-duration: 0.4s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

::view-transition-old(preferences-panel) {
  animation: theme-fade-out 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

::view-transition-new(preferences-panel) {
  animation: none;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================
   Focus Indicators for Keyboard Navigation
   ========================================== */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}

/* Buttons and interactive elements */
.nav-btn:focus-visible,
.filter-trigger:focus-visible,
.copy-btn:focus-visible,
.card-share-btn:focus-visible,
.favorite-btn:focus-visible,
.expand-btn:focus-visible,
.modal-close:focus-visible,
.modal-nav-btn:focus-visible,
.modal-copy-btn:focus-visible,
.modal-action-btn:focus-visible,
.modal-ai-btn:focus-visible,
.faq-question:focus-visible,
.scroll-to-top:focus-visible,
.empty-state-btn:focus-visible,
.email-submit-btn:focus-visible {
  outline-offset: -2px;
  background: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
}

/* Social links */
.social-link:focus-visible {
  outline-offset: 2px;
  color: var(--accent-color);
}

/* Search input */
.search-box input:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 2px var(--accent-color);
}

/* Email input */
.email-form input:focus-visible {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Clickable gallery card image container */
.image-container:focus-visible {
  outline: none;
}

.image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 4px var(--accent-color);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.image-container:focus-visible::after {
  opacity: 1;
}

.image-container:focus-visible .gallery-image {
  transform: scale(1.05);
}

.image-container:focus-visible .expand-btn {
  opacity: 1;
  transform: translateY(0);
}

/* Prompt text (clickable) */
.prompt-text:focus-visible {
  outline-offset: 2px;
  color: var(--text-primary);
}

/* Metadata links */
.metadata-link:focus-visible {
  outline-offset: 2px;
  color: var(--text-primary);
}

/* App store and tutorial links */
.app-store-link:focus-visible,
.tutorial-link:focus-visible {
  outline-offset: 2px;
}

/* Filter checkboxes - style the label */
.filter-checkbox:focus-within {
  color: var(--text-primary);
}

.filter-checkbox:focus-within .checkbox-box {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}


html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-x: hidden;
  width: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 1px solid var(--grid-line);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 1px solid var(--grid-line);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Firefox */
* {
  scrollbar-width: auto;
  scrollbar-color: var(--scrollbar-thumb) var(--bg-primary);
}


body {
  font-family:
    "Archivo",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: visible;
  padding-top: var(--top-bar-height);
}

body.scroll-lock {
  overflow: hidden;
  padding-right: var(--scrollbar-width);
}

@media (max-width: 900px) {
  body {
    padding-top: var(--top-bar-height-mobile);
  }
}

/* Page-wide Grid Lines - Fixed vertical lines spanning full viewport */
.page-grid {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1050px;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 1100px) {
  .page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-grid-line:nth-child(3) {
    display: none;
  }
}

@media (max-width: 800px) {
  .page-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-grid-line:nth-child(2) {
    display: none;
  }
}

.page-grid-line:nth-child(4) {
  display: none;
}

.page-grid-line {
  border-left: 1px solid var(--grid-line);
}

.page-grid-line:last-child {
  border-right: 1px solid var(--grid-line);
}

/* Banana emoji background */
/* Skeleton Styles */
.gallery-skeleton {
  display: contents;
}

.skeleton-card {
  aspect-ratio: 3/4;
  background: linear-gradient(
    90deg, 
    var(--bg-secondary) 25%, 
    var(--bg-tertiary) 50%, 
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-right: 1px solid var(--grid-line);
  border-bottom: 1px solid var(--grid-line);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.banana-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.banana-bg span {
  position: absolute;
  font-size: 2rem;
  opacity: 0;
  user-select: none;
  pointer-events: none;
}

/* Different floating paths for variety */
/* Animation handled via JS to prevent tab-switch jumps */
.banana-bg span {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform, opacity;
}

@keyframes floatAcross1 {
  0% {
    transform: translate(-5vw, 110vh) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: var(--banana-base-opacity);
  }
  85% {
    opacity: var(--banana-base-opacity);
  }
  100% {
    transform: translate(5vw, -10vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes floatAcross2 {
  0% {
    transform: translate(5vw, 110vh) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: var(--banana-base-opacity);
  }
  85% {
    opacity: var(--banana-base-opacity);
  }
  100% {
    transform: translate(-5vw, -10vh) rotate(-270deg);
    opacity: 0;
  }
}

@keyframes floatAcross3 {
  0% {
    transform: translate(-2vw, 110vh) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: var(--banana-base-opacity);
  }
  85% {
    opacity: var(--banana-base-opacity);
  }
  100% {
    transform: translate(8vw, -10vh) rotate(180deg);
    opacity: 0;
  }
}

.container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 0;
  position: relative;
  z-index: 2;
}

/* Top Bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--top-bar-height);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.top-bar.hide {
  top: calc(-1 * var(--top-bar-height));
}

@media (max-width: 900px) {
  .top-bar.hide {
    top: calc(-1 * var(--top-bar-height-mobile));
  }
}

.top-bar-container {
  width: 100%;
  max-width: 1400px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  margin: 0 auto;
}

.top-bar-left, .top-bar-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.top-bar-center {
  flex: 2;
  display: flex;
  justify-content: center;
}

.top-bar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s ease;
}

.top-bar-logo:hover {
  transform: scale(1.02);
}

.logo-emoji {
  font-size: 1.5rem;
}

.logo-text {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.top-bar-nav {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}

.top-bar-link {
  text-decoration: none;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: all 0.2s ease;
  position: relative;
  padding: 0.5rem 0;
}

.top-bar-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.top-bar-link:hover, .top-bar-link.active {
  color: var(--text-primary);
}

.top-bar-link:hover::after, .top-bar-link.active::after {
  width: 100%;
}

.top-bar-right {
  justify-content: flex-end;
  gap: 1.5rem;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}


/* Preferences Dropdown */
.preferences-dropdown-wrapper {
  position: relative;
}

.top-bar-action-btn {
  background: var(--btn-bg);
  border: 1px solid var(--grid-line);
  color: var(--text-tertiary);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.top-bar-action-btn:hover, .top-bar-action-btn.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

.cta-shine {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.3); /* Slightly brighter border to standout */
  color: var(--text-tertiary); /* Brighter icon by default */
}

.cta-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 40%,
    rgba(255, 255, 255, 0.5) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: shine 4s infinite ease-in-out;
  pointer-events: none;
}

@keyframes shine {
  0% { left: -75%; }
  20% { left: 125%; }
  100% { left: 125%; } /* Pause interval */
}

.preferences-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 300px;
  background: var(--bg-secondary);
  border: 1px solid var(--grid-line);
  padding: 1.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
}

.preferences-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  view-transition-name: preferences-panel;
}

.preferences-menu-footer {
  display: none;
}

/* Hamburger Button Base */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--btn-bg);
  border: 1px solid var(--grid-line);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  margin-left: 0.5rem;
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: currentColor;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

.hamburger-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.hamburger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}

.hamburger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Only Elements (Hidden on Desktop) */
.mobile-menu-socials,
.mobile-menu-footer {
  display: none;
}

@media (max-width: 900px) {
  .preferences-menu {
    position: fixed;
    top: 72px; /* Exactly below the top bar */
    bottom: auto;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(-20px);
    border: 1px solid var(--grid-line);
    border-top: none;
    padding: 1.5rem 1.25rem;
    background: var(--bg-primary);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    z-index: 998; /* Below hamburger/top metrics */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .preferences-menu::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
  }

  .preferences-menu .preferences-label {
    font-size: 0.65rem;
    margin-bottom: 0.5rem;
  }

  .preferences-menu .preferences-description {
    font-size: 0.7rem;
    margin-bottom: 0.6rem;
    line-height: 1.4;
  }

  .preferences-setting-item {
    padding: 0.15rem 0;
  }

  .setting-name {
    font-size: 0.75rem;
  }

  .preferences-menu .ai-radio-card {
    padding: 0.5rem;
    gap: 0.35rem;
  }

  .preferences-menu .ai-radio-card span {
    font-size: 0.6rem;
  }

  .preferences-menu .ai-radio-card svg {
    width: 12px;
    height: 12px;
  }

  .preferences-menu-footer {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--grid-line);
  }

  .preferences-btn {
    flex: 1;
    padding: 0.8rem;
    font-family: "Archivo", sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
  }

  .preferences-btn.cancel {
    background: transparent;
    border: 1px solid var(--grid-line);
    color: var(--text-tertiary);
  }

  .preferences-btn.apply {
    background: #ffffff;
    border: 1px solid #ffffff;
    color: #000000;
  }

  /* Remove mobile bottom sheet handle */
  .preferences-menu::before {
    display: none;
  }
  
  .preferences-menu.show {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
    view-transition-name: preferences-panel;
  }

  .hamburger-btn {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  .top-bar-center {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
  }

  .top-bar-center.active {
    transform: translateX(0);
  }

  .top-bar-nav {
    flex-direction: column;
    gap: 3rem;
    align-items: center;
  }

  .top-bar-nav li {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .top-bar-center.active .top-bar-nav li {
    opacity: 1;
    transform: translateY(0);
  }

  .top-bar-center.active .top-bar-nav li:nth-child(1) { transition-delay: 0.1s; }
  .top-bar-center.active .top-bar-nav li:nth-child(2) { transition-delay: 0.2s; }
  .top-bar-center.active .top-bar-nav li:nth-child(3) { transition-delay: 0.3s; }

  .mobile-menu-socials {
    display: flex;
    gap: 2rem;
    margin-top: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.4s;
  }

  .top-bar-center.active .mobile-menu-socials {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-menu-socials .social-link {
    color: var(--text-tertiary);
    transition: all 0.3s ease;
  }

  .mobile-menu-socials .social-link:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
  }

  .top-bar-link {
    font-size: 1.5rem;
    letter-spacing: 0.20em;
  }

  .top-bar-right {
    gap: 0.75rem;
  }

  .top-bar-actions {
    gap: 0.75rem;
    display: flex;
    align-items: center;
  }

  .hamburger-btn {
    margin-left: 0;
  }

  .mobile-menu-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.5s;
    user-select: none;
  }

  .top-bar-center.active .mobile-menu-footer {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}


.ai-service-selector {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.25rem;
  transition: all 0.4s ease;
}

.ai-service-selector.disabled {
  opacity: 0.2;
  pointer-events: none;
  filter: grayscale(1);
}

.ai-radio-label {
  flex: 1;
  cursor: pointer;
}

.ai-radio-label input {
  display: none;
}

.ai-radio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--grid-line);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-radio-card svg {
  color: var(--text-tertiary);
  transition: all 0.3s ease;
}

.ai-radio-card span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

.ai-radio-label:hover .ai-radio-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.ai-radio-label input:checked + .ai-radio-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.ai-radio-label input:checked + .ai-radio-card svg {
  color: var(--text-primary);
  transform: scale(1.1);
}

.ai-radio-label input:checked + .ai-radio-card span {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.preferences-group {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.preferences-group + .preferences-group {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.preferences-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
  align-items: stretch;
}

.preferences-settings-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.preferences-setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.6rem;
  margin: 0 -0.6rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.preferences-setting-item:hover {
  background: var(--btn-bg);
}

.setting-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}

.preferences-setting-item:hover .setting-name {
  color: var(--text-primary);
}

/* Automation Header with Switch */
.preferences-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.6rem;
  margin-left: -0.6rem;
  margin-right: -0.6rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.preferences-header:hover {
  background: var(--btn-bg);
}

.preferences-header .preferences-label {
  margin-bottom: 0;
  transition: color 0.2s ease;
}

.preferences-header:hover .preferences-label {
  color: var(--text-primary);
}

/* Modern Switch UI */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--btn-bg);
  transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--grid-line);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-tertiary);
  transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch input:checked + .switch-slider {
  background-color: var(--btn-bg);
  border-color: var(--accent-color);
}

.switch input:checked + .switch-slider:before {
  transform: translateX(16px);
  background-color: var(--text-primary);
}

.preferences-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.preferences-description {
  display: block;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  opacity: 0.8;
}

/* Mobile menu adjustments for smaller screens */
@media (max-width: 768px) {
  .top-bar-container {
    padding: 0 1rem;
  }

  .logo-text {
    font-size: 0.9rem;
    display: inline; /* Ensure visible on mobile */
  }

  .logo-emoji {
    font-size: 1.25rem;
  }
  
  .card-content {
    padding: 1.5rem;
  }
  
  .prompt-text {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
  }
  
  .header .container {
    padding: 3rem 1.25rem 2rem;
  }
  
  .header-title {
    font-size: 2.25rem;
  }


}

@media (max-width: 480px) {
  .top-bar-container {
    padding: 0 1rem;
  }

  .logo-text {
    font-size: 0.9rem;
  }

  .logo-emoji {
    font-size: 1.2rem;
  }


}

@keyframes menuLinkIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes menuFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Header */
.header {
  border-bottom: 1px solid var(--grid-line);
  position: relative;
  z-index: 10;
  background: var(--bg-primary);
}

.header .container {
  padding: 6rem 1.5rem 4rem;
  text-align: center;
  max-width: 1050px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .header .container {
    padding: 4rem 1rem 3rem;
  }
}

.header-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  text-transform: uppercase;
}

.header-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
  opacity: 0.8;
}

.social-link {
  color: var(--text-tertiary);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}


/* Filters */
.filters {
  border-bottom: 1px solid var(--grid-line);
  background: var(--glass-bg);
  position: sticky;
  top: var(--top-bar-height);
  z-index: 100;
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: top;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.top-bar.hide ~ .filters {
  top: 0;
}

@media (max-width: 900px) {
  .filters {
    top: var(--top-bar-height-mobile);
    border-top: 1px solid var(--grid-line);
  }
}

@media (max-width: 640px) {
  .filters {
    /* Ensure consistent height to prevent layout shifts */
    min-height: 52px;
  }
  
  .filters .container {
    height: 100%;
  }
  
  .filters-wrapper {
    height: 100%;
  }
}

.filters .container {
  padding: 0;
  max-width: 1050px;
  margin: 0 auto;
}

.filters-wrapper {
  display: flex;
  align-items: center;
  border-left: 1px solid var(--grid-line);
  border-right: 1px solid var(--grid-line);
  width: 100%;
}

@media (max-width: 640px) {
  .filters-wrapper {
    flex-wrap: nowrap; /* Prevent wrapping to keep items side-by-side */
    border-right: 1px solid var(--grid-line);
    border-left: 1px solid var(--grid-line);
  }
}

/* Search Box */
.search-box {
  position: relative;
  flex: 1;
  min-width: 0; /* Allow shrinking below content size if needed */
  transition: background 0.2s ease;
}

@media (max-width: 640px) {
  .search-box {
    flex: 1;
    width: auto;
    border-bottom: none;
  }
}

.search-box:hover {
  background: rgba(255, 255, 255, 0.01);
}

.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 1.1rem 1rem 1.1rem 3.25rem;
  font-family: "Archivo", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 5;
  transition: color 0.2s ease;
}

.search-box input::placeholder {
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 1;
  transition: color 0.2s ease;
}

.search-box:hover .search-icon,
.search-box:hover input::placeholder {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .search-box {
    flex: 1;
    width: auto;
    border-bottom: none;
    height: 52px;
  }
  
  .search-box input {
    padding: 1rem 0.5rem 1rem 2.5rem;
    font-size: 0.75rem;
    height: 100%;
    line-height: normal;
  }
  
  .search-icon {
    left: 0.85rem;
    width: 14px;
    height: 14px;
  }
}

.search-box input:focus {
  outline: none;
}

.filter-dropdown {
  position: relative;
  display: flex;
  justify-content: flex-end;
  border-left: 1px solid var(--grid-line);
}

@media (max-width: 640px) {
  .filter-dropdown {
    width: auto;
    border-left: 1px solid var(--grid-line);
    height: 52px;
    display: flex;
    align-items: center;
  }
  
  .filter-trigger {
    justify-content: flex-end;
    padding: 1rem 0.75rem;
    font-size: 0.75rem;
    height: 100%;
    white-space: nowrap;
    line-height: normal;
  }
  
  .filter-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
  }
}



.filter-trigger {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  padding: 1.1rem 1.5rem;
  width: 100%;
  justify-content: flex-end;
  font-family: "Archivo", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.filter-trigger:hover {
  color: var(--text-primary);
}

.filter-trigger.active {
  color: var(--text-primary);
}

.filter-icon {
  width: 14px;
  height: 14px;
}

.filter-menu {
  position: absolute;
  top: 100%;
  right: -1px;
  background: var(--bg-secondary);
  border: 1px solid var(--grid-line);
  padding: 1.5rem;
  min-width: max-content;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .filter-menu {
    width: max-content;
    min-width: 220px;
    right: -1px;
    left: auto;
    border-left: 1px solid var(--grid-line);
    padding: 1.25rem;
  }

  .filter-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
  }

  .filter-group + .filter-group {
    margin-top: 1.5rem;
  }

  .filter-label {
    width: 100%;
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.filter-group + .filter-group {
  margin-top: 2rem;
}

.filter-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--grid-line);
  padding-bottom: 0.75rem;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.filter-checkbox:hover {
  color: var(--text-primary);
}

.filter-checkbox input {
  display: none;
}

.checkbox-box {
  width: 16px;
  height: 16px;
  border: 1px solid var(--grid-line);
  position: relative;
  transition: all 0.2s ease;
}

.filter-checkbox input:checked + .checkbox-box {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.filter-checkbox input:checked + .checkbox-box::after {
  content: "";
  position: absolute;
  top: 45%;
  left: 50%;
  width: 4px;
  height: 8px;
  border: solid var(--bg-primary);
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* Metadata Visibility Transitions */
.metadata-item {
  opacity: 1;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  transform: scale(1);
  filter: blur(0);
  min-width: 0;
  flex-shrink: 0;
  
  /* Unified visibility transition */
  transition: 
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.2s ease,
    background 0.2s ease;
}

.hide-date .metadata-date {
  opacity: 0;
  max-width: 0;
  margin: 0;
  transform: scale(0.9);
  filter: blur(4px);
  pointer-events: none;
}

.hide-source .source-item {
  opacity: 0;
  max-width: 0;
  margin: 0;
  transform: scale(0.9);
  filter: blur(4px);
  pointer-events: none;
}

.hide-date.hide-source .card-metadata {
  max-height: 0;
  opacity: 0;
  padding-top: 0; /* Transitioned via 'all' */
  margin: 0;
  border-top-color: transparent; /* Keep border width to avoid layout snap, just hide color */
  pointer-events: none;
}

/* Ensure balanced padding when metadata is hidden */
.hide-date.hide-source .prompt-text {
  margin-bottom: 0;
}

/* Ensure balanced padding when both prompt and metadata are hidden */
.hide-prompt.hide-date.hide-source .card-header {
  margin-bottom: 0;
}

/* Prompt Visibility Transitions */
.prompt-text {
  transition: 
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.2s ease;
  max-height: 200px;
  opacity: 1;
  overflow: hidden;
}

.hide-prompt .prompt-text {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

/* Main Content */
.main {
  position: relative;
  z-index: 5;
}

.main > .container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid var(--grid-line);
  border-right: 1px solid var(--grid-line);
  background: var(--bg-primary);
}

@media (max-width: 1100px) {
  .main > .container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
    /* STRICTLY 1 column for mobile & tablets < 800px */
  .main > .container {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Fix border issues */
.main > .container .gallery-card:nth-child(3n) {
  border-right: 1px solid var(--grid-line);
}

@media (min-width: 1101px) {
  .main > .container .gallery-card:nth-child(3n) {
    border-right: none;
  }
}

@media (max-width: 1100px) and (min-width: 801px) {
  .main > .container .gallery-card:nth-child(2n) {
    border-right: none;
  }
}

@media (max-width: 800px) {
  .main > .container .gallery-card {
    border-right: none;
  }
}

.gallery {
  display: contents;
}

/* Filtering Animations */
.gallery-card.filtering {
  animation: filterOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gallery-card.entering {
  animation: filterIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

@keyframes filterOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.95); filter: blur(4px); }
}

@keyframes filterIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.98); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  padding: 8rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: fadeInUp 0.6s ease-out both;
}

.empty-state-icon {
  font-size: 4rem;
  color: var(--text-tertiary);
  opacity: 0.2;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.empty-state-text {
  font-size: 1rem;
  color: var(--text-tertiary);
  max-width: 400px;
  line-height: 1.6;
}

.empty-state-btn {
  margin-top: 1rem;
  padding: 1rem 2.5rem;
  background: var(--accent-color);
  color: var(--bg-primary);
  border: none;
  font-family: "Archivo", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.empty-state-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* Gallery Card */
.gallery-card {
  background: var(--bg-primary);
  border-right: 1px solid var(--grid-line);
  border-bottom: 1px solid var(--grid-line);
  /* Removed overflow: hidden to prevent cropping of notifications */
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  position: relative;
  z-index: 5;
  will-change: auto;
}

.gallery-card:nth-child(3n) {
  border-right: none;
}

.gallery-card:hover {
  background: var(--bg-secondary);
  will-change: transform, opacity;
}

.gallery-card:nth-child(1) {
  animation-delay: 0.05s;
}
.gallery-card:nth-child(2) {
  animation-delay: 0.1s;
}
.gallery-card:nth-child(3) {
  animation-delay: 0.15s;
}
.gallery-card:nth-child(4) {
  animation-delay: 0.2s;
}
.gallery-card:nth-child(5) {
  animation-delay: 0.25s;
}
.gallery-card:nth-child(6) {
  animation-delay: 0.3s;
}

/* Image Container - 9:16 aspect ratio */
.image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 500px;
  background: var(--bg-tertiary);
  overflow: hidden;
  border-bottom: 1px solid var(--grid-line);
  cursor: pointer;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease-out;
}

.gallery-card:hover .gallery-image {
  transform: scale(1.05);
}

/* Card Content */
.card-content {
  padding: 2rem;
}

/* Remove bottom margin from the effectively last visible element */
.card-content > *:last-child {
  margin-bottom: 0;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  position: relative;
  transition: margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: margin-bottom;
}

.card-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.card-btn-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.copy-btn, .card-share-btn, .favorite-btn {
  position: relative;
  background: transparent;
  border: 1px solid var(--grid-line);
  border-radius: 0;
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-share-btn, .favorite-btn {
  padding: 0.5rem;
}

.favorite-btn svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), fill 0.3s ease, stroke 0.3s ease;
}

.favorite-btn.active {
  color: #ff4757;
  border-color: rgba(255, 71, 87, 0.4);
  background: rgba(255, 71, 87, 0.05);
}

.favorite-btn.active svg {
  fill: #ff4757;
  stroke: #ff4757;
  transform: scale(1.1);
}

.copy-btn:hover, .card-share-btn:hover, .favorite-btn:hover, .modal-action-btn:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
}

.favorite-btn.active:hover {
  background: #ff4757;
  color: white;
  border-color: #ff4757;
}

.favorite-btn.active:hover svg {
  fill: white;
  stroke: white;
  transform: scale(1.1);
}

/* Toggle Animation */
@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1.1); }
}

@keyframes heartUnpop {
  0% { transform: scale(1.1); }
  50% { transform: scale(0.8); }
  100% { transform: scale(1); }
}

.favorite-btn.animating.active svg {
  animation: heartPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.favorite-btn.animating:not(.active) svg {
  animation: heartUnpop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.copy-btn:active, .card-share-btn:active, .modal-action-btn:active {
  transform: scale(0.98);
}

.copy-icon {
  width: 12px;
  height: 12px;
}


.prompt-text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  cursor: pointer;
  overflow-wrap: break-word;
  word-break: break-word;
}

.prompt-text:hover {
  color: var(--text-primary);
}

/* Card Metadata */
.card-metadata {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--grid-line);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 100px;
  opacity: 1;
  overflow: hidden;
}

.metadata-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.metadata-icon {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.metadata-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  /* Do not define a standalone transition here as it overrides .metadata-item */
}

.metadata-link:hover {
  color: var(--text-primary);
}

.external-icon {
  width: 10px;
  height: 10px;
  opacity: 0.5;
  transition: all 0.2s ease;
  margin-top: -1px;
}

.metadata-link:hover .metadata-icon,
.metadata-link:hover .external-icon {
  opacity: 1;
}

/* Platform Specific Colors */
/* Dim 'Source' label */
.source-item span {
  color: var(--text-tertiary);
  font-weight: 400;
  transition: color 0.2s ease;
}

.metadata-link:hover span {
  color: var(--text-secondary);
}

.metadata-item.source-item.metadata-link {
  padding: 0.2rem 0.4rem;
  margin-top: -0.2rem;
  margin-bottom: -0.2rem;
  margin-right: -0.4rem;
  border-radius: 2px;
}

.card-metadata .source-item {
  margin-left: auto;
}

.metadata-item.source-item.metadata-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* About Section */
.about-section {
  grid-column: 1 / -1;
  padding: 8rem 3rem;
  background: var(--bg-primary);
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--grid-line);
  text-align: center;
}

.about-container {
  max-width: 800px;
  margin: 0 auto;
}

.section-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
}

.about-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.about-text:last-of-type {
  margin-bottom: 4rem;
}

.about-text a {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.2s ease;
  font-weight: 500;
}

.about-text a:hover {
  opacity: 0.7;
}

.shine-effect {
  color: var(--text-primary);
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    rgba(255, 255, 255, 0.4) 25%,
    #ffffff 50%,
    rgba(255, 255, 255, 0.4) 75%,
    #ffffff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: calm-shine 8s linear infinite;
  display: inline;
  font-weight: 700;
  text-decoration: none;
}

.shine-effect strong {
  font-weight: 700;
}

@keyframes calm-shine {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.tech-cta-link {
  display: inline;
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
  margin-left: 0.5rem;
  transition: all 0.3s ease;
}

.tech-cta-link:hover {
  opacity: 1;
  transform: translateY(-2px);
  color: #fff;
}

.inline-instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  vertical-align: middle;
}

.inline-instagram svg {
  margin-top: -2px;
  color: var(--accent-color);
  opacity: 0.8;
}

.about-socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.about-section .social-link {
  color: var(--text-secondary);
}

.about-section .social-link svg {
  width: 24px;
  height: 24px;
}

/* FAQ Section */
.faq-section {
  grid-column: 1 / -1;
  padding: 5rem 3rem;
  background: var(--bg-primary);
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--grid-line);
  margin-top: -1px;
}

.faq-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3.5rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.faq-container {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--grid-line);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  transition: color 0.2s ease;
  font-family: "Archivo", sans-serif;
}

.faq-question:hover {
  color: var(--text-tertiary);
}

.faq-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  opacity: 0.4;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-tertiary);
}

.faq-item.active .faq-answer {
  grid-template-rows: 1fr;
}

.faq-inner {
  overflow: hidden;
  padding-bottom: 0;
  transition: padding-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-inner {
  padding-bottom: 1.5rem;
}

.faq-answer p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.faq-answer ol {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-tertiary);
}

.faq-answer ol li {
  margin-bottom: 0.25rem;
}

.tutorial-link {
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tutorial-link:hover {
  color: var(--text-primary);
  opacity: 0.8;
}

.tutorial-link svg {
  transition: transform 0.2s ease;
}

.tutorial-link:hover svg {
  transform: scale(1.1);
}

.app-store-link:hover {
  background: var(--bg-secondary);
  border-color: var(--text-tertiary);
}

.app-store-link:hover span {
  color: var(--text-primary);
}

.app-store-link svg {
  transition: transform 0.2s ease;
}

.app-store-link:hover svg {
  transform: scale(1.1);
}

/* Footer */
.footer {
  border-top: 1px solid var(--grid-line);
  position: relative;
  z-index: 10;
  background: var(--bg-primary);
}

.footer .container {
  max-width: 1050px;
  border-left: 1px solid var(--grid-line);
  border-right: 1px solid var(--grid-line);
  padding: 3rem;
  text-align: center;
  margin: 0 auto;
}

.footer p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 300;
  letter-spacing: 0.08em;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.beating-heart {
  width: 16px;
  height: 16px;
  color: #ff3e3e;
  animation: heartBeat 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.footer-link {
  color: inherit;
  text-decoration: none;
}

/* Copy Notification */
.copy-notification {
  position: absolute;
  top: -8px;
  right: 0;
  background: var(--accent-color);
  color: var(--bg-primary);
  padding: 0.5rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(0) scale(0.9);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  /* Prevent going off-screen on the left in narrow cards */
  max-width: calc(100vw - 4rem);
}

.copy-notification.show {
  opacity: 1;
  transform: translateY(-100%) scale(1);
}

/* Image Modal specific: center notification at the top to avoid blocking close btn */
.modal-actions .copy-notification {
  top: -12px;
  right: auto;
  left: 50%;
  transform: translateX(-50%) translateY(0) scale(0.9);
}

.modal-actions .copy-notification.show {
  transform: translateX(-50%) translateY(-100%) scale(1);
}

/* Custom Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: var(--accent-color);
  color: var(--bg-primary);
  padding: 0.4rem 0.7rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0s;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0.4s;
}

/* Hide tooltip when notification is showing */
[data-tooltip]:has(.copy-notification.show)::before,
[data-tooltip]:has(.copy-notification.show)::after {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0s;
}

/* Global: Hide all tooltips when any notification is active */
body:has(.copy-notification.show) [data-tooltip]::after,
body:has(.filter-menu.show) [data-tooltip]::after,
body:has(.modal.show) .gallery [data-tooltip]::after {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0s;
}

/* Global: Hide notification when hovering any other element with a tooltip */
body:has([data-tooltip]:hover:not(:has(.copy-notification.show))) .copy-notification.show {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1100px) {
  .container, .page-grid, .header .container, .main > .container, .filters .container {
    max-width: calc(100% - 2rem);
    margin: 0 1rem;
  }

  .filters-wrapper {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 900px) {
  .container, .page-grid, .header .container, .main > .container, .filters .container {
    max-width: calc(100% - 2rem);
    margin: 0 1rem;
  }

  .page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-grid-line:nth-child(3) {
    display: none;
  }

  .main > .container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main > .container .gallery-card:nth-child(2n) {
    border-right: none;
  }

  .main > .container .gallery-card:nth-child(odd) {
    border-right: 1px solid var(--grid-line);
  }
}

@media (max-width: 768px) {
  .container, .page-grid, .header .container, .main > .container, .filters .container {
    max-width: calc(100% - 2rem);
    margin: 0 1rem;
  }

  .page-grid {
    display: none;
  }

  .header .container {
    padding: 4rem 1.5rem 3rem;
  }

  .main > .container {
    grid-template-columns: minmax(0, 1fr);
  }

  .main > .container .gallery-card,
  .main > .container .gallery-card:nth-child(odd),
  .main > .container .gallery-card:nth-child(2n),
  .main > .container .gallery-card:nth-child(3n) {
    border-right: none;
  }

  .image-container {
    max-height: 500px;
  }

  .card-content {
    padding: 1.5rem;
  }


  .about-section {
    padding: 5rem 1.5rem;
  }

  .about-socials {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .prompt-text {
    font-size: 0.85rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .card-metadata {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .faq-section {
    padding: 3rem 1.5rem;
  }

  .filters .container {
    padding: 0;
  }

  /* Force side-by-side layout for search and filter on mobile */
  .filters-wrapper {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    border-left: 1px solid var(--grid-line);
    border-right: 1px solid var(--grid-line);
  }

  .search-box {
    flex: 1;
    min-width: 0;
  }

  .filter-dropdown {
    flex: none;
  }

  .search-box input {
    padding: 0.8rem 0.5rem 0.8rem 2.2rem;
    font-size: 0.75rem;
    text-overflow: ellipsis;
  }

  .search-icon {
    left: 0.75rem;
    width: 14px;
    height: 14px;
  }

  .faq-title {
    font-size: 1.25rem;
    margin-bottom: 2rem;
  }

  .filter-trigger {
    padding: 0.8rem 1.5rem;
    font-size: 0.75rem;
    gap: 0.5rem;
  }

  .filter-icon {
    width: 12px;
    height: 12px;
  }

  .faq-container {
    max-width: 100%;
  }

  .faq-question {
    font-size: 0.9rem;
    padding: 1.25rem 0;
  }

  .faq-answer p {
    font-size: 0.85rem;
  }

  .footer .container {
    margin: 0 1rem;
    max-width: calc(100% - 2rem);
    padding: 2rem 1.5rem;
  }

  .footer p {
    font-size: 0.7rem;
  }

  .banana-bg span {
    font-size: 1rem;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .header .container {
    padding: 3rem 1.25rem 2rem;
  }

  .header-title {
    font-size: 1.5rem;
  }

  .header-tagline {
    font-size: 0.55rem;
    letter-spacing: 0.25em;
    margin-bottom: 1.5rem;
  }

  .header-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }

  .header-socials {
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .social-link svg {
    width: 18px;
    height: 18px;
  }

  .container, .main > .container, .filters .container, .header .container {
    margin: 0 0.75rem;
    max-width: calc(100% - 1.5rem);
  }

  .card-content {
    padding: 1.25rem;
  }

  .card-label {
    font-size: 0.6rem;
  }

  .copy-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.6rem;
  }

  .prompt-text {
    font-size: 0.8rem;
    line-height: 1.7;
  }

  .metadata-item {
    font-size: 0.7rem;
  }

  .faq-section {
    padding: 3rem 1.5rem;
  }

  .filters .container {
    padding: 0;
  }

  .faq-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

  .faq-question {
    font-size: 0.85rem;
    padding: 1rem 0;
    gap: 1rem;
  }

  .faq-answer p {
    font-size: 0.8rem;
    line-height: 1.7;
  }

  .footer .container {
    margin: 0 0.75rem;
    max-width: calc(100% - 1.5rem);
    padding: 1.5rem 1.25rem;
  }
}

/* Full Screen Button on Card */
.expand-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover .expand-btn {
  opacity: 1;
  transform: translateY(0);
}

.expand-btn:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
}

/* Modal Base */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.modal.show .modal-backdrop {
  opacity: 1;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 1400px;
  height: 85vh;
  background: var(--bg-secondary);
  border: 1px solid var(--grid-line);
  display: flex;
  flex-direction: column;
  z-index: 2001;
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: var(--btn-bg);
  border: 1px solid var(--grid-line);
  color: var(--text-tertiary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2005;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
}

/* Modal Body Layout */
.modal-body {
  display: flex;
  height: 100%;
  width: 100%;
}

.modal-image-pane {
  flex: 1.5;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--grid-line);
  position: relative;
}

.modal-image-pane img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
  filter: blur(0);
  transform: scale(1);
}

.modal-image-pane img.loading {
  opacity: 0.3;
  filter: blur(20px);
  transform: scale(1.05);
}

/* Swiping effect for modal navigation */
.modal-image-pane img.swipe-next {
  animation: modalSwipeNext 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-image-pane img.swipe-prev {
  animation: modalSwipePrev 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modalSwipeNext {
  0% { transform: translateX(40px); opacity: 0.5; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes modalSwipePrev {
  0% { transform: translateX(-40px); opacity: 0.5; }
  100% { transform: translateX(0); opacity: 1; }
}

.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2010;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(4px);
}

.modal-nav-btn:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
}

.modal-nav-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.modal-nav-btn.prev {
  left: 20px;
}

.modal-nav-btn.next {
  right: 20px;
}

@media (max-width: 1024px) {
  .modal-nav-btn {
    width: 40px;
    height: 40px;
  }
  
  .modal-nav-btn.prev {
    left: 10px;
  }
  
  .modal-nav-btn.next {
    right: 10px;
  }
}


.modal-details-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  min-width: 350px;
}

.modal-header {
  padding: 2rem;
  border-bottom: 1px solid var(--grid-line);
}

.modal-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 3rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-secondary-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.modal-secondary-actions > * {
  flex: 1;
  min-width: 0; /* Allow shrinking */
}

.modal-copy-btn, .modal-ai-btn, .modal-action-btn {
  padding: 0.8rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid var(--grid-line);
  background: transparent;
  color: var(--text-primary);
}

.modal-copy-btn {
  width: 100%;
  background: var(--accent-color);
  color: var(--bg-primary);
  border: none;
}

.modal-copy-btn:hover, .modal-ai-btn:hover, .modal-action-btn:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
}

.modal-copy-btn:active, .modal-ai-btn:active, .modal-action-btn:active {
  transform: scale(0.98);
}

.modal-scroll-content {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.modal-prompt-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
}

.modal-metadata-wrapper {
  border-top: 1px solid var(--grid-line);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Modal Responsive */
/* Modal Responsive */
@media (max-width: 1024px) {
  .modal {
    padding: 1rem;
  }
  
  .modal-content {
    height: 90vh;
    height: 90dvh;
  }
  
  .modal-body {
    flex-direction: column;
    overflow: hidden;
  }
  
  .modal-image-pane {
    flex: none;
    height: 60%;
    border-right: none;
    border-bottom: 1px solid var(--grid-line);
  }
  
  .modal-details-pane {
    flex: 1;
    overflow: hidden;
    min-width: 0;
  }

  .modal-header {
    padding: 1.25rem;
  }

  .modal-close {
      top: 1.25rem;
      right: 1.25rem;
  }

  .modal-scroll-content {
    padding: 1.25rem;
  }
}

@media (max-width: 640px) {
  .modal-content {
    height: 95vh;
    height: 95dvh;
  }

  .modal-image-pane {
    height: 55%;
  }

  .modal-label {
    margin-bottom: 2.5rem;
  }
  
  .modal-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .modal-secondary-actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    width: 100%;
  }

  .modal-copy-btn, .modal-ai-btn, .modal-action-btn {
    padding: 0.6rem 0.5rem;
    font-size: 0.7rem;
    min-width: 0;
    gap: 0.4rem;
  }
  
  .modal-prompt-text {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .modal-metadata-wrapper {
    padding-top: 1.5rem;
    gap: 1rem;
  }
}
/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--btn-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--grid-line);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
  transform: translateY(-5px);
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
  }
}

/* Email Modal Specific Styles */
.email-modal-content {
  max-width: 480px;
  height: auto;
  min-height: auto;
  padding: 0;
  background: var(--bg-primary);
  text-align: center;
  border: 1px solid var(--grid-line);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

.email-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  align-items: stretch;
}

.email-modal-header {
  padding: 4rem 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.email-icon-wrapper {
  width: 54px;
  height: 54px;
  background: transparent;
  border: 1px solid var(--grid-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.email-modal.show .email-icon-wrapper {
  border-color: rgba(255, 255, 255, 0.3);
}

.email-modal-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.25rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.email-modal-content-inner {
  padding: 1.5rem 2.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.email-modal-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 340px;
}

.email-form {
  width: 100%;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.email-form input {
  width: 100%;
  padding: 1.1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--grid-line);
  border-radius: 0;
  color: var(--text-primary);
  font-family: "Archivo", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-align: center;
  transition: all 0.2s ease;
}

.email-form input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: var(--bg-tertiary);
}

.email-form input::placeholder {
  color: var(--text-tertiary);
  opacity: 0.6;
}

.email-submit-btn {
  width: 100%;
  padding: 1.1rem;
  min-height: 54px;
  background: var(--accent-color);
  color: var(--bg-primary);
  border: none;
  border-radius: 0;
  font-family: "Archivo", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.email-submit-btn:hover {
  background: var(--text-tertiary);
  color: var(--bg-primary);
}

.email-submit-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.email-submit-btn svg {
  transition: transform 0.3s ease;
}

.email-submit-btn:hover svg:not(.loading-icon) {
  transform: translateX(3px);
}

.email-modal-footer-text {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  line-height: 1.6;
}

.email-error-message {
  font-size: 0.7rem;
  color: #ff4d4d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-top: -0.25rem;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.email-error-message.show {
  opacity: 1;
  height: auto;
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .email-modal-content {
    width: 100%;
    max-width: none;
    height: 100%;
    border: none;
  }
  
  .email-modal-header {
    padding: 6rem 1.5rem 2rem;
  }
  
  .email-modal-content-inner {
    padding: 1.5rem;
  }

  .email-modal-title {
    font-size: 2rem;
  }
}

/* Loading Dots Animation */
.loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.loading-dots span {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  animation: dotsFade 1.4s infinite both;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotsFade {
  0%, 80%, 100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
}
