/* CSS Custom Properties for Theme System */
:root {
  --primary-color: #3a3a3a;
  --primary-hover: #1a1a1a;
  --accent-color: #5a5a5a;
  --transition: all 0.3s ease;
}

/* Dark Theme (Default) */
[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: #141414;
  --text-primary: #ffffff;
  --text-secondary: #808080;
  --border-color: #2a2a2a;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f5f5f5;
  --bg-secondary: #e0e0e0;
  --bg-card: #ffffff;
  --text-primary: #2d2d2d;
  --text-secondary: #666666;
  --border-color: #cccccc;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.header {
  border-bottom: 1px solid var(--border-color);
  padding: 3rem 0;
  position: relative;
  z-index: 10;
}

[data-theme="dark"] .header {
  background-color: #000000;
}

[data-theme="light"] .header {
  background-color: #ffffff;
}

.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  position: relative;
}

.logo-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  line-height: 0;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo {
  height: auto;
  max-height: 200px;
  width: auto;
  max-width: 400px;
  display: block;
}

.tagline {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-style: italic;
  position: absolute;
  left: 100%;
  margin-left: 20px;
  bottom: -5px;
  white-space: nowrap;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  position: fixed !important;
  top: 1rem !important;
  right: 1rem !important;
  z-index: 1000;
}

.theme-toggle:hover {
  transform: scale(1.05);
  background: var(--primary-color);
}

.theme-icon {
  font-size: 1.2rem;
}

/* Navigation Styles */
.navigation {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 1000;
  pointer-events: auto;
}

.nav-tabs {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  min-width: max-content;
  justify-content: center;
  pointer-events: auto;
}

.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-secondary);
  border-radius: 0.5rem;
  transition: var(--transition);
  white-space: nowrap;
  font-weight: 500;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: rgba(58, 58, 58, 0.3);
  user-select: none;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

/* Main Content */
.main {
  padding: 2rem 0;
  background: transparent;
  position: relative;
  z-index: 5;
  min-height: 100vh;
}

.section {
  display: none;
  min-height: 60vh;
  padding: 2rem 0;
  background-image: url('../images/backgrounds/eye.webp');
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: scroll;
  position: relative;
  z-index: 2;
}

.section.active {
  display: block;
}

/* Home landing page - all black */
#home {
  background-image: none;
  background-color: #000000;
  min-height: 100vh;
  padding: 4rem 2rem 2rem 2rem;
}

#home.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.landing-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Landing video player */
.landing-video-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 3rem auto;
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow:
    0 0 20px rgba(255, 0, 0, 0.3),
    0 0 40px rgba(255, 127, 0, 0.3),
    0 0 60px rgba(255, 255, 0, 0.3),
    0 0 80px rgba(0, 255, 0, 0.3),
    0 0 100px rgba(0, 0, 255, 0.3),
    0 0 120px rgba(75, 0, 130, 0.3),
    0 0 140px rgba(148, 0, 211, 0.3);
  animation: rainbow-glow 8s ease-in-out infinite alternate;
}

@keyframes rainbow-glow {
  0% {
    box-shadow:
      0 0 20px rgba(255, 0, 0, 0.4),
      0 0 40px rgba(255, 127, 0, 0.3),
      0 0 60px rgba(255, 255, 0, 0.2);
  }
  33% {
    box-shadow:
      0 0 20px rgba(0, 255, 0, 0.4),
      0 0 40px rgba(0, 255, 255, 0.3),
      0 0 60px rgba(0, 0, 255, 0.2);
  }
  66% {
    box-shadow:
      0 0 20px rgba(75, 0, 130, 0.4),
      0 0 40px rgba(148, 0, 211, 0.3),
      0 0 60px rgba(255, 0, 255, 0.2);
  }
  100% {
    box-shadow:
      0 0 20px rgba(255, 0, 0, 0.4),
      0 0 40px rgba(255, 127, 0, 0.3),
      0 0 60px rgba(255, 255, 0, 0.2);
  }
}

.landing-video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}

/* Custom video controls styling */
.landing-video::-webkit-media-controls-panel {
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
}

.landing-video::-webkit-media-controls-play-button,
.landing-video::-webkit-media-controls-volume-slider {
  filter: brightness(1.2);
}

/* Video loading overlay */
.video-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 10;
}

.video-loading-overlay.hidden {
  opacity: 0;
}

