body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  width: 100vw;
  font-family: Arial, sans-serif;
  overflow: hidden;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: fixed;
}

.header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 6px;
  padding: 0 20px;
  gap: clamp(15px, 4vw, 25px);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 20px);
  min-width: auto;
  flex-shrink: 0;
}

.header-left {
  order: 1;
}

.title {
  order: 2;
  flex: 0 0 auto;
}

.header-right {
  order: 3;
  justify-content: flex-start;
}

.spacer {
  width: clamp(32px, 6vw, 40px);
  height: clamp(32px, 6vw, 40px);
}

.header-button {
  background-color: rgba(255, 255, 255, 0.95);
  border: 2px solid #ddd;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  width: 40px;
  height: 40px;
}

.header-button:hover {
  background-color: #fff;
  border-color: #ff0055;
  transform: scale(1.1);
}

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

.header-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.header-button.audio-button.muted {
  background-color: rgba(255, 0, 85, 0.1);
  border-color: #ff0055;
  color: #ff0055;
}

.header-button.audio-button.muted .header-icon {
  fill: #ff0055;
}
.title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .3em;
  font-weight: 900;
  letter-spacing: .18em;
  user-select: none;
}
.title span {
  font-size: clamp(40px, 10vw, 96px);
  color: #ff0055;
  text-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 6px rgba(0,0,0,.55);
  transform-style: preserve-3d;
  animation: bob 3s ease-in-out infinite, glow 2s ease-in-out infinite alternate;
}

