/* Reset and CSS Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0f111a;
  --bg-panel: rgba(22, 26, 43, 0.85);
  --bg-card: rgba(30, 36, 60, 0.6);
  --bg-input: #1b2035;
  --text-main: #f1f3f9;
  --text-muted: #8b9bb4;
  --border-color: rgba(255, 255, 255, 0.08);
  
  --primary: #7c4dff;
  --primary-glow: rgba(124, 77, 255, 0.35);
  --primary-gradient: linear-gradient(135deg, #7c4dff, #b388ff);
  
  --accent-cyan: #00e5ff;
  --accent-yellow: #ffd600;
  
  --easy-color: #00e676;
  --medium-color: #ffab40;
  --hard-color: #ff5252;
  
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(124, 77, 255, 0.25);
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(124, 77, 255, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 229, 255, 0.08) 0px, transparent 50%);
  padding: 1.5rem;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 1200px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-strike {
  font-size: 2rem;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
  animation: logo-flicker 3s infinite alternate;
}

.logo-area h1 {
  font-weight: 800;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #fff, #a2b4f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.currency-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 214, 0, 0.1);
  border: 1px solid rgba(255, 214, 0, 0.3);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent-yellow);
  box-shadow: 0 0 10px rgba(255, 214, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.currency-display.pop-effect {
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(255, 214, 0, 0.4);
}

.coin-icon {
  font-size: 1.3rem;
  animation: spin-coin 4s infinite linear;
}

/* Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Common Panel Styling */
.panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

.badge {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Add Task Form */
.add-task-form {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.input-row {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 500px) {
  .input-row {
    flex-direction: column;
  }
}

#task-title {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: var(--font-main);
  outline: none;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#task-title:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

#task-difficulty {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem;
  color: var(--text-main);
  font-family: var(--font-main);
  outline: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
  font-family: var(--font-main);
}

.btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.95;
  box-shadow: 0 0 25px rgba(124, 77, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Task List */
.task-list-container {
  flex: 1;
  min-height: 350px;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Custom Scrollbar */
.task-list-container::-webkit-scrollbar,
.shop-items-list::-webkit-scrollbar {
  width: 6px;
}
.task-list-container::-webkit-scrollbar-track,
.shop-items-list::-webkit-scrollbar-track {
  background: transparent;
}
.task-list-container::-webkit-scrollbar-thumb,
.shop-items-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
.task-list-container::-webkit-scrollbar-thumb:hover,
.shop-items-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 250px;
  text-align: center;
  color: var(--text-muted);
  border: 2px dashed rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2rem;
}

.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem;
  transition: transform 0.2s, border-color 0.2s, opacity 0.3s;
  animation: slide-in 0.3s ease-out;
}

.task-item:hover {
  transform: translateX(4px);
  border-color: rgba(255,255,255,0.15);
}

.task-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Custom Checkbox */
.checkbox-container {
  display: block;
  position: relative;
  width: 24px;
  height: 24px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 24px;
  width: 24px;
  background-color: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
  transform: scale(0.95);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.task-content {
  display: flex;
  flex-direction: column;
}

.task-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.task-reward {
  font-size: 0.8rem;
  color: var(--accent-yellow);
  margin-top: 0.15rem;
}

/* Difficulty Indicators */
.task-item.diff-easy { border-left: 4px solid var(--easy-color); }
.task-item.diff-medium { border-left: 4px solid var(--medium-color); }
.task-item.diff-hard { border-left: 4px solid var(--hard-color); }

.task-item.completed {
  opacity: 0.5;
  text-decoration: line-through;
  transform: scale(0.98);
  pointer-events: none;
}

.btn-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.btn-delete:hover {
  color: var(--hard-color);
  background: rgba(255, 82, 82, 0.1);
}

/* Pet Display Card */
.pet-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pet-status-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.status-bar-group {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  align-items: center;
  gap: 0.75rem;
}

.status-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-track {
  background: var(--bg-input);
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease-out;
}

.status-fill.hunger {
  background: linear-gradient(90deg, #ff5e62, #ff9966);
  box-shadow: 0 0 8px rgba(255, 94, 98, 0.4);
}

.status-fill.happiness {
  background: linear-gradient(90deg, #11998e, #38ef7d);
  box-shadow: 0 0 8px rgba(56, 239, 125, 0.4);
}

.status-text {
  font-size: 0.8rem;
  font-weight: 800;
  text-align: right;
}

/* Pet Visual Layout */
.pet-display-wrapper {
  position: relative;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pet-container {
  position: relative;
  cursor: pointer;
}

/* Speech Bubble */
.speech-bubble {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #ffffff;
  color: #2D221C;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  white-space: nowrap;
  opacity: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #ffffff transparent;
  display: block;
  width: 0;
}

.pet-container:hover .speech-bubble,
.pet-container.speak .speech-bubble {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Pet Name Plate */
.pet-name-plate {
  text-align: center;
  margin-top: 1rem;
}

.pet-title {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
}

#pet-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.25rem;
}

/* Shop and Wardrobe Interface */
.store-tabs-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.tab-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 0.25rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.shop-section h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.shop-items-list,
.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Store Cards */
.store-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.store-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.item-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.item-effect {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.item-cost {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-yellow);
  margin-bottom: 0.75rem;
}

.btn-buy, .btn-equip {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 8px;
  padding: 0.4rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-buy:hover, .btn-equip:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.store-card.owned .btn-buy {
  background: rgba(0, 230, 118, 0.15);
  border-color: rgba(0, 230, 118, 0.3);
  color: var(--easy-color);
  cursor: default;
  pointer-events: none;
}

.store-card.owned .btn-buy::before {
  content: '✓ ';
}

/* Wardrobe styles */
.store-card.equipped {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.store-card.equipped .btn-equip {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.3);
  color: var(--accent-cyan);
}

/* SVG dynamic classes */
.hidden {
  display: none !important;
}

/* Animations */

/* Idle breathing */
.pet-container.idle #pet-body {
  animation: idle-breath 3s infinite ease-in-out;
  transform-origin: bottom center;
}

/* Eating animation */
.pet-container.eating #pet-body {
  animation: pet-eat 0.5s 3 ease-in-out;
  transform-origin: bottom center;
}

/* Happy jumping animation */
.pet-container.happy {
  animation: pet-jump 0.8s ease-in-out;
}

.pet-container.happy #pet-body {
  animation: pet-squish-jump 0.8s ease-in-out;
  transform-origin: bottom center;
}

/* Glowing/flickering effects */
@keyframes logo-flicker {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(0, 229, 255, 0.5); }
  50% { opacity: 0.8; text-shadow: 0 0 5px rgba(0, 229, 255, 0.2); }
}

@keyframes spin-coin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

@keyframes slide-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes idle-breath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03, 0.97); }
}

