/* ===== DESIGN TOKENS ===== */
:root {
  /* Colors - Primary */
  --color-bg-dark: #0a0a0a;
  --color-bg-panel: rgba(20, 20, 40, 0.85);
  --color-text: #e0e0e0;
  --color-text-muted: #a0a0a0;

  /* Colors - Accent */
  --color-neon-magenta: #ff00ff;
  --color-neon-cyan: #00e5ff;
  --color-neon-green: #39ff14;
  --color-neon-purple: #9370db;
  --color-accent-pink: #ff69b4;
  --color-accent-violet: #8707ff;

  /* Colors - Semantic (Color-Coded Feedback System) */
  --color-success: #32cd32;      /* Green: Gains, success, positive */
  --color-error: #f87171;        /* Red: Losses, danger, negative */
  --color-warning: #fbbf24;      /* Yellow: Warnings, pending */
  --color-info: #00e5ff;         /* Cyan: Neutral info */
  --color-premium: #9370db;      /* Purple: Premium/special */

  /* Section Accent Colors */
  --accent-bank: #ffd700;
  --accent-market: #00e5ff;
  --accent-crypto: #39ff14;
  --accent-agriculture: #4caf50;
  --accent-fighting: #f44336;
  --accent-casino: #ffb300;
  --accent-education: #2196f3;

  /* Sidebar Stat Colors */
  --stat-money: #32cd32;
  --stat-health-low: #f44336;
  --stat-health-high: #32cd32;
  --stat-moves: #00e5ff;
  --stat-attack: #ff69b4;
  --stat-defense: #9370db;
  --stat-food: #ff9800;

  /* Z-Index Scale */
  --z-base: 1;
  --z-sidebar: 5;
  --z-header: 10;
  --z-dropdown: 1000;
  --z-modal: 2000;
  --z-toast: 3000;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* Border Radius */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-round: 50%;

  /* Standardized Breakpoints (3 tiers) */
  /* Mobile: 600px, Tablet: 900px, Desktop: 1200px */
}

/* MAIN LAYOUT */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html, body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: #ffffff; 
  overflow-x: hidden;
  background-image: url("/assets/images/Background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

input, textarea, select{
	color: white;
  border: 2px solid #8707ff;
  border-radius: 10px;
  padding: 5px 10px;
  background: transparent;
	box-shadow: 0 0 20px rgba(255, 0, 255, 0.4);
}

option{
  background-color: #1a1a2e;
  color: #e0e0e0;
  font-weight: 600;
}

input:active, textarea:active, select:active {
  box-shadow: 2px 2px 15px #8707ff inset;
}

th, td{
	padding: 12px;
}

/*------input and submit section-------*/

.input-container {
  position: relative;
}

.input-container input, .form button {
  outline: none;
  border: 2px solid #ffffff;
  margin: 8px 0;
  font-family: monospace;
}

.input-container input {
  background-color: #fff;
  padding: 6px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.input-pwd, .input-mail{
	width: 100%;
}
.input-mail:focus::placeholder,
.input-pwd:focus::placeholder {
  opacity: 0;
  transition: opacity .9s;
}

.submit {
  position: relative;
  display: block;
  padding: 8px;
  background: linear-gradient(90deg, #ff0080, #8000ff);
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  width: 100%;
  text-transform: uppercase;
  border-radius: 5px;
  overflow: hidden;
}

.submit:hover {
  transition: box-shadow 0.2s ease-out, border-radius 0.2s ease-out;
  border-radius: 3.9px;
  box-shadow: 4px 5px 17px -4px rgba(255, 0, 255, 0.8);
  cursor: pointer;
}

.submit::before {
  content: '';
  display: block;
  width: 0px;
  height: 85%;
  position: absolute;
  top: 50%;
  left: 0%;
  opacity: 0;
  background: #ff00ff;
  box-shadow: 0 0 0 4px rgba(255, 0, 255, 0.1),
              0 0 0 8px rgba(255, 0, 255, 0.1),
              0 0 20px rgba(255, 0, 255, 0.1);
  animation: animate 3s linear infinite;
}

/* Benefits List */
.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.benefit-item:hover {
  transform: translateX(5px);
}

.benefit-item i {
  font-size: 1.5em;
  color: #9f00ff;
  margin-top: 5px;
}

.benefit-info h3 {
  margin: 0;
  color: #ff00ff;
  margin-bottom: 5px;
}

.benefit-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
  line-height: 1.4;
}

/* --- Enhanced Mobile Styles for Global --- */
@media (max-width: 900px) {
  html, body {
    font-size: 15px;
    background-size: cover;
    background-position: center;
  }
  .benefits-list {
    gap: 12px;
  }
  .benefit-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    font-size: 1em;
  }
  .benefit-item i {
    font-size: 1.2em;
    margin-top: 0;
  }
}
@media (max-width: 600px) {
  html, body {
    font-size: 13px;
    padding: 0;
    background-size: auto 120vh;
  }
  .benefit-info h3 {
    font-size: 1.05em;
    margin-bottom: 2px;
  }
  .benefit-info p {
    font-size: 0.96em;
    line-height: 1.3;
  }
  .benefit-item {
    padding: 6px;
    border-radius: 7px;
    font-size: 0.96em;
  }
  .input-container input, .form button {
    font-size: 1em;
    padding: 7px 8px;
    border-radius: 7px;
  }
  input, textarea, select {
    font-size: 1em;
    padding: 5px 8px;
    border-radius: 7px;
  }
  th, td {
    padding: 5px 8px;
    font-size: 0.98em;
  }
}
/* --- End Enhanced Mobile Styles for Global --- */

/* ===== GLOBAL HELP BUBBLE ===== */
.welcome-help-content {
    display: none;
    position: absolute;
    top: 50px;
    right: 10px;
    width: 320px;
    padding: 1.25rem;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 200;
    font-size: 0.95rem;
    color: #c0c0e0;
    line-height: 1.6;
}
.welcome-help-content::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 20px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(147, 51, 234, 0.3);
}
.welcome-help-content h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #e0e0ff;
    font-weight: 600;
}
.welcome-help-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #a0a0c0;
    line-height: 1.5;
}
.welcome-help-icon {
    transition: color 0.2s, filter 0.2s;
    z-index: 9;
}
.welcome-help-icon:hover {
    color: #ff00ff !important;
    filter: drop-shadow(0 0 6px rgba(255, 0, 255, 0.5));
}

