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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2a2a2a, #3a3a3a, #4a4a4a);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
}

.slide {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content {
  text-align: center;
  z-index: 10;
  animation: fadeInUp 1s ease-out;
}

.greeting {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  color: #fff;
  margin-bottom: 30px;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.name {
  color: #a78bfa;
  font-weight: 900;
  background: linear-gradient(90deg, #a78bfa, #f472b6, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.meme-container {
  margin: 20px auto;
  max-width: 400px;
  min-height: 200px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
  border: 3px solid rgba(120, 115, 160, 0.3);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.meme-container:hover {
  transform: scale(1.03) rotate(-1deg);
}

.loading {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  padding: 40px;
}

.meme {
  width: 100%;
  height: auto;
  display: block;
}

.hidden {
  display: none;
}

#memeContainer {
  cursor: pointer;
}

.deal-ear-svg {
  width: 100%;
  max-width: 300px;
  height: auto;
  transition: filter 0.3s ease;
}

#memeContainer:hover .deal-ear-svg {
  filter: drop-shadow(0 0 16px rgba(250, 204, 21, 0.35));
}

/* Пельмень-кликер */
.pelmen-section {
  margin: 25px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.counter-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: rgba(30, 28, 50, 0.08);
  border: 2px solid rgba(120, 115, 160, 0.35);
  border-radius: 16px;
  padding: 10px 28px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.2);
  transition: transform 0.15s ease;
}

.counter-display.bump {
  animation: counterBump 0.2s ease;
}

@keyframes counterBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.counter-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  letter-spacing: 3px;
  font-weight: 700;
}

.counter-value {
  color: #4ade80;
  font-size: 2.4rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
  transition: color 0.1s;
}

.counter-rub {
  color: #4ade80;
  font-size: 1.6rem;
  font-weight: 700;
  opacity: 0.7;
}

.pelmen-clicker {
  position: relative;
  display: flex;
  justify-content: center;
}

.pelmen-meme {
  cursor: pointer;
  transition: transform 0.15s ease;
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.pelmen-meme:hover {
  transform: scale(1.12);
}

.pelmen-meme:hover .pelmen-svg {
  filter: drop-shadow(0 0 20px rgba(245, 230, 200, 0.6));
}

.pelmen-meme:active {
  transform: scale(0.92);
}

.pelmen-svg {
  width: 160px;
  height: auto;
  transition: filter 0.3s ease;
}

.pelmen-text {
  color: #f5e6c8;
  font-size: 1rem;
  margin-top: 8px;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(245, 230, 200, 0.3);
}

/* Плавающие +1₽ */
.float-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.float-penny {
  position: absolute;
  left: 0;
  color: #4ade80;
  font-size: 1.4rem;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
  animation: floatUp 0.8s ease-out forwards;
  pointer-events: none;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) scale(0.5);
  }
  30% {
    opacity: 1;
    transform: translate(calc(-50% + var(--drift)), -30px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift)), -100px) scale(0.8);
  }
}

.subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  margin-top: 20px;
  animation: fadeInUp 1.5s ease-out;
}

/* === RESET BUTTON === */
.reset-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
  backdrop-filter: blur(10px);
  color: #ef4444;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 50;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 1.2s ease-out;
}

.reset-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.7);
  transform: scale(1.1) rotate(-15deg);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.reset-btn:active {
  transform: scale(0.95);
}

/* === МОДАЛКА === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

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

.modal {
  background: linear-gradient(145deg, #1e1c30, #2a2840);
  border: 2px solid rgba(239, 68, 68, 0.4);
  border-radius: 24px;
  padding: 36px 40px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 60px rgba(239, 68, 68, 0.2);
}

@keyframes modalPop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  animation: shake 0.5s ease 0.3s;
}

@keyframes shake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-10deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-5deg); }
  80% { transform: rotate(5deg); }
}

.modal-title {
  color: #ef4444;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.modal-desc {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin-bottom: 24px;
  line-height: 1.4;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btn {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn:active {
  transform: scale(0.95);
}

.modal-btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.modal-btn-danger:hover {
  box-shadow: 0 4px 25px rgba(239, 68, 68, 0.5);
  transform: scale(1.05);
}

.modal-btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.modal-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* === МОДАЛКА КРЕДИТА === */
.credit-modal {
  border-color: rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 80px rgba(234, 179, 8, 0.3);
}

