/* ====================================
   CONSOLIDATED STYLES
   ==================================== */

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  height: fit-content;
  background-image: url('/assets/img/bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #fff;
  font-family: Arial, sans-serif;
}

/* ====================================
   GLASSMORPHISM COMPONENTS
   ==================================== */

.tile {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-strong {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

/* ====================================
   ANIMATED BACKGROUND
   ==================================== */

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.animated-bg::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  top: -250px;
  right: -250px;
  animation: float 20s ease-in-out infinite;
}

.animated-bg::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.12) 0%,
    transparent 70%
  );
  border-radius: 50%;
  bottom: -200px;
  left: -200px;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(50px, -50px) rotate(120deg);
  }

  66% {
    transform: translate(-50px, 50px) rotate(240deg);
  }
}

/* ====================================
   LOGO & BRANDING
   ==================================== */

.logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

a.logo img {
   max-width: 270px;
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.8;
  }
}

/* ====================================
   BUTTONS
   ==================================== */

.deposit-btn {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.deposit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 92, 246, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.deposit-btn:hover::before {
  left: 100%;
}

.deposit-btn:hover {
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
}

.deposit-btn.active {
  background: #120d3f;
  border-color: #8b5cf6;
  transform: scale(1.02);
}

.submit-btn {
  background: #000 !important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.submit-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.submit-btn:hover::after {
  width: 300px;
  height: 300px;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}

/* ====================================
   FORM ELEMENTS
   ==================================== */

input {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.3s ease;
}

input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

select {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23e2e8f0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.5em;
  transition: all 0.3s ease;
}

select:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

select:hover {
  border-color: rgba(139, 92, 246, 0.5);
}

select option {
  background: #1e293b;
  color: #e2e8f0;
  padding: 0.75rem;
}

/* ====================================
   MENU & NAVIGATION
   ==================================== */

.menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.menu-btn:hover {
  border-color: rgba(139, 92, 246, 0.5);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 200px;
  z-index: 50;
}

.dropdown-menu.active {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====================================
   CARDS & TILES
   ==================================== */

.member-card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  animation: slideIn 0.5s ease forwards;
}

.member-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.deposit-card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
}

.deposit-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.total-card {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.15) 0%,
    rgba(59, 130, 246, 0.15) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ====================================
   BADGES
   ==================================== */

.amount-badge {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.2) 0%,
    rgba(59, 130, 246, 0.2) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.week-badge {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ====================================
   ANIMATIONS
   ==================================== */

.scroll-indicator {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.avatar {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  animation: loading-pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loading-pulse {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }

  40% {
    opacity: 1;
  }
}

/* ====================================
   CHARTS
   ==================================== */

.counter {
  font-family: 'Space Mono', monospace;
}

.chart-container {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.circular-chart {
  transform: rotate(-90deg);
  width: 100%;
  height: auto;
}

.circle-bg {
  fill: none;
  stroke: rgba(30, 41, 59, 0.6);
  stroke-width: 3;
}

.circle {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  animation: progress 2s ease-out forwards;
}

@keyframes progress {
  0% {
    stroke-dasharray: 0 100;
  }
}

.circle-week-1 {
  stroke: url(#gradient-week-1);
}

.circle-week-2 {
  stroke: url(#gradient-week-2);
}

.circle-week-3 {
  stroke: url(#gradient-week-3);
}

.circle-week-4 {
  stroke: url(#gradient-week-4);
}

.chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.legend-item {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
}

.legend-item:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateX(3px);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ====================================
   FOOTER NAVIGATION
   ==================================== */

.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-container {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.footer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem 1.25rem;
  border-radius: 16px;
  flex: 1;
  position: relative;
}

.footer-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
}

.footer-item:active {
  background: rgba(255, 255, 255, 0.12);
}

.footer-item i {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.95);
  transition: all 0.3s ease;
}

.footer-item:hover i {
  color: #fff;
  transform: scale(1.1);
}

.footer-item span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.profile-button {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -28px;
  width: 72px;
  height: 72px;
  background: linear-gradient(
    135deg,
    rgba(30, 30, 50, 0.9),
    rgba(20, 20, 35, 0.95)
  );
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.7),
    0 0 0 8px rgba(15, 15, 25, 0.3);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.profile-button:hover {
  transform: translateX(-50%) translateY(-5px) scale(1.08);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.8),
    0 0 0 8px rgba(15, 15, 25, 0.3);
  border-color: rgba(255, 255, 255, 0.25);
}

.profile-button:active {
  transform: translateX(-50%) translateY(-2px) scale(1.02);
}

.profile-button img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-button i {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.95);
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 768px) {
  .chart-container {
    max-width: 220px;
  }
}

@media (max-width: 640px) {
  .mb-30{
    margin-bottom: 120px;
  }
  .footer-nav {
    padding: 0;
  }

  .footer-item {
    padding: 0.4rem 0.8rem;
  }

  .footer-item span {
    font-size: 0.7rem;
  }

  .footer-item i {
    font-size: 1.35rem;
  }

  .profile-button {
    width: 64px;
    height: 64px;
    top: -24px;
  }

  .profile-button img {
    width: 54px;
    height: 54px;
  }

  .profile-button i {
    font-size: 1.75rem;
  }
}

@media (max-width: 380px) {
  .mb-30{
    margin-bottom: 90px;
  }
  .footer-item span {
    font-size: 0.65rem;
  }

  .footer-item i {
    font-size: 1.2rem;
  }

  .profile-button {
    width: 58px;
    height: 58px;
    top: -22px;
  }

  .profile-button img {
    width: 48px;
    height: 48px;
  }
}

.app-toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(92vw, 360px);
  pointer-events: none;
}

.app-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.app-toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.app-toast-exit {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
}

.app-toast-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.app-toast-success .app-toast-icon {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
}

.app-toast-error .app-toast-icon {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

.app-toast-warning .app-toast-icon {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
}

.app-toast-info .app-toast-icon {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.2);
}

.app-toast-message {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #e2e8f0;
}

.app-toast-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 4px;
}