/* ===== SEMANTIC BUTTON VARIANTS ===== */
.btn-earn {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #fff !important;
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.btn-earn:hover { box-shadow: 0 0 15px rgba(34, 197, 94, 0.5); filter: brightness(1.1); }

.btn-spend {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #fff !important;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.btn-spend:hover { box-shadow: 0 0 15px rgba(245, 158, 11, 0.5); filter: brightness(1.1); }

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-danger:hover { box-shadow: 0 0 15px rgba(239, 68, 68, 0.5); filter: brightness(1.1); }

.btn-neutral {
  background: linear-gradient(135deg, #9370db, #7c3aed) !important;
  color: #fff !important;
  border: 1px solid rgba(147, 112, 219, 0.4);
}
.btn-neutral:hover { box-shadow: 0 0 15px rgba(147, 112, 219, 0.5); filter: brightness(1.1); }

/* ===== SKELETON LOADING STATES ===== */
.skeleton-card {
  background: rgba(20, 20, 40, 0.6);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.skeleton-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(147, 112, 219, 0.08), transparent);
  animation: skeleton-shimmer 1.5s infinite;
}
.skeleton-line {
  height: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  margin-bottom: 10px;
}
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-circle {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
@keyframes skeleton-shimmer {
  to { left: 100%; }
}

/* ===== CARD ELEVATION LEVELS ===== */
.card-elevated {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 8px rgba(147, 112, 219, 0.15);
}
.card-floating {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 16px rgba(147, 112, 219, 0.25);
  transform: translateY(-2px);
}

/* ===== MICRO-ANIMATIONS ===== */
@keyframes btn-ripple {
  0% { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}
.btn-ripple-effect {
  position: relative;
  overflow: hidden;
}
.btn-ripple-effect .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: btn-ripple 0.6s linear;
  pointer-events: none;
}

@keyframes count-up-flash {
  0% { color: inherit; }
  50% { color: var(--color-success); text-shadow: 0 0 8px var(--color-success); }
  100% { color: inherit; }
}
.count-up-anim {
  animation: count-up-flash 0.5s ease-out;
}

@keyframes success-particles {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.5); }
}

/* ===== TOAST SLIDE-IN ANIMATION ===== */
@keyframes toast-slide-in {
  0% { transform: translateX(120%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes toast-slide-out {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}
.toast-animated {
  animation: toast-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.toast-animated.toast-exit {
  animation: toast-slide-out 0.3s ease-in forwards;
}

/* ===== PULSE-GLOW FOR DAILY CLAIM BUTTON ===== */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.3); }
  100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.4); }
}
.daily-claim-img-btn.unclaimed {
  animation: pulse-glow 2s infinite;
  border-color: #ffd700 !important;
}