.credit-icon {
  font-size: 4rem;
  margin-bottom: 10px;
  animation: creditBounce 0.6s ease 0.3s both;
}

@keyframes creditBounce {
  0% { transform: scale(0) rotate(-20deg); }
  50% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

.credit-title {
  color: #facc15;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.credit-amount {
  color: #ef4444;
  font-size: 2.4rem;
  font-weight: 900;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
  margin-bottom: 6px;
  animation: creditPulse 1s ease-in-out infinite;
}

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

.credit-desc {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.credit-fine {
  color: #4ade80;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* === КНОПКА ВЫВОДА === */
.withdraw-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.withdraw-btn:hover {
  background: rgba(74, 222, 128, 0.3);
  border-color: rgba(74, 222, 128, 0.7);
  transform: scale(1.03);
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.2);
}

.withdraw-btn:active {
  transform: scale(0.97);
}

/* === ФОРМА ВЫВОДА === */
.withdraw-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.withdraw-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.withdraw-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.withdraw-input:focus {
  border-color: rgba(74, 222, 128, 0.5);
}

.modal-btn-withdraw {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.modal-btn-withdraw:hover {
  box-shadow: 0 4px 25px rgba(74, 222, 128, 0.5);
  transform: scale(1.05);
}

/* === МЕМ УХО === */
#dealEarContainer {
  margin: 20px auto;
  max-width: 300px;
  min-height: auto;
  cursor: pointer;
}

.deal-ear {
  text-align: center;
  transition: transform 0.2s ease;
  user-select: none;
}

#dealEarContainer:hover .deal-ear {
  transform: scale(1.06) rotate(-2deg);
}

#dealEarContainer:hover .deal-ear-svg {
  filter: drop-shadow(0 0 16px rgba(250, 204, 21, 0.35));
}

.deal-ear:active {
  transform: scale(0.96);
}

.deal-ear-svg {
  width: 100%;
  height: auto;
  transition: filter 0.3s ease;
}

.deal-ear-text {
  color: #facc15;
  font-size: 1rem;
  font-weight: 800;
  margin-top: 8px;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.4);
  letter-spacing: 1px;
}
.shop {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 220px;
  background: rgba(40, 38, 60, 0.85);
  border: 2px solid rgba(120, 115, 160, 0.35);
  border-radius: 20px;
  padding: 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
  z-index: 50;
  animation: fadeInUp 1.2s ease-out;
}

.shop-title {
  color: #e2d9f3;
  font-size: 1rem;
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: 1px;
}

.shop-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 28, 50, 0.06);
  border: 1.5px solid rgba(120, 115, 160, 0.25);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.shop-item:hover {
  background: rgba(100, 95, 130, 0.2);
  border-color: rgba(120, 115, 160, 0.6);
  transform: scale(1.03);
}

.shop-item:active {
  transform: scale(0.97);
}

.shop-item.cant-afford {
  opacity: 0.45;
  cursor: not-allowed;
}

.shop-item.cant-afford:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(167, 139, 250, 0.25);
}

.shop-item.just-bought {
  animation: shopBought 0.4s ease;
}

@keyframes shopBought {
  0% { transform: scale(1); }
  30% { transform: scale(1.08); box-shadow: 0 0 20px rgba(74, 222, 128, 0.5); }
  100% { transform: scale(1); }
}

.item-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  color: #e2d9f3;
  font-size: 0.85rem;
  font-weight: 700;
}

.item-desc {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.65rem;
  margin-top: 2px;
}

.item-level {
  color: #a78bfa;
  font-size: 0.7rem;
  margin-top: 3px;
  font-weight: 600;
}

.item-price {
  color: #4ade80;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
  white-space: nowrap;
  transition: color 0.2s;
}

.shop-item.cant-afford .item-price {
  color: rgba(255, 255, 255, 0.3);
}

.bottom-hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 20;
  animation: bottomPulse 3s ease-in-out infinite;
}

@keyframes bottomPulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.5; }
}

/* Floating background circles */
.bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}

.circle1 {
  width: 300px;
  height: 300px;
  background: #7c3aed;
  top: -100px;
  left: -50px;
  animation-delay: 0s;
}

.circle2 {
  width: 250px;
  height: 250px;
  background: #ec4899;
  bottom: -80px;
  right: -50px;
  animation-delay: 2s;
}

.circle3 {
  width: 200px;
  height: 200px;
  background: #f97316;
  top: 50%;
  left: 60%;
  animation-delay: 4s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.05);
  }
}
