/* MoneyHopper Final – core styles */
:root {
  --bg: #021a15;
  --panel: #06241c;
  --accent: #25d36b;
  --accent-soft: #148c47;
  --text-main: #f5f9e8;
  --text-sub: #c7e5c0;
  --danger: #d94242;
  --black-btn: #111;
  --btn-radius: 999px;
  --candle-active: #37ff7a;
  --candle-inactive: #18492f;
  --dot-active: #7dff98;
  --dot-inactive: #264b34;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: radial-gradient(circle at top, #053527 0, var(--bg) 40%, #000 100%);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  padding: 20px;
}

.app {
  width: 100%;
  max-width: 980px;
  background: linear-gradient(145deg, #041f18, #020f0c);
  border-radius: 18px;
  padding: 18px 20px 24px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.7);
}

header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #7dff98, #1b6b3f);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(8, 56, 32, 0.8);
  flex-shrink: 0;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.logo span {
  font-size: 34px;
}

.header-main {
  flex: 1;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.btn {
  padding: 6px 14px;
  border-radius: var(--btn-radius);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f8fff4;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  transition: transform 0.09s ease, box-shadow 0.09s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.6);
}

.btn-start { background: #0e8b3f; }
.btn-lunch { background: #f7b733; color: #222; }
.btn-break { background: #2271ff; }
.btn-reset { background: var(--black-btn); }
.btn-ot-off { background: #39544a; }
.btn-ot-on { background: #0ea46b; }
.btn-end { background: var(--danger); }

.btn-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

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

.wage-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--text-sub);
}

.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.header-btn {
  background: #041610;
  border: 1px solid #164c30;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

.header-btn.btn-orange {
  background: #1a0f04;
  border-color: #d97706;
  color: #fb923c;
}

.header-btn.btn-orange:hover {
  background: #2d1a08;
  border-color: #f97316;
}

.header-btn:hover {
  background: #0a2418;
  border-color: #1e6d45;
}

.header-btn:active {
  transform: scale(0.98);
}

.wage-input-wrapper {
  background: #041610;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #164c30;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wage-input-wrapper.small {
  padding: 3px 6px;
}

.wage-input-wrapper.small input {
  width: 40px;
}

#wageInput {
  width: 60px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  text-align: right;
  outline: none;
}

#regularHoursInput,
#overtimeRateInput {
  width: 40px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  text-align: right;
  outline: none;
}

.name-row h1 {
  font-size: 26px;
  margin-bottom: 4px;
}

.summary-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.summary-card {
  flex: 0 0 auto;
  min-width: 160px;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #041c15, #06271b);
  box-shadow: inset 0 0 0 1px rgba(32, 94, 57, 0.7);
}

.summary-card.primary {
  box-shadow:
    0 0 18px rgba(71, 255, 160, 0.35),
    inset 0 0 0 1px rgba(71, 255, 160, 0.6);
  background: radial-gradient(circle at top left, rgba(71,255,160,0.15), #031710);
}

.summary-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-sub);
  margin-bottom: 2px;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
}

.time-display {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 5px;
  font-family: 'Courier New', monospace;
}

.month-view-btn {
  margin-top: 6px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 9px;
  color: #4ade80;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.month-view-btn:hover {
  background: rgba(74, 222, 128, 0.2);
  border-color: #4ade80;
}

.summary-sub {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.chart-panel {
  margin-top: 10px;
  background: radial-gradient(circle at top, #072820 0, #03100c 100%);
  border-radius: 14px;
  padding: 12px 14px 10px;
  box-shadow: 0 0 0 1px rgba(15, 64, 45, 0.7);
  position: relative;
  overflow: hidden;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.chart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.chart-frog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  object-fit: contain;
  opacity: 0.3;
  z-index: 1;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.chart-frog:hover {
  opacity: 0.45;
  transform: translate(-50%, -50%) scale(1.02);
}

.chart-title {
  font-size: 14px;
  color: var(--text-main);
  overflow: hidden;
  width: 100%;
}

.news-ticker {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.news-content {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-news 9s linear infinite;
}

@keyframes scroll-news {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.live-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: #0f5f3a;
  color: #a6ffd3;
  box-shadow: 0 0 0 1px rgba(81, 255, 182, 0.4);
  transition: background 0.3s ease;
}

.today-box {
  position: absolute;
  left: 18px;
  top: 56px;
  background: rgba(1, 15, 11, 0.86);
  border-radius: 12px;
  padding: 10px 13px;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(37, 150, 93, 0.6);
  z-index: 4;
}

.today-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-sub);
}

.today-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
}

.today-date {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.chart-inner {
  position: relative;
  margin-top: 40px;
  padding: 16px 16px 10px;
  border-radius: 12px;
  background: radial-gradient(circle at top, rgba(66,133,96,0.18), rgba(3,18,13,0.9));
  box-shadow: inset 0 0 0 1px rgba(29, 88, 58, 0.9);
  height: 230px;
}

.chart-grid {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  bottom: 10px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}

.candle {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.candle::after {
  content: attr(data-hour);
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(125, 255, 152, 0.45);
  text-transform: uppercase;
  pointer-events: none;
}

.candle.active::after {
  color: rgba(125, 255, 152, 0.85);
}

.candle-stick {
  width: 10px;
  border-radius: 999px;
  background: var(--candle-inactive);
  transition: background 0.18s ease, transform 0.18s ease;
  transform-origin: bottom;
  height: 40%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}

.candle.active .candle-stick {
  background: var(--candle-active);
  box-shadow:
    0 0 10px rgba(75, 255, 160, 0.6),
    0 0 0 1px rgba(0,0,0,0.7);
  transform: scaleY(1.15);
}

.candle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot-inactive);
  position: absolute;
  top: 18%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.candle.active .candle-dot {
  background: var(--dot-active);
  box-shadow:
    0 0 9px rgba(125,255,152,0.9),
    0 0 0 1px rgba(0,0,0,0.9);
}

.chart-line {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2af486, transparent);
  opacity: 0.5;
  pointer-events: none;
}

#frogTrailCanvas {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  bottom: 10px;
  width: calc(100% - 32px);
  height: calc(100% - 26px);
  pointer-events: none;
  z-index: 1;
}

.frog {
  position: absolute;
  width: 20px;
  height: 20px;
  background: url('hop-frog.png') center/contain no-repeat;
  border-radius: 4px;
  transform: translate(-50%, -80%);
  box-shadow: 0 0 8px rgba(72, 255, 154, 0.8);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: left 0.3s ease, top 0.3s ease;
}

.frog-bounce {
  animation: frogBounce 1.1s ease-in-out infinite;
}

@keyframes frogBounce {
  0%, 100% {
    transform: translate(-50%, -80%) translateY(0);
  }
  50% {
    transform: translate(-50%, -80%) translateY(-6px);
  }
}

.frog::before,
.frog::after {
  content: none;
}

.date-pill {
  position: absolute;
  right: 20px;
  bottom: 12px;
  width: 60px;
  height: 60px;
  border-radius: 30px;
  background: radial-gradient(circle at top, #083627, #020f0b);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--text-main);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(39, 123, 86, 0.9);
  z-index: 2;
}

.date-pill span.month {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.date-pill span.day {
  font-size: 19px;
  font-weight: 700;
}

.performance-row {
  margin-top: 16px;
}

.performance-row h2 {
  font-size: 14px;
  color: var(--text-sub);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.perf-cards {
  display: flex;
  gap: 10px;
}

.perf-card {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(145deg, #041a14, #020e0b);
  box-shadow: inset 0 0 0 1px rgba(26, 76, 52, 0.9);
}

.perf-label {
  font-size: 11px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
}

.perf-value {
  font-size: 18px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .summary-row {
    flex-direction: column;
    max-width: 260px;
  }
  .today-box {
    left: 14px;
    top: 64px;
  }
  .chart-inner {
    height: 210px;
  }
}

/* Pulsing money counter background */
#moneyCounterBG {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 0;
  pointer-events: none;
  font-size: 72px;
  font-family: 'Courier New', monospace;
  color: #00ff55;
  opacity: 0.12;
  text-shadow: 0 0 20px #00ff99;
  animation: smokePulse 4s infinite ease-out;
}

@keyframes smokePulse {
  0%   { 
    opacity: 0.12; 
    transform: scale(1); 
    color: #00ff55;
    text-shadow: 0 0 20px #00ff99;
    filter: blur(0px);
  }
  5%   { 
    opacity: 1; 
    transform: scale(1.3); 
    color: #00ff55;
    text-shadow: 0 0 80px #00ff55, 0 0 120px #00ff55, 0 0 160px #00ff55;
    filter: blur(0px);
  }
  15%  { 
    opacity: 0.6; 
    transform: scale(1.5); 
    color: #00ff55;
    text-shadow: 0 0 60px #00ff55, 0 0 100px rgba(0, 255, 85, 0.5);
    filter: blur(2px);
  }
  30%  { 
    opacity: 0.2; 
    transform: scale(1.8); 
    color: rgba(0, 255, 85, 0.5);
    text-shadow: 0 0 40px rgba(0, 255, 85, 0.3);
    filter: blur(6px);
  }
  50%  { 
    opacity: 0; 
    transform: scale(2.2); 
    color: rgba(0, 255, 85, 0.2);
    text-shadow: 0 0 20px rgba(0, 255, 85, 0.1);
    filter: blur(12px);
  }
  100% { 
    opacity: 0.12; 
    transform: scale(1); 
    color: #00ff55;
    text-shadow: 0 0 20px #00ff99;
    filter: blur(0px);
  }
}

/* Mini Window - Always on top */
.mini-window {
  position: absolute;
  top: -28px;
  right: 12px;
  background: rgba(4, 22, 16, 0.95);
  border: 2px solid #1e6d45;
  border-radius: 12px;
  padding: 15px 20px;
  z-index: 12;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  min-width: 150px;
  text-align: center;
}

.hidden {
  display: none !important;
}

.app.is-minimized {
  display: none;
}

.mini-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ee7bd;
  margin-bottom: 4px;
}

.mini-close {
  position: absolute;
  top: 5px;
  right: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  line-height: 1;
  transition: color 0.2s;
  z-index: 10000;
  padding: 5px;
  user-select: none;
}

.mini-close:hover {
  color: #ff5555;
}

.mini-amount {
  font-size: 28px;
  font-weight: 700;
  color: #4ade80;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.mini-time {
  margin-top: 4px;
  font-size: 13px;
  color: #d1fae5;
  font-family: 'Courier New', monospace;
}

.mini-status {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a7f3d0;
}

/* Status color overlays for Today card */
#todayCard {
  transition: background-color 0.5s ease;
}

/* Mini floating window */
.mini-window {
  position: absolute;
  top: -28px;
  right: 12px;
  background: rgba(15, 20, 25, 0.95);
  border: 2px solid rgba(74, 222, 128, 0.5);
  border-radius: 12px;
  padding: 20px;
  min-width: 150px;
  text-align: center;
  z-index: 12;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.mini-close {
  position: absolute;
  top: 5px;
  right: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  line-height: 1;
  transition: color 0.2s;
  z-index: 10000;
  padding: 5px;
  user-select: none;
}

.mini-close:hover {
  color: #ff5555;
}

.mini-amount {
  font-size: 28px;
  font-weight: 700;
  color: #4ade80;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

#todayCard.status-active {
  background-color: rgba(74, 222, 128, 0.08) !important;
}

#todayCard.status-lunch {
  background-color: rgba(251, 191, 36, 0.08) !important;
}

#todayCard.status-break {
  background-color: rgba(96, 165, 250, 0.08) !important;
}

#todayCard.status-overtime {
  background-color: rgba(156, 163, 175, 0.08) !important;
}