/* ===== PROGRESS BARS FOR SYSTEMS ===== */
.system-progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin: 6px 0;
}
.system-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease-out;
  position: relative;
}
.system-progress-fill.crypto { background: linear-gradient(90deg, #39ff14, #00e5ff); }
.system-progress-fill.plant { background: linear-gradient(90deg, #4caf50, #8bc34a); }
.system-progress-fill.fighting { background: linear-gradient(90deg, #f44336, #ff9800); }
.system-progress-fill.education { background: linear-gradient(90deg, #2196f3, #00bcd4); }
.system-progress-fill.health { background: linear-gradient(90deg, #f44336, #32cd32); }
.system-progress-fill.moves { background: linear-gradient(90deg, #00e5ff, #9370db); }

/* Mini stat progress bars for welcome page */
.mini-stat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.mini-stat-bar .bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.mini-stat-bar .bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.mini-stat-bar .bar-fill.health { background: linear-gradient(90deg, #f44336, #32cd32); }
.mini-stat-bar .bar-fill.moves { background: linear-gradient(90deg, #00e5ff, #9370db); }
.mini-stat-bar .bar-fill.food { background: linear-gradient(90deg, #ff9800, #ffb300); }

/* ===== DYNAMIC TIME-OF-DAY BACKGROUND ===== */
body.time-morning::before { filter: brightness(1.05) saturate(1.1); }
body.time-afternoon::before { filter: brightness(1.0) saturate(1.0); }
body.time-evening::before { filter: brightness(0.95) saturate(0.9) hue-rotate(-5deg); }
body.time-night::before { filter: brightness(0.85) saturate(0.8) hue-rotate(-10deg); }

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -1;
  pointer-events: none;
}

/* ===== SECTION BACKGROUND OVERLAYS ===== */
.section-overlay-bank .rpg-content::after {
  content: ''; position: absolute; inset: 0; border-radius: 10px;
  background: radial-gradient(ellipse at top, rgba(255, 215, 0, 0.03), transparent 70%);
  pointer-events: none; z-index: 0;
}
.section-overlay-combat .rpg-content::after {
  content: ''; position: absolute; inset: 0; border-radius: 10px;
  background: radial-gradient(ellipse at top, rgba(244, 67, 54, 0.03), transparent 70%);
  pointer-events: none; z-index: 0;
}
.section-overlay-agriculture .rpg-content::after {
  content: ''; position: absolute; inset: 0; border-radius: 10px;
  background: radial-gradient(ellipse at top, rgba(76, 175, 80, 0.03), transparent 70%);
  pointer-events: none; z-index: 0;
}
.section-overlay-casino .rpg-content::after {
  content: ''; position: absolute; inset: 0; border-radius: 10px;
  background: radial-gradient(ellipse at top, rgba(255, 179, 0, 0.03), transparent 70%);
  pointer-events: none; z-index: 0;
}


/* ===== MOBILE FLOATING ACTION BUTTON ===== */
.mobile-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1500;
}
.mobile-fab-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff00ff, #8707ff);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 0, 255, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-fab-toggle:hover { transform: scale(1.1); }
.mobile-fab-toggle.active { transform: rotate(45deg); }
.mobile-fab-menu {
  display: none;
  position: absolute;
  bottom: 66px;
  right: 0;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.mobile-fab-menu.active { display: flex; }
.mobile-fab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 20, 40, 0.95);
  border: 1px solid rgba(147, 112, 219, 0.3);
  border-radius: 25px;
  padding: 8px 16px;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.mobile-fab-item:hover {
  border-color: #ff00ff;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}
.mobile-fab-item i { color: #ff00ff; font-size: 1rem; }
@media (max-width: 600px) {
  .mobile-fab { display: block; }
}

/* ===== LOADING SPINNER FOR BUTTONS ===== */
.btn-loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn-loading .btn-text { display: none; }
.btn-loading .btn-spinner { display: inline-block; }
.btn-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== CONFIRMATION DIALOG ===== */
.confirm-dialog-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.confirm-dialog {
  background: rgba(20, 20, 40, 0.95);
  border: 1px solid rgba(147, 112, 219, 0.4);
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  backdrop-filter: blur(12px);
}
.confirm-dialog h3 { color: #ff80ff; margin-bottom: 12px; }
.confirm-dialog p { color: #c0c0e0; margin-bottom: 20px; font-size: 0.95rem; }
.confirm-dialog-actions {
  display: flex; gap: 12px; justify-content: center;
}
.confirm-dialog-actions button {
  padding: 8px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Global Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(10, 10, 25, 0.8);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(135, 7, 255, 0.6);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 255, 0.7);
}