:root {
  --nyan-gold: #ffd700;
  --nyan-pink: #ff66b2;
  --nyan-purple: #bc00ff;
  --glass: rgba(0, 0, 0, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
}

* {
  margin: 0; padding: 0; box-sizing: border-box;
  user-select: none; -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  background-color: #121212;
  color: #fff;
  overflow: hidden; height: 100vh;
}

#app {
  width: 100vw; height: 100vh;
  background: url('bg.png') center/cover no-repeat;
  position: relative;
}

#app::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
}

.back-link {
  position: absolute; top: 20px; left: 20px; z-index: 100;
  background: var(--nyan-gold); color: #000;
  padding: 8px 15px; border-radius: 20px; font-weight: 900;
  text-decoration: none; box-shadow: 0 4px 15px rgba(255,215,0,0.4);
}

.game-layout {
  display: flex; width: 100%; height: 100%;
  position: relative; z-index: 2;
}

/* Left Area */
.click-area {
  flex: 1.5; display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  position: relative;
}

.stats {
  text-align: center; margin-bottom: 20px;
  background: var(--glass); padding: 20px 40px;
  border-radius: 30px; border: 2px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.nyan-count {
  font-size: 3.5rem; font-weight: 900; color: var(--nyan-gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.nyan-per-sec { font-size: 1.2rem; opacity: 0.8; font-weight: 600; }

.cat-container {
  position: relative; width: 400px; height: 400px;
  display: flex; justify-content: center; align-items: center;
}

#main-cat {
  width: 100%; cursor: pointer;
  transition: transform 0.05s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 50%;
  border: 4px solid var(--nyan-gold);
  box-shadow: 0 0 40px rgba(255,215,0,0.6);
  background-color: #fff;
}

#main-cat:active { transform: scale(0.92); box-shadow: 0 0 60px rgba(255,215,0,0.9); }

/* Right Area (Shop) */
.shop-area {
  flex: 1; background: var(--glass);
  backdrop-filter: blur(20px);
  border-left: 2px solid var(--glass-border);
  display: flex; flex-direction: column;
  overflow-y: auto;
}

.shop-header {
  padding: 30px; font-size: 1.8rem; font-weight: 900;
  text-align: center; border-bottom: 1px solid var(--glass-border);
  color: var(--nyan-pink); background: rgba(255,255,255,0.05);
}

#shop-items { padding: 15px; display: flex; flex-direction: column; gap: 10px; }

.quest-panel {
  margin: 15px 15px 0;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.32);
  background: rgba(0, 0, 0, 0.42);
}

.quest-title {
  color: var(--nyan-gold);
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

#quest-text {
  margin: 8px 0;
  font-weight: 900;
}

.quest-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,0.12);
}

.quest-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--nyan-pink), var(--nyan-gold));
}

#quest-claim {
  width: 100%;
  margin-top: 10px;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  color: #111;
  background: var(--nyan-gold);
  font-weight: 900;
  cursor: pointer;
}

#quest-claim:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shop-item {
  background: rgba(255,255,255,0.05); padding: 15px;
  border-radius: 15px; border: 1px solid var(--glass-border);
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; transition: all 0.2s;
}

.shop-item.available { background: rgba(255,215,0,0.1); border-color: var(--nyan-gold); }
.shop-item.available:hover { background: rgba(255,215,0,0.2); transform: translateX(-5px); }
.shop-item.locked { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.8); }

.item-info { flex: 1; margin-left: 15px; }
.item-info .item-name { font-weight: 900; color: #fff; font-size: 0.95rem; }
.item-info .item-cost { font-size: 0.8rem; color: var(--nyan-gold); font-weight: 800; }
.item-icon { font-size: 1.8rem; }
.item-nps { font-weight: 900; font-size: 0.9rem; color: var(--nyan-pink); }

/* Particles */
.particle {
  position: absolute; pointer-events: none;
  font-weight: 900; font-size: 1.5rem; color: var(--nyan-gold);
  animation: float-up 0.8s ease-out forwards;
}

@keyframes float-up {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-100px) scale(1.5); opacity: 0; }
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake {
  animation: shake 0.1s infinite;
}

.fever {
  animation: shake 0.16s infinite;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .game-layout { flex-direction: column; }
  .click-area { flex: 1; }
  .shop-area { flex: 1; height: 50%; }
  .cat-container { width: 250px; height: 250px; }
  .nyan-count { font-size: 2rem; }
}


/* --- GLOBAL NYANTREPRENEUR OVERRIDES --- */
.back-link, .hub-btn {
  position: absolute !important; top: 15px !important; left: 15px !important; z-index: 9999 !important;
  background: rgba(18, 18, 18, 0.8) !important; color: #ffd700 !important;
  padding: 8px 16px !important; border-radius: 20px !important; font-weight: 800 !important;
  text-decoration: none !important; font-size: 0.8rem !important;
  border: 1px solid rgba(255, 215, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
  transition: all 0.2s ease !important;
}