.title-icon {
  width: clamp(32px, 6vw, 40px);
  height: clamp(32px, 6vw, 40px);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.title-icon:hover {
  transform: scale(1.1);
}
.twitter-icon {
  background-image: url('../img/x.png');
}
.pumpfun-icon {
  background-image: url('../img/pumpfun.png');
}

.contract-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  width: 100%;
  max-width: fit-content;
  padding: 0 15px;
}
.contract-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
}
.contract-label {
  font-family: monospace;
  font-size: clamp(10px, 2.5vw, 14px);
  font-weight: bold;
  color: #333;
  flex-shrink: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.contract-input {
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-family: monospace;
  font-size: clamp(10px, 2.5vw, 14px);
  background-color: #f8f8f8;
  cursor: pointer;
  transition: all 0.2s ease;
  width: auto;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.contract-input:hover, .contract-input:focus {
  border-color: #ff0055;
  background-color: #fff;
  outline: none;
}
.copy-button {
  background-color: #ff0055;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: clamp(12px, 2.5vw, 14px);
  font-weight: bold;
  transition: all 0.2s ease;
  text-transform: uppercase;
  flex-shrink: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.copy-button:hover {
  background-color: #e6004a;
  transform: scale(1.05);
}
.copy-button:active {
  transform: scale(0.95);
}

@media (min-width: 769px) {
  .contract-input {
    min-width: 500px;
    max-width: 900px;
    width: 64ch;
  }
}
.copied-message {
  color: #28a745;
  font-size: clamp(12px, 2.5vw, 14px);
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
  margin-top: 35px;
}
.copied-message.show {
  opacity: 1;
}

.about-button-container {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.about-button {
  background: linear-gradient(135deg, #ff0055, #e6004a);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-size: clamp(14px, 2.8vw, 16px);
  font-weight: bold;
  transition: all 0.3s ease;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(255, 0, 85, 0.3);
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.about-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}
.about-button:hover::before {
  left: 100%;
}
.about-button:hover {
  background: linear-gradient(135deg, #e6004a, #cc003d);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 0, 85, 0.4);
}
.about-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(255, 0, 85, 0.3);
}
@keyframes bob { 0%,100%{ transform: rotateX(0) rotateY(0) translateY(0)} 50%{ transform: rotateX(6deg) rotateY(-6deg) translateY(-6px)} }
@keyframes glow { 0%{ text-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 6px #ff0055 } 100%{ text-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 16px #ff77aa } }

.game-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 75vh;
  margin-top: 5vh;
}

.spinner-area {
  position: relative;
  width: 440px;
  height: 440px;
  display: flex;
  justify-content: center;
  align-items: center;
  will-change: transform;
  transform: scale(0.85);
  transform-origin: top center;
}

.egz {
  position: relative;
  z-index: 1;
  max-width: 220px;
  max-height: 320px;
}

.budy {
  position: absolute;
  z-index: 2;
  max-width: 500px;
  max-height: 650px;
  left: 48%;
  top: 43%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: left center;
}

.counter {
  position: fixed;
  bottom: 16vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  font-weight: bold;
  color: #333;
  transition: color .2s ease;
  transform-origin: center center;
  display: inline-block;
  text-align: center;
  z-index: 15;
  width: auto;
  min-width: 80px;
}

@media (max-width: 768px) {
  .spinner-area {
    width: min(90vw, 400px);
    height: min(90vw, 400px);
    transform: scale(1);
  }
  .game-container { 
    margin-top: 8vh; 
    padding: 0 20px;
    gap: 20px;
  }
  .title { 
    margin: 15px 0 10px;
    gap: .2em;
  }
  .title span { font-size: clamp(36px, 10vw, 80px); }
  .pump-button { 
    font-size: 22px; 
    padding: 18px 36px; 
    border-radius: 16px;
    min-height: 60px;
  }
  .counter { 
    font-size: 32px;
    margin: 10px 0;
  }
  .egz {
    max-width: min(180px, 40vw);
    max-height: min(270px, 60vw);
  }
  .budy {
    max-width: min(420px, 95vw);
    max-height: min(560px, 120vw);
  }
}

@media (max-width: 480px) {
  body {
    padding: 5px;
  }
  .header-container {
    padding: 0 10px;
    margin: 8px auto 4px;
    max-width: 100vw;
    width: 100%;
    justify-content: center;
    gap: clamp(8px, 2vw, 12px);
  }
  .header-left, .header-right {
    gap: clamp(4px, 1vw, 6px);
    min-width: auto;
    flex-shrink: 0;
  }
  .title {
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
    gap: .1em;
    order: 2;
  }
  .header-left {
    order: 1;
  }
  .header-right {
    order: 3;
    justify-content: flex-start;
  }
  .title span {
    font-size: clamp(20px, 6vw, 40px);
  }
  .header-button {
    padding: 6px;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }
  .header-icon {
    width: 16px;
    height: 16px;
  }
  .title-icon {
    width: clamp(24px, 4vw, 32px);
    height: clamp(24px, 4vw, 32px);
    flex-shrink: 0;
  }
  .spacer {
    width: clamp(12px, 2vw, 20px);
    height: clamp(12px, 2vw, 20px);
    flex-shrink: 0;
  }
  .contract-section {
    max-width: calc(100vw - 20px);
    padding: 0 10px;
    gap: 8px;
    margin: 10px 0;
  }
  .contract-row {
    gap: 6px;
    max-width: 100%;
  }
  .contract-label {
    font-size: clamp(11px, 2.8vw, 14px);
  }
  .contract-input {
    padding: 8px 10px;
    font-size: clamp(11px, 2.8vw, 14px);
    border-radius: 6px;
  }
  .copy-button {
    padding: 8px 12px;
    font-size: clamp(12px, 3vw, 14px);
    border-radius: 6px;
  }
  .game-container {
    min-height: 100vh;
    margin-top: 0;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 0;
    position: relative;
  }
  .spinner-area {
    width: min(50vw, 200px);
    height: min(50vw, 200px);
    transform: scale(0.5);
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
  }
  .title-container { 
    margin: 8px 0 4px;
    gap: .1em;
    flex-shrink: 0;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 3vw, 20px);
  }
  .title { 
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .1em;
    flex-shrink: 0;
  }
  .title span { 
    font-size: clamp(28px, 10vw, 60px);
  }
  .counter { 
    font-size: 24px;
    margin: 0;
    flex-shrink: 0;
    position: fixed;
    bottom: 15vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: auto;
    min-width: 80px;
    text-align: center;
  }
  .pump-button { 
    font-size: 18px;
    padding: 16px 32px;
    min-height: 56px;
    width: min(200px, 70vw);
    flex-shrink: 0;
    position: fixed !important;
    bottom: 5vh !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10;
  }
  .contract-section {
    position: absolute;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
  }
  .egz {
    max-width: min(200px, 45vw);
    max-height: min(300px, 70vw);
  }
  .budy {
    max-width: min(460px, 100vw);
    max-height: min(610px, 140vw);
    left: 47%;
    top: 38%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: left center;
  }
  .phrase {
    font-size: clamp(20px, 6vw, 40px);
    padding: 4px 8px;
  }
}

@media (max-width: 360px) {
  .header-container {
    padding: 0 4px;
  }
  .header-left, .header-right {
    gap: clamp(1px, 0.5vw, 4px);
    min-width: 40px;
  }
  .header-button {
    padding: 3px;
    width: 24px;
    height: 24px;
  }
  .header-icon {
    width: 12px;
    height: 12px;
  }
  .title-icon {
    width: clamp(16px, 3vw, 24px);
    height: clamp(16px, 3vw, 24px);
  }
  .spacer {
    width: clamp(12px, 2vw, 20px);
    height: clamp(12px, 2vw, 20px);
  }
  .game-container {
    min-height: 100vh;
    margin-top: 0;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 0;
    position: relative;
  }
  .spinner-area {
    width: min(45vw, 180px);
    height: min(45vw, 180px);
    transform: scale(0.45);
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.45);
  }
  .title-container { 
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(8px, 2.5vw, 15px);
  }
  .title { 
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .1em;
    flex-shrink: 0;
  }
  .title span { 
    font-size: clamp(24px, 9vw, 50px);
  }
  .counter { 
    font-size: 20px;
    margin: 0;
    flex-shrink: 0;
    position: fixed;
    bottom: 14vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: auto;
    min-width: 70px;
    text-align: center;
  }
  .pump-button { 
    font-size: 16px;
    padding: 14px 28px;
    min-height: 50px;
    width: min(180px, 65vw);
    flex-shrink: 0;
    position: fixed !important;
    bottom: 4vh !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10;
  }
  .contract-section {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
  }
  .egz {
    max-width: min(180px, 40vw);
    max-height: min(270px, 60vw);
  }
  .budy {
    max-width: min(420px, 95vw);
    max-height: min(560px, 120vw);
    left: 50%;
    top: 25%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: left center;
  }
}

@media (min-width: 1200px) {
  .spinner-area {
    width: 500px;
    height: 500px;
    transform: scale(0.9);
  }
  .title span { 
    font-size: clamp(50px, 8vw, 110px);
  }
  .pump-button { 
    font-size: 24px;
    padding: 20px 40px;
  }
  .counter { 
    font-size: 32px;
  }
  .egz {
    max-width: 250px;
    max-height: 350px;
  }
  .budy {
    max-width: 550px;
    max-height: 700px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .game-container {
    margin-top: 2vh;
    gap: 10px;
  }
  .title {
    margin: 5px 0 2px;
  }
  .title span {
    font-size: clamp(24px, 8vh, 50px);
  }
  .spinner-area {
    width: min(50vh, 300px);
    height: min(50vh, 300px);
    transform: scale(0.8);
  }
  .counter {
    font-size: clamp(20px, 4vh, 28px);
    margin: 5px 0;
  }
  .pump-button {
    font-size: clamp(16px, 3vh, 20px);
    padding: 12px 24px;
    min-height: 45px;
  }
  .egz {
    max-width: min(120px, 25vh);
    max-height: min(180px, 35vh);
  }
  .budy {
    max-width: min(280px, 55vh);
    max-height: min(375px, 70vh);
  }
  .phrase {
    font-size: clamp(20px, 6vh, 40px);
  }
}

@media (max-height: 450px) and (orientation: landscape) {
  .game-container {
    margin-top: 1vh;
    gap: 8px;
  }
  .title {
    margin: 2px 0;
  }
  .title span {
    font-size: clamp(20px, 6vh, 40px);
  }
  .spinner-area {
    width: min(45vh, 250px);
    height: min(45vh, 250px);
    transform: scale(0.7);
  }
  .counter {
    font-size: clamp(16px, 3vh, 24px);
  }
  .pump-button {
    font-size: clamp(14px, 2.5vh, 18px);
    padding: 10px 20px;
    min-height: 40px;
  }
}

.counter.bonus {
  animation: counterBlink .25s linear infinite;
  transform: translateX(-50%) scale(1.4);
  transform-origin: center center;
}
@keyframes counterBlink {
  0% { color: #ff0044; text-shadow: 0 0 6px rgba(255,0,68,.5); }
  25% { color: #ffd400; text-shadow: 0 0 6px rgba(255,212,0,.5); }
  50% { color: #00d1ff; text-shadow: 0 0 6px rgba(0,209,255,.5); }
  75% { color: #8aff00; text-shadow: 0 0 6px rgba(138,255,0,.5); }
  100% { color: #7b61ff; text-shadow: 0 0 6px rgba(123,97,255,.5); }
}

.pump-button {
  position: fixed;
  bottom: 6vh;
  left: 50%;
  transform: translateX(-50%);
  background-color: #111;
  color: white;
  border: none;
  padding: 16px 28px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.2s ease;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  overflow: visible;
  z-index: 10;
}

.pump-button:active { transform: translateX(-50%) translateY(1px) scale(0.98); }
.pump-button.shake { animation: shake .35s ease; }
@keyframes shake {
  0% { transform: translateX(-50%) translate(0,0) rotate(0deg); }
  25% { transform: translateX(-50%) translate(1px,-1px) rotate(-2deg); }
  50% { transform: translateX(-50%) translate(-1px,1px) rotate(2deg); }
  75% { transform: translateX(-50%) translate(1px,0) rotate(-1deg); }
  100% { transform: translateX(-50%) translate(0,0) rotate(0deg); }
}

.splash {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.95;
  z-index: 9998;
}
.splash.animate { animation: splash-pop .6s ease-out forwards; }
@keyframes splash-pop {
  0%   { transform: translate(-50%,-50%) scale(0.2); opacity: 0.95; }
  80%  { opacity: 0.9; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.1); opacity: 0; }
}

.phrase {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  font-weight: 900;
  font-size: clamp(28px, 8vw, 72px);
  color: white;
  text-shadow: 0 0 12px rgba(0,0,0,.5);
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
}
.phrase.show {
  animation: phraseBlink .2s linear infinite, phraseFade 2s ease forwards;
}
@keyframes phraseBlink {
  0% { color: #ff0044; }
  20% { color: #ffd400; }
  40% { color: #00d1ff; }
  60% { color: #8aff00; }
  80% { color: #7b61ff; }
  100% { color: #ff7ab2; }
}
@keyframes phraseFade {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.98); }
}