.loading-text {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Landing text */
.landing-text {
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.landing-text p {
  margin-bottom: 1.5rem;
}

.landing-text p:first-child {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
}

/* Landing page buttons */
.landing-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
}

.landing-nav-link,
.landing-external-link {
  text-decoration: none;
}

.landing-button {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  background: #555555;
  color: #ffffff;
  border: 2px solid #666666;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.landing-button:hover {
  background: #666666;
  border-color: #777777;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #7a7a7a;
}

/* Token Page Backgrounds Container */
#token-backgrounds {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  display: none;
  pointer-events: none;
}

#token-backgrounds.show-on-token {
  display: block !important;
}

#token-backgrounds.hidden {
  display: none !important;
}

#token-backgrounds .system-container {
  pointer-events: auto;
}

/* Manifesto Section */
.manifesto {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
  position: relative;
}

.system-container {
  position: absolute;
  top: 500px;
  left: 2rem;
  max-height: 924px;
  z-index: 50;
  cursor: pointer;
  pointer-events: auto;
}

.system-image {
  position: absolute;
  top: 0;
  left: 0;
  max-height: 924px;
  width: auto;
  transition: opacity 3s ease;
}

.system-image-1 {
  opacity: 0.8;
  z-index: 2;
}

.system-image-2 {
  opacity: 0;
  z-index: 1;
}

.system-container:hover .system-image-1 {
  opacity: 0;
}

.system-container:hover .system-image-2 {
  opacity: 0.8;
}

.pig-container {
  position: absolute;
  top: 600px;
  right: -8rem;
  max-height: 1320px;
  z-index: 50;
  cursor: pointer;
  pointer-events: auto;
}

.pig-image {
  position: absolute;
  top: 0;
  right: 0;
  max-height: 1320px;
  width: auto;
  transition: opacity 3s ease;
}

.pig-image-1 {
  opacity: 0.8;
  z-index: 2;
}

.pig-image-2 {
  opacity: 0;
  z-index: 1;
}

.pig-container:hover .pig-image-1 {
  opacity: 0;
}

.pig-container:hover .pig-image-2 {
  opacity: 0.8;
}

.road-image {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 50%;
  max-width: 50vw;
  height: auto;
  z-index: 0;
  opacity: 0.8;
}

.eye-image {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 100vw;
  height: auto;
  z-index: 0;
  opacity: 0.3;
  pointer-events: none;
}

.manifesto-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #6a6a6a, #8a8a8a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 10;
  margin-top: 1rem;
}

.manifesto-content {
  line-height: 1.8;
  font-size: 1.25rem;
  text-align: center;
  position: relative;
  z-index: 10;
  margin-top: 5rem;
}

.manifesto-content p {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.manifesto-content h3 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem 0;
  color: #a0a0a0;
  font-weight: 700;
  text-align: center;
}

.countries-list {
  background: transparent;
  border: none;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem auto;
  box-shadow: none;
  max-width: 600px;
  text-align: left;
  padding-left: 4rem;
}

.countries-list p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  text-align: left;
}

.countries-list strong {
  color: #a0a0a0;
}

.emphasis {
  font-weight: 600;
  font-size: 2.1rem !important;
  color: #a0a0a0 !important;
  text-align: center;
  margin: 2rem 0 !important;
  padding: 1rem;
  background: transparent;
  border-radius: 0.5rem;
  border-left: none;
}

.movement-list {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  list-style: none;
}

.movement-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-primary);
}

.movement-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #a0a0a0;
  font-weight: bold;
}

.conclusion {
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  text-align: center;
  margin: 2rem 0 !important;
  color: #a0a0a0 !important;
}

.final-statement {
  font-size: 1.4rem !important;
  text-align: center;
  margin: 2rem 0 !important;
  color: var(--text-primary) !important;
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 2px solid var(--primary-color);
}