#todayCard.status-ended {
  background-color: rgba(239, 68, 68, 0.08) !important;
}

.mini-arcade {
  position: fixed;
  inset: 0;
  background: rgba(6, 15, 11, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  padding: 20px;
}

.arcade-card {
  position: relative;
  width: min(640px, 95vw);
  background: radial-gradient(circle at 20% 20%, rgba(55, 255, 122, 0.08), rgba(4, 22, 16, 0.95));
  border: 1px solid #2ee58f;
  border-radius: 16px;
  padding: 20px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(46, 229, 143, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.arcade-title {
  font-size: 20px;
  font-weight: 700;
  color: #8fffd0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.arcade-note {
  margin: 6px 0 12px;
  color: #c8f7dd;
  line-height: 1.4;
  font-size: 14px;
}

.arcade-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
}

.arcade-stats .stat {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(46, 229, 143, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  color: #d1f5e3;
}

.arcade-stats .label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7ae6b8;
}

.arcade-stats .value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.arcade-message {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(46, 229, 143, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  color: #a9f0c5;
  margin-bottom: 10px;
  min-height: 20px;
}

.arcade-area {
  position: relative;
  height: 260px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(55, 255, 122, 0.25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.35);
}

.fly-target {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(126, 255, 202, 0.5);
  background: radial-gradient(circle at 30% 30%, #fff, #b6ffe3, #2be689);
  box-shadow:
    0 0 10px rgba(59, 255, 142, 0.7),
    0 0 25px rgba(35, 214, 121, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #064b2c;
  font-size: 20px;
  transition: transform 0.12s ease, opacity 0.15s ease;
  animation: buzz 1.4s ease-in-out infinite;
}

.fly-target:hover {
  transform: scale(1.05);
}

.fly-target.caught {
  background: #37ff7a;
  transform: scale(0.7);
  opacity: 0.15;
  box-shadow: none;
}

@keyframes buzz {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(3px, -4px) scale(1.03); }
}

.arcade-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.arcade-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.35);
  color: #a1ffcd;
  border: 1px solid rgba(46, 229, 143, 0.35);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.arcade-close:hover {
  background: rgba(55, 255, 122, 0.12);
  transform: scale(1.05);
}

.mini-arcade .btn-start {
  min-width: 160px;
  background: linear-gradient(120deg, #24c26a, #37ff7a);
  box-shadow: 0 10px 25px rgba(55, 255, 122, 0.3);
}

/* Money Rain Celebration */
.money-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
  overflow: hidden;
}

.money-bill {
  position: absolute;
  top: -100px;
  font-size: 40px;
  animation: fall linear forwards;
  opacity: 0.9;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.9;
  }
  100% {
    transform: translateY(calc(100vh + 100px)) rotate(360deg);
    opacity: 0.3;
  }
}
