:root {
  --primary-color: #f4a460;
  --secondary-color: #8B4513;
  --accent-color: #FFD700;
  --text-color: white;
  --shadow-color: rgba(0, 0, 0, 0.5);
}

@import url('https://fonts.googleapis.com/css2?family=Russo+One&display=swap');

body {
  margin: 0;
  font-family: 'Russo One', sans-serif;
  background: var(--primary-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  letter-spacing: 1px;
}

.screen {
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--primary-color);
  transition: opacity 0.3s ease;
}

.hidden {
  display: none !important;
  opacity: 0;
}

.game-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

#game-canvas {
  background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjUwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxMDAiIGhlaWdodD0iNTAiIGZpbGw9IiNmNGE0NjAiLz48cGF0aCBkPSJNMCAwaDEwMHY1MEgwWiIgc3Ryb2tlPSIjZTA3MDcwIiBzdHJva2Utd2lkdGg9IjIiLz48L3N2Zz4=') repeat;
  display: block;
  margin: 0 auto;
  box-shadow: 0 0 20px var(--shadow-color);
  border-radius: 10px;
  max-width: 100%;
  max-height: calc(100% - 100px);
}

#ui {
  position: relative;
  display: flex;
  gap: 20px;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  border: 2px solid var(--accent-color);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

#ui span {
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  box-shadow: 0 3px 15px var(--shadow-color);
  transition: transform 0.2s ease;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 2px solid var(--accent-color);
  white-space: nowrap;
}

#ui span:hover {
  transform: scale(1.05);
  border-color: #fff;
}

#sound-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

#pause-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 10px;
  z-index: 10;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -60%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

#pause-menu h2 {
  font-size: 48px;
  margin-bottom: 30px;
  color: var(--accent-color);
  text-shadow: 2px 2px 4px var(--shadow-color);
}

#pause-menu button {
  font-size: 18px;
  margin: 10px;
  padding: 10px 20px;
}

button {
  padding: 15px 30px;
  font-size: 20px;
  font-family: 'Russo One', sans-serif;
  background: linear-gradient(135deg, var(--accent-color), #ff9900);
  border: none;
  border-radius: 30px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

button:active {
  transform: scale(0.95) translateY(2px);
}

#countdown {
  font-size: 72px;
  font-weight: bold;
  color: var(--accent-color);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-shadow: 
    0 0 10px var(--shadow-color),
    2px 2px 0 #000;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 20px 40px;
  border-radius: 20px;
}

.countdown-number {
  font-size: 120px;
  animation: pulse 1s infinite;
}

.countdown-instructions {
  font-size: 24px;
  color: white;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 
    2px 2px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
  line-height: 1.4;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

#end-screen h1 {
  font-size: 64px;
  margin-bottom: 30px;
  color: var(--accent-color);
  text-shadow: 
    0 0 20px var(--shadow-color),
    3px 3px 0 #000;
  text-transform: uppercase;
  letter-spacing: 4px;
}

#end-screen p {
  font-size: 32px;
  margin: 15px 0;
  text-shadow: 2px 2px 4px var(--shadow-color);
}

#new-high-score {
  color: var(--accent-color);
  font-size: 36px !important;
  text-transform: uppercase;
  animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.social-share {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-share button {
  margin: 5px;
  padding: 10px 20px;
  font-size: 16px;
  background: #3b5998;
  border: none;
  border-radius: 5px;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.social-share button.twitter {
  background: #1da1f2;
}

.social-share button.vk {
  background: #4a76a8;
}

.social-share button.x {
  background: #000000;
}

.social-share button.telegram {
  background: #0088cc;
}

@media (max-width: 768px) {
  .game-container {
    padding: 10px;
  }

  #ui {
    padding: 8px 16px;
    gap: 10px;
  }
  
  #ui span {
    font-size: 14px;
    padding: 6px 12px;
  }

  #sound-toggle {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}

@media (max-height: 500px) {
  .game-container {
    padding: 5px;
  }

  #ui {
    padding: 6px 12px;
    gap: 8px;
    margin-bottom: 10px;
  }

  #ui span {
    font-size: 12px;
    padding: 4px 8px;
  }

  #sound-toggle {
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
}

#main-menu-character {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  filter: drop-shadow(0 5px 15px var(--shadow-color));
  z-index: 1;
}

#start-screen {
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--primary-color);
  transition: opacity 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

#start-screen h1 {
  font-size: 96px;
  margin: 0 0 40px;
  text-shadow: 
    0 0 25px var(--shadow-color),
    4px 4px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 6px;
  animation: glow 2s ease-in-out infinite;
  line-height: 1.2;
}