.cta-button {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  display: block;
  margin: 2rem auto 0;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

/* Social Links */
.social-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  display: block;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* White Paper Section */
.section-content {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.download-button {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  margin: 0 auto;
}

.download-button:hover {
  background: #d97706;
  transform: translateY(-1px);
}

/* Meme Maker Section */
.meme-maker-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.upload-area {
  margin: 2rem 0;
}

.file-input {
  display: none;
}

.upload-label {
  display: inline-block;
  padding: 2rem 3rem;
  background: transparent;
  border: 2px dashed var(--border-color);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.upload-label:hover {
  border-color: var(--primary-color);
  background: rgba(58, 58, 58, 0.1);
}

.upload-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.upload-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  display: block;
}

.meme-canvas-container {
  margin: 2rem auto;
  display: none;
  max-width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
}

.meme-canvas-container.active {
  display: block;
}

#meme-canvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 0.5rem;
  cursor: default;
  touch-action: none;
}

.meme-controls {
  margin-top: 2rem;
}

.text-inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.meme-text-input {
  padding: 1rem;
  font-size: 1.1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: var(--transition);
}

.meme-text-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(58, 58, 58, 0.1);
}

.assets-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
}

.assets-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-align: center;
}

.assets-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.asset-tab {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.asset-tab:hover {
  background: var(--primary-color);
  color: white;
}

.asset-tab.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.assets-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.75rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.5rem;
}

.asset-item {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
}

.asset-item:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.asset-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.download-meme-button {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.download-meme-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.download-meme-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Randomizer Section */
.randomizer-inline {
  text-align: center;
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.randomizer-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
}

.randomize-button {
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  margin: 2rem 0;
}

.randomize-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(113, 128, 150, 0.3);
}

.random-result {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-top: 1rem;
  min-height: 100px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.random-result p {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0;
}

/* Random Meme Styles */
.random-meme-container {
  text-align: center;
  display: inline-block;
  max-width: 100%;
}

.random-meme-image {
  border-radius: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.random-meme-image:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.random-meme-info {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: var(--primary-color) !important;
  margin-bottom: 0.5rem !important;
}

.random-meme-hint {
  font-size: 0.9rem !important;
  color: var(--text-secondary) !important;
  font-style: italic !important;
}

/* Meme Gallery */
.meme-stats {
  text-align: center;
  margin-bottom: 2rem;
}

.meme-stats p {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.meme-stats span {
  color: var(--primary-color);
  font-weight: 700;
}

.randomizer-button {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border: none;
  padding: 1rem 3rem;
  border-radius: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.randomizer-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

#random-meme-display {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#random-meme-display img {
  max-width: 90%;
  max-height: 70vh;
  border-radius: 0.75rem;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.meme-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 2rem 0;
  width: 100%;
}

.meme-item {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-secondary);
}

.meme-thumbnail {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

/* Modal Styles */
.meme-modal {
  display: none !important;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem 2rem 2rem;
}

.meme-modal.show {
  display: flex !important;
}

.modal-content {
  position: relative;
  margin: 2rem auto;
  padding: 4rem 2rem 2rem 2rem;
  width: 90%;
  max-width: 1400px;
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal-close {
  position: fixed;
  top: 1rem;
  right: 2rem;
  color: white;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
  transition: var(--transition);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  color: var(--primary-color);
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.8);
}

.modal-image {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  margin: auto;
}

.modal-prev,
.modal-next {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 10001;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-prev {
  left: 50% !important;
  right: auto !important;
  margin-left: -800px !important;
}

.modal-next {
  right: 50% !important;
  left: auto !important;
  margin-right: -800px !important;
}


.modal-prev:hover,
.modal-next:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.05);
}

/* Global Stats Section */
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: -0.5rem 0 2rem 0;
  font-style: italic;
}

#globe-container {
  width: 100%;
  height: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.globe-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.legend {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.legend h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--text-primary);
}