@keyframes pet-eat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(5px) scale(1.05, 0.95); }
}

@keyframes pet-jump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-25px); }
}

@keyframes pet-squish-jump {
  0% { transform: scale(1); }
  25% { transform: scale(1.1, 0.8); }
  50% { transform: scale(0.9, 1.1); }
  75% { transform: scale(1.05, 0.95); }
  100% { transform: scale(1); }
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1b2035;
  border: 1px solid var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  font-weight: 600;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Expired Task Styling */
.task-item.expired {
  opacity: 0.55;
  border-left-color: var(--text-muted) !important;
  background: rgba(30, 20, 20, 0.45);
}

.task-time-limit {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 600;
  transition: color 0.3s;
}

.task-time-limit.expired-text {
  color: var(--hard-color);
}

.task-time-limit.warning {
  color: var(--medium-color);
  animation: pulse-red-alert 1s infinite alternate;
}

@keyframes pulse-red-alert {
  0% { opacity: 0.6; }
  100% { opacity: 1; text-shadow: 0 0 4px var(--medium-color); }
}

/* Auth and Pet Selection Overlays */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 12, 22, 0.95);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-card, .pet-select-card {
  background: rgba(22, 26, 43, 0.9);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pet-select-card {
  max-width: 600px;
}

.pet-select-card h2, .auth-logo h2 {
  font-weight: 800;
  font-size: 1.8rem;
  text-align: center;
}

.pet-select-card p {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.95rem;
  margin-top: -0.75rem;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  padding: 0.3rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-weight: 600;
  padding: 0.6rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.auth-tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.input-group input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: white;
  font-family: var(--font-main);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  outline: none;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

/* Pet Choice Items Grid */
.pet-choices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 500px) {
  .pet-choices-grid {
    grid-template-columns: 1fr;
  }
}

.pet-choice-item {
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pet-choice-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.pet-choice-item.selected {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  background: rgba(124, 77, 255, 0.1);
}

.pet-choice-preview {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.pet-choice-item h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.pet-choice-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Pet SVG visibility styles */
.pet-svg-element {
  display: block;
}

.pet-svg-element.hidden {
  display: none !important;
}

/* Body group dynamic animations */
.pet-container.idle #pet-body-hamster,
.pet-container.idle #pet-body-slime,
.pet-container.idle #pet-body-dragon {
  animation: idle-breath 3s infinite ease-in-out;
  transform-origin: bottom center;
}

.pet-container.eating #pet-body-hamster,
.pet-container.eating #pet-body-slime,
.pet-container.eating #pet-body-dragon {
  animation: pet-eat 0.5s 3 ease-in-out;
  transform-origin: bottom center;
}

.pet-container.happy #pet-body-hamster,
.pet-container.happy #pet-body-slime,
.pet-container.happy #pet-body-dragon {
  animation: pet-squish-jump 0.8s ease-in-out;
  transform-origin: bottom center;
}

/* Backflip animation */
.pet-container.backflip svg:not(.hidden) {
  animation: pet-backflip 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
}

@keyframes pet-backflip {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Chat Input Styling focus state */
#pet-chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

/* EXP status bar color */
.status-fill.exp {
  background: linear-gradient(90deg, #ffd600, #ffa000);
  box-shadow: 0 0 8px rgba(255, 214, 0, 0.4);
}

/* Sick pet greenish filter */
.pet-container.sick svg:not(.hidden) .pet-body-group {
  filter: sepia(0.2) hue-rotate(85deg) saturate(0.8);
}

/* Real-time Night Theme background overlays */
body.night {
  background-color: #060814;
  background-image: 
    radial-gradient(at 0% 0%, rgba(20, 24, 70, 0.2) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(50, 10, 80, 0.15) 0px, transparent 50%);
}

body.night::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 150px 180px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 280px 100px, #dddddd, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 450px 320px, #ffffff, rgba(0,0,0,0));
  background-size: 600px 600px;
  opacity: 0.3;
  pointer-events: none;
  z-index: -1;
}

/* Floating sleeping Zzz animation */
.sleep-zzz {
  position: absolute;
  top: 15px;
  right: 35px;
  font-size: 1.6rem;
  color: var(--accent-cyan);
  animation: zzz-float 2.8s infinite linear;
  opacity: 0;
  pointer-events: none;
  font-weight: 800;
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}

@keyframes zzz-float {
  0% { transform: translateY(12px) scale(0.6); opacity: 0; }
  25% { opacity: 0.75; }
  100% { transform: translateY(-35px) scale(1.1); opacity: 0; }
}

/* Global button disabled visual styling */
button:disabled, .btn-primary:disabled {
  background: #23283b !important;
  color: #5d6b82 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  box-shadow: none !important;
}