@keyframes glow {
  0% { 
    text-shadow: 
      0 0 25px var(--shadow-color),
      4px 4px 0 #000,
      -1px -1px 0 #000,
      1px -1px 0 #000,
      -1px 1px 0 #000,
      1px 1px 0 #000;
  }
  50% { 
    text-shadow: 
      0 0 40px var(--accent-color),
      4px 4px 0 #000,
      -1px -1px 0 #000,
      1px -1px 0 #000,
      -1px 1px 0 #000,
      1px 1px 0 #000;
  }
  100% { 
    text-shadow: 
      0 0 25px var(--shadow-color),
      4px 4px 0 #000,
      -1px -1px 0 #000,
      1px -1px 0 #000,
      -1px 1px 0 #000,
      1px 1px 0 #000;
  }
}

.start-screen-content {
  display: none;
}

#start-screen button {
  margin: 0;
  z-index: 2;
}

#start-screen p {
  margin: 5px 0;
  font-size: 18px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#high-score {
  font-size: 28px !important;
  color: var(--accent-color);
  background: rgba(0, 0, 0, 0.6);
  padding: 15px 30px;
  border-radius: 20px;
  border: 2px solid var(--accent-color);
  box-shadow: 
    0 0 20px rgba(255, 215, 0, 0.3),
    0 0 40px rgba(255, 215, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 20px 0 !important;
  animation: highScoreGlow 2s ease-in-out infinite;
}

@keyframes highScoreGlow {
  0% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3), 0 0 40px rgba(255, 215, 0, 0.1); }
  50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), 0 0 60px rgba(255, 215, 0, 0.2); }
  100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3), 0 0 40px rgba(255, 215, 0, 0.1); }
}

.sound-button {
  background: none;
  border: none;
  font-size: 24px;
  padding: 5px 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

.sound-button.muted {
  opacity: 0.5;
}

@media (max-height: 700px) {
  #start-screen h1 {
    font-size: 72px;
    margin: 0 0 30px;
    letter-spacing: 4px;
  }

  #main-menu-character {
    width: 150px;
    height: 150px;
    bottom: 30px;
  }

  .game-controls {
    margin-bottom: 140px;
    gap: 10px;
  }

  #high-score {
    font-size: 24px !important;
    padding: 12px 24px;
  }

  #start-screen p {
    font-size: 16px;
  }
}

@media (max-height: 500px) {
  #start-screen h1 {
    font-size: 54px;
    margin: 0 0 20px;
    letter-spacing: 3px;
  }

  #main-menu-character {
    width: 120px;
    height: 120px;
    bottom: 20px;
  }

  .game-controls {
    margin-bottom: 100px;
    gap: 8px;
  }

  #high-score {
    font-size: 20px !important;
    padding: 10px 20px;
  }

  #start-screen p {
    font-size: 14px;
  }

  button {
    padding: 12px 24px;
    font-size: 16px;
  }
}

.game-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 180px;
  z-index: 2;
}

.pump-fun-button {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: linear-gradient(135deg, #ff6b6b, #ff4757);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 18px;
  font-weight: bold;
  text-transform: lowercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.pump-fun-button:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@media (max-height: 700px) {
  #start-screen h1 {
    font-size: 72px;
    margin: 0 0 30px;
    letter-spacing: 4px;
  }

  #main-menu-character {
    width: 150px;
    height: 150px;
    bottom: 30px;
  }

  .game-controls {
    margin-bottom: 140px;
    gap: 10px;
  }

  #high-score {
    font-size: 24px !important;
    padding: 12px 24px;
  }

  #start-screen p {
    font-size: 16px;
  }
}

@media (max-height: 500px) {
  #start-screen h1 {
    font-size: 54px;
    margin: 0 0 20px;
    letter-spacing: 3px;
  }

  #main-menu-character {
    width: 120px;
    height: 120px;
    bottom: 20px;
  }

  .game-controls {
    margin-bottom: 100px;
    gap: 8px;
  }

  #high-score {
    font-size: 20px !important;
    padding: 10px 20px;
  }

  #start-screen p {
    font-size: 14px;
  }

  button {
    padding: 12px 24px;
    font-size: 16px;
  }
}

#screen-size-warning {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--accent-color);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 16px;
    z-index: 1000;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@media (max-height: 500px) {
  #start-screen h1 {
    font-size: 54px;
    margin: 0 0 20px;
    letter-spacing: 3px;
  }

  #main-menu-character {
    width: 120px;
    height: 120px;
    bottom: 20px;
  }

  .game-controls {
    margin-bottom: 100px;
    gap: 8px;
  }

  #high-score {
    font-size: 20px !important;
    padding: 10px 20px;
  }

  #start-screen p {
    font-size: 14px;
  }

  button {
    padding: 12px 24px;
    font-size: 16px;
  }
} 
} 