.legend-color {
  width: 30px;
  height: 20px;
  border-radius: 0.25rem;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.selected-country-info {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.selected-country-info h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.selected-country-info p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.5rem 0;
}

.selected-country-info strong {
  color: var(--text-primary);
}

/* Token Information Section */
.token-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Contract Address */
.contract-address {
  margin: 3rem auto;
  text-align: center;
  max-width: 800px;
}

.contract-address h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.ca-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* Token Info Row */
.token-info-row {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  justify-content: center;
  align-items: flex-start;
  margin: 3rem auto;
  max-width: 900px;
}

.token-info-row .contract-address {
  margin: 0;
  flex: 1;
}

.ca-box code {
  font-family: 'Courier New', monospace;
  font-size: 1.8rem;
  color: var(--text-primary);
  white-space: nowrap;
  text-align: center;
}

.copy-ca-button {
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-ca-button:hover {
  transform: scale(1.1);
}

.copy-ca-button:active {
  transform: scale(0.95);
}

.copy-icon {
  width: 32px;
  height: 32px;
  display: block;
}

.token-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.token-stat:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.token-stat h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.token-stat p {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
}

.token-links {
  margin-top: 3rem;
  text-align: center;
}

.token-links-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.token-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 250px;
  margin: 0 auto;
  align-items: flex-start;
}

.token-link-button {
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  background: transparent;
  padding: 0;
  border-radius: 2rem !important;
  overflow: hidden !important;
}

.token-link-button img {
  width: 130%;
  height: auto;
  max-height: 90px;
  object-fit: cover !important;
  display: block;
  border-radius: 2rem !important;
  clip-path: inset(0 round 2rem) !important;
  transform: scale(1.5) translateX(-3%);
  transform-origin: center center;
}

.token-link-button:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Buy Steps */
.buy-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.step:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.step h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.step p {
  color: var(--text-secondary);
}

/* How to Buy Button */
.how-to-buy-button {
  display: inline-block;
  padding: 1.125rem 3rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.how-to-buy-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 0, 0.5);
}

/* How to Buy Content */
.how-to-buy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.buy-step {
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: 1rem;
  padding: 2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.buy-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-color);
}

.buy-step h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.buy-step p {
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.8;
  margin: 0;
}

.buy-step p + p {
  margin-top: 1rem;
}

.buy-tip {
  background: rgba(255, 193, 7, 0.1);
  border-left: 4px solid #ffc107;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-top: 1.5rem !important;
  font-size: 1rem !important;
  color: var(--text-primary) !important;
}

.buy-warning {
  background: rgba(255, 0, 0, 0.1);
  border-left: 4px solid #ff0000;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-top: 1.5rem !important;
  font-size: 1rem !important;
  color: var(--text-primary) !important;
  font-weight: 600;
}

.buy-success {
  background: rgba(0, 255, 0, 0.1);
  border-left: 4px solid #00ff00;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-top: 1.5rem !important;
  font-size: 1rem !important;
  color: var(--text-primary) !important;
}

.contract-box {
  background: var(--bg-secondary);
  border: 2px solid var(--primary-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1.5rem 0;
  text-align: center;
  word-break: break-all;
}

.contract-box code {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.phantom-button {
  display: block;
  margin: 1.5rem auto 0;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #AB9FF2, #8A7DD9);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(171, 159, 242, 0.3);
  width: fit-content;
  text-align: center;
}

.phantom-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(171, 159, 242, 0.5);
  background: linear-gradient(135deg, #8A7DD9, #AB9FF2);
}

.bottom-gif {
  text-align: center;
  margin: 3rem 0 2rem 0;
}

.bottom-gif img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

/* Token Disclaimer */
.token-disclaimer {
  margin-top: 4rem;
  padding: 2rem;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.token-disclaimer h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.token-disclaimer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 0;
}

.token-disclaimer strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Memeory Game */
#memeory-game {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.memeory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
  gap: 1rem;
}

.memeory-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: flex-end;
}

.memeory-size-selector {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.memeory-size-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.memeory-size-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.memeory-size-btn.active {
  background: var(--primary-color);
  color: white;
}

.memeory-back-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.memeory-back-btn:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

.memeory-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  text-align: center;
  flex: 1;
}

.memeory-score {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-secondary);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 2px solid var(--primary-color);
}

.memeory-score span {
  color: var(--primary-color);
  font-size: 1.4rem;
  margin-left: 0.5rem;
}

.memeory-grid {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.memeory-grid[data-grid-size="4"] {
  grid-template-columns: repeat(4, 1fr);
}

.memeory-grid[data-grid-size="6"] {
  grid-template-columns: repeat(6, 1fr);
}

.memeory-grid[data-grid-size="8"] {
  grid-template-columns: repeat(8, 1fr);
}

.memeory-card {
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.memeory-card:hover:not(.flipped):not(.matched) {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.memeory-card.flipped {
  cursor: default;
}

.memeory-card.matched {
  cursor: pointer;
}

.memeory-card.matched:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.memeory-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.memeory-card.flipped .memeory-card-inner,
.memeory-card.matched .memeory-card-inner {
  transform: rotateY(180deg);
}

.memeory-card-front,
.memeory-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.memeory-card-front {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  font-size: 2rem;
  color: white;
  font-weight: 700;
  text-align: center;
}

.memeory-card-back {
  background: #2a2a2a;
  transform: rotateY(180deg);
}

.memeory-card-back img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.memeory-card.matched {
  border-color: #00ff00;
  animation: matchPulse 0.5s ease;
}

@keyframes matchPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Memeory Win Modal */
.memeory-win-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.memeory-win-modal.show {
  display: flex;
}

.memeory-win-content {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  padding: 3rem 4rem;
  border-radius: 1.5rem;
  text-align: center;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
  animation: explode 0.5s ease-out;
  border: 3px solid #ffd700;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes explode {
  0% {
    transform: scale(0.3) rotate(-10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.memeory-win-emoji {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.memeory-win-title {
  font-size: 3rem;
  font-weight: 900;
  color: #ffd700;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.8),
    0 0 20px rgba(255, 215, 0, 0.6),
    0 0 30px rgba(255, 215, 0, 0.4),
    3px 3px 0 rgba(0, 0, 0, 0.5);
  margin: 0 0 1rem 0;
  letter-spacing: 3px;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    text-shadow:
      0 0 10px rgba(255, 215, 0, 0.8),
      0 0 20px rgba(255, 215, 0, 0.6),
      0 0 30px rgba(255, 215, 0, 0.4),
      3px 3px 0 rgba(0, 0, 0, 0.5);
  }
  50% {
    text-shadow:
      0 0 20px rgba(255, 215, 0, 1),
      0 0 30px rgba(255, 215, 0, 0.8),
      0 0 40px rgba(255, 215, 0, 0.6),
      3px 3px 0 rgba(0, 0, 0, 0.5);
  }
}

.memeory-win-message {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin: 0 0 1.5rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.memeory-win-tries {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin: 0 0 2rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.memeory-win-tries span {
  color: #ffd700;
  font-size: 2rem;
  font-weight: 900;
}

.memeory-win-btn {
  background: #ffd700;
  color: #000;
  border: none;
  padding: 1rem 3rem;
  border-radius: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.memeory-win-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
  background: #ffed4e;
}

.memeory-win-btn:active {
  transform: translateY(-1px);
}

/* Mobile Optimizations */

/* Laptop and smaller desktop screens (1440px and below) */
@media (max-width: 1440px) {
  .system-container {
    max-height: 600px;
  }

  .system-image {
    max-height: 600px;
  }

  .pig-container {
    max-height: 900px;
  }

  .pig-image {
    max-height: 900px;
  }
}

/* Tablet and Mobile (768px and below) */
@media (max-width: 768px) {
  /* Header adjustments */
  .header {
    padding: 2rem 0;
  }

  .logo {
    max-height: 150px;
    max-width: 300px;
  }

  .tagline {
    position: static;
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
    white-space: normal;
    text-align: center;
    display: block;
  }

  .logo-container {
    flex-direction: column;
    min-width: auto;
  }

  /* Landing video - responsive */
  #home {
    padding: 1rem;
  }

  .landing-video-container {
    max-width: 100%;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
  }

  .landing-text {
    font-size: 1rem;
    line-height: 1.7;
  }

  .landing-text p:first-child {
    font-size: 1.15rem;
  }

  .landing-buttons {
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .landing-button {
    padding: 0.65rem 1.75rem;
    font-size: 0.95rem;
  }

  .loading-text {
    font-size: 1.5rem;
  }

  /* Navigation - improve scrolling */
  .navigation {
    padding: 0.4rem 0;
    overflow-x: visible;
  }

  .nav-tabs {
    padding: 0 0.5rem;
    gap: 0.2rem;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .nav-link {
    padding: 0.5rem 0.4rem;
    font-size: 0.7rem;
    flex: 1;
    text-align: center;
    min-width: 0;
  }

  /* Section titles */
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  /* Background images - reduce size */
  .system-container {
    max-height: 400px;
    top: 300px;
    left: 0.5rem;
  }

  .system-image {
    max-height: 400px;
  }

  .pig-container {
    max-height: 600px;
    top: 400px;
    right: -4rem;
  }

  .pig-image {
    max-height: 600px;
  }

  /* Manifesto */
  .manifesto-title {
    font-size: 1.8rem;
  }

  .manifesto-content {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .manifesto-content p {
    line-height: 1.6;
  }

  .manifesto-content h3 {
    margin-top: 4rem !important;
    font-size: 1.4rem !important;
  }

  .manifesto-content .emphasis {
    font-size: 1.4rem !important;
  }

  /* White Paper button on mobile */
  .cta-button {
    padding: 1rem 1.75rem;
    font-size: 1rem;
    margin-top: 2rem !important;
  }

  /* Bottom GIF on mobile */
  .bottom-gif {
    margin-top: 3rem !important;
  }

  /* Social links */
  .social-links {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Token page - Contract address */
  .ca-box {
    flex-direction: column;
    gap: 1rem;
  }

  .ca-box code {
    font-size: 1rem;
    word-break: break-all;
    white-space: normal;
  }

  .token-info-row {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  .token-info-row .contract-address {
    width: 100%;
    max-width: 400px;
  }

  .token-info-row .ca-box code {
    font-size: 1.2rem;
  }

  /* Token stats */
  .token-info {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .token-stat {
    padding: 1.25rem;
  }

  /* How to Buy */
  .buy-step {
    padding: 1.5rem;
  }

  .buy-step h3 {
    font-size: 1.3rem;
  }

  .buy-step p {
    font-size: 1rem;
  }

  .phantom-button {
    width: 100%;
    max-width: 300px;
  }

  /* Token links - smaller buttons on mobile */
  .token-link-button img {
    max-height: 60px;
  }

  /* Meme Maker */
  .meme-maker-content {
    padding: 1rem 0;
  }

  .upload-label {
    padding: 1.5rem 2rem;
  }

  .meme-canvas-container {
    padding: 0.5rem;
  }

  .assets-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .assets-gallery {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
    max-height: 150px;
  }

  .text-inputs {
    gap: 0.75rem;
  }

  .meme-text-input {
    padding: 0.75rem;
    font-size: 1rem;
  }

  /* Meme Gallery */
  .meme-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 1rem 0;
  }

  .meme-thumbnail {
    height: 100px;
  }

  /* Modal adjustments */
  .modal-content {
    padding: 3rem 1rem 2rem 1rem;
  }

  .modal-close {
    top: 0.5rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    font-size: 2.5rem;
  }

  .modal-prev,
  .modal-next {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .modal-prev {
    left: 1rem !important;
  }

  .modal-next {
    right: 1rem !important;
  }

  /* Globe */
  #globe-container {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .globe-info {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Bottom GIF */
  .bottom-gif {
    margin: 2rem 0 1rem 0;
  }

  /* Memeory Game */
  .memeory-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .memeory-controls {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .memeory-title {
    font-size: 1.5rem;
  }

  .memeory-score {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }

  .memeory-score span {
    font-size: 1.2rem;
  }

  .memeory-grid {
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .memeory-grid[data-grid-size="4"] {
    grid-template-columns: repeat(3, 1fr);
  }

  .memeory-grid[data-grid-size="6"] {
    grid-template-columns: repeat(4, 1fr);
  }

  .memeory-grid[data-grid-size="8"] {
    grid-template-columns: repeat(5, 1fr);
  }

  .memeory-card-front {
    font-size: 1.5rem;
  }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
  /* Container */
  .container {
    padding: 0 0.75rem;
  }

  /* Header */
  .header {
    padding: 1.5rem 0;
  }

  .logo {
    max-height: 100px;
    max-width: 250px;
  }

  .tagline {
    font-size: 0.9rem;
  }

  /* Landing video - small mobile */
  #home {
    padding: 0.5rem;
  }

  .landing-video-container {
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
  }

  .landing-text {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .landing-text p:first-child {
    font-size: 1.05rem;
  }

  .landing-text p {
    margin-bottom: 1rem;
  }

  .landing-buttons {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .landing-button {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    max-width: 280px;
  }

  .loading-text {
    font-size: 1.25rem;
    letter-spacing: 1px;
  }

  /* Theme toggle */
  .theme-toggle {
    width: 40px;
    height: 40px;
    top: 0.75rem !important;
    right: 0.75rem !important;
  }

  .theme-icon {
    font-size: 1rem;
  }

  /* Navigation */
  .nav-tabs {
    padding: 0 0.25rem;
    gap: 0.15rem;
  }

  .nav-link {
    padding: 0.45rem 0.3rem;
    font-size: 0.65rem;
    flex: 1;
    text-align: center;
    min-width: 0;
  }

  /* Section titles */
  .section-title {
    font-size: 1.5rem;
  }

  /* Hide background images on very small screens */
  .system-container,
  .pig-container {
    display: none;
  }

  /* Manifesto */
  .manifesto-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .manifesto-content {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }

  .manifesto-content p {
    line-height: 1.5;
  }

  .manifesto-content h3 {
    font-size: 1.2rem;
    margin-top: 3rem !important;
  }

  /* White Paper button - smaller on small mobile */
  .cta-button {
    padding: 0.875rem 1.5rem !important;
    font-size: 0.95rem !important;
    margin-top: 1.5rem !important;
  }

  /* Bottom GIF - smaller spacing on small mobile */
  .bottom-gif {
    margin-top: 2rem !important;
  }

  .countries-list {
    padding-left: 2rem;
  }

  /* Other Buttons */
  .download-meme-button,
  .randomize-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .how-to-buy-button {
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
  }

  /* Contract address */
  .ca-box code {
    font-size: 0.75rem;
  }

  .copy-icon {
    width: 24px;
    height: 24px;
  }

  /* Token links */
  .token-link-button img {
    max-height: 50px;
  }

  /* How to Buy */
  .buy-step {
    padding: 1.25rem;
  }

  .buy-step h3 {
    font-size: 1.2rem;
  }

  .buy-step p {
    font-size: 0.95rem;
  }

  .contract-box code {
    font-size: 0.9rem;
  }

  /* Meme Maker */
  .upload-label {
    padding: 1.25rem 1.5rem;
  }

  .upload-icon {
    font-size: 2.5rem;
  }

  .upload-text {
    font-size: 1rem;
  }

  .assets-tabs {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .assets-gallery {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    max-height: 120px;
  }

  .asset-tab {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }

  /* Meme Gallery */
  .meme-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }

  .meme-thumbnail {
    height: 80px;
  }

  /* Modal */
  .modal-image {
    max-width: 95vw;
    max-height: 80vh;
  }

  .modal-prev,
  .modal-next {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
    padding: 0.75rem;
  }

  .modal-prev {
    left: 0.5rem !important;
  }

  .modal-next {
    right: 0.5rem !important;
  }

  .modal-close {
    width: 45px;
    height: 45px;
    font-size: 2rem;
  }

  /* Randomizer */
  .randomizer-inline {
    padding: 1rem;
  }

  .randomizer-button {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
  }

  /* Token disclaimer */
  .token-disclaimer {
    padding: 1.5rem;
    margin-top: 3rem;
  }

  .token-disclaimer h3 {
    font-size: 1.1rem;
  }

  .token-disclaimer p {
    font-size: 0.9rem;
  }

  /* Memeory Game */
  .memeory-header {
    padding: 0.75rem;
  }

  .memeory-title {
    font-size: 1.3rem;
  }

  .memeory-back-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .memeory-size-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }

  .memeory-score {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }

  .memeory-score span {
    font-size: 1.1rem;
  }

  .memeory-grid {
    gap: 0.4rem;
    padding: 0.4rem;
  }

  .memeory-grid[data-grid-size="4"] {
    grid-template-columns: repeat(2, 1fr);
  }

  .memeory-grid[data-grid-size="6"] {
    grid-template-columns: repeat(3, 1fr);
  }

  .memeory-grid[data-grid-size="8"] {
    grid-template-columns: repeat(4, 1fr);
  }

  .memeory-card-front {
    font-size: 1.2rem;
  }

  /* Win Modal */
  .memeory-win-content {
    padding: 2rem 2rem;
    margin: 1rem;
  }

  .memeory-win-emoji {
    font-size: 3.5rem;
  }

  .memeory-win-title {
    font-size: 2rem;
  }

  .memeory-win-message {
    font-size: 1.5rem;
  }

  .memeory-win-tries {
    font-size: 1.2rem;
  }

  .memeory-win-tries span {
    font-size: 1.5rem;
  }

  .memeory-win-btn {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch target sizes */
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .theme-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .asset-item {
    min-height: 60px;
  }

  .asset-tab {
    min-height: 44px;
  }

  /* Disable hover effects on touch devices */
  .system-container:hover .system-image-1,
  .system-container:hover .system-image-2,
  .pig-container:hover .pig-image-1,
  .pig-container:hover .pig-image-2 {
    opacity: 0.8;
  }
}