/* =========================
   THEME VARIABLES
========================= */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea, #764ba2);
  --bg-primary: #0f0f23;
  --card-bg: rgba(255, 255, 255, 0.06);
  --text-primary: #ffffff;
  --text-secondary: #b4b4b4;
  --accent-primary: #64ffda;
  --border-glass: rgba(255, 255, 255, 0.12);
  --shadow-glass: 0 12px 40px rgba(31, 38, 135, 0.45);
}

body.light {
  --bg-primary: #f5f7fb;
  --card-bg: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --border-glass: #e2e2e2;
  --shadow-glass: 0 8px 22px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

body {
  font-family: Inter, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  transition: 0.35s ease;
}

/* =========================
   NAVBAR
========================= */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-container {
  max-width: 1200px;
  margin: auto;
  padding: 1.1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  gap: .6rem;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-menu {
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
}

.theme-toggle {
  cursor: pointer;
  font-size: 1.25rem;
}

/* =========================
   MAIN
========================= */
.main-content {
  padding-top: 95px
}

.hero-section {
  text-align: center;
  padding: 3.5rem 2rem;
}

.hero-title {
  font-size: 3.1rem;
  letter-spacing: -1px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  margin-top: .5rem;
  font-size: 1.05rem;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 2rem;
  display: grid;
  gap: 2rem;
}

/* =========================
   CARDS
========================= */
.form-section,
.history-section {
  background: var(--card-bg);
  border-radius: 22px;
  border: 1px solid var(--border-glass);
  padding: 2.2rem;
  box-shadow: var(--shadow-glass);
  transition: 0.35s ease;
}

.form-section:hover,
.history-section:hover {
  transform: translateY(-3px);
}

/* =========================
   COMMUNITY UI
========================= */
.form-section h3,
.history-section h3 {
  margin-bottom: 1.3rem;
  display: flex;
  gap: .6rem;
  align-items: center;
  font-size: 1.2rem;
}

.transaction-form input,
.transaction-form textarea {
  width: 100%;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  background: transparent;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  color: var(--text-primary);
  transition: 0.3s;
}

.transaction-form input:focus,
.transaction-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.btn-submit {
  padding: 1rem;
  width: 100%;
  background: var(--primary-gradient);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.form-section::before,
.history-section::before {
  pointer-events: none;
  /* ✅ FIX INPUT NOT WORKING */
}

/* =========================
   POSTS
========================= */
.list {
  list-style: none
}

.list li {
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.02));
  padding: 1.4rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-glass);
  transition: 0.3s;
}

.list li:hover {
  transform: scale(1.01);
}

.list strong {
  font-size: 1.05rem;
}

.list p {
  color: var(--text-secondary);
  margin: .4rem 0 .8rem;
  line-height: 1.5;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: .45rem .9rem;
  border-radius: 20px;
  cursor: pointer;
  margin-right: .4rem;
  transition: 0.3s;
}

.filter-btn:hover {
  background: var(--accent-primary);
  color: #000;
}

.reply-box {
  margin-top: .8rem;
  margin-left: .5rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.reply-box input {
  flex: 1;
  padding: .7rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-primary);
}

/* =========================
   SWEETALERT
========================= */
#swal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 2000;
}

#swal.show {
  opacity: 1;
  pointer-events: auto
}

.swal-box {
  background: var(--card-bg);
  padding: 2.2rem;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  text-align: center;
  animation: pop 0.3s ease;
}

@keyframes pop {
  from {
    transform: scale(0.8);
    opacity: 0
  }

  to {
    transform: scale(1);
    opacity: 1
  }
}

/* =========================
   FOOTER
========================= */
.footer {
  margin-top: 4rem;
  padding: 2.2rem;
  border-top: 1px solid var(--border-glass);
  text-align: center;
  color: var(--text-secondary);
  font-size: .9rem;
}

/* ===== PAGE FADE IN ===== */
body {
  animation: pageFade 0.8s ease;
}

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  animation: glowPulse 4s infinite alternate;
}

@keyframes glowPulse {
  from {
    text-shadow: 0 0 0 rgba(100, 255, 218, 0);
  }

  to {
    text-shadow: 0 0 25px rgba(100, 255, 218, 0.35);
  }
}

.hero-section {
  animation: floatHero 6s ease-in-out infinite;
}

@keyframes floatHero {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.form-section,
.history-section {
  position: relative;
  overflow: hidden;
}

.form-section::before,
.history-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left,
      rgba(100, 255, 218, 0.12),
      transparent 60%);
  opacity: 0;
  transition: 0.4s;
}

.form-section:hover::before,
.history-section:hover::before {
  opacity: 1;
}

.form-section:hover,
.history-section:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 60px rgba(31, 38, 135, 0.55);
}

.transaction-form input:focus,
.transaction-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.btn-submit {
  position: relative;
  overflow: hidden;
}

.btn-submit::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent,
      rgba(255, 255, 255, 0.35),
      transparent);
  transition: 0.6s;
}

.btn-submit:hover::after {
  left: 100%;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.45);
}

.list li {
  animation: postIn 0.6s ease both;
}

@keyframes postIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.list li:hover {
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.02));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.filter-btn:active {
  transform: scale(0.9);
}

.filter-btn:hover {
  box-shadow: 0 6px 18px rgba(100, 255, 218, 0.45);
}

.reply-box>div {
  animation: replySlide 0.4s ease;
}

@keyframes replySlide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }

  60% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
  transition: 0.3s;
}

/* Footer */
.footer {
  background: rgba(var(--footer-bg), 0.9);
}

:root {
  --footer-bg: 15, 15, 35;
}

body.light-mode {
  --footer-bg: 255, 255, 255;
}

.footer {
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.footer-logo i {
  font-size: 2rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-section h4 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1rem;
}

.footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-stats span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
}

/* =========================
   THEME VARIABLES
========================= */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea, #764ba2);

  --bg-primary: #0f0f23;
  --card-bg: rgba(255, 255, 255, 0.06);

  --text-primary: #ffffff;
  --text-secondary: #b4b4b4;

  --accent-primary: #64ffda;

  --border-glass: rgba(255, 255, 255, 0.12);
  --shadow-glass: 0 12px 40px rgba(31, 38, 135, 0.45);

  /* Footer */
  --footer-bg: 15, 15, 35;
  --footer-border: rgba(255, 255, 255, 0.1);
}

/* ✅ LIGHT MODE */
body.light {
  --bg-primary: #f5f7fb;
  --card-bg: #ffffff;

  --text-primary: #1a1a1a;
  --text-secondary: #555;

  --border-glass: #e2e2e2;
  --shadow-glass: 0 8px 22px rgba(0, 0, 0, 0.1);

  /* Footer */
  --footer-bg: 255, 255, 255;
  --footer-border: rgba(0, 0, 0, 0.08);
}

/* =========================
   GLOBAL
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Inter, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background 0.35s ease, color 0.35s ease;
  animation: pageFade 0.8s ease;
}

/* =========================
   FOOTER
========================= */
.footer {
  background: rgba(var(--footer-bg), 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--footer-border);
  padding: 3rem 0 1.2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  padding: 0 2rem;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.footer-logo i {
  font-size: 2rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-section h4 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
  transform: translateX(4px);
}

/* =========================
   FOOTER BOTTOM
========================= */
.footer-bottom {
  border-top: 1px solid var(--footer-border);
  margin-top: 2rem;
  padding-top: 1rem;
}

.footer-bottom .footer-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* =========================
   ANIMATIONS
========================= */
@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================
   CUSTOM CURSOR TRAIL
========================= */

.cursor-trail-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999999;
}

.trail-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #64ffda 0%, #00b4d8 100%);
  box-shadow:
    0 0 15px rgba(100, 255, 218, 0.8),
    0 0 30px rgba(100, 255, 218, 0.4);
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  mix-blend-mode: screen;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.trail-dot:first-child {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #64ffda 0%, #00b4d8 100%);
  box-shadow:
    0 0 20px rgba(100, 255, 218, 0.9),
    0 0 40px rgba(100, 255, 218, 0.6);
  z-index: 2;
}

.cursor-clicking {
  transform: translate(-50%, -50%) scale(1.5);
  background: linear-gradient(135deg, #ff6b9d 0%, #ffcc00 100%) !important;
  box-shadow:
    0 0 25px rgba(255, 107, 157, 0.9),
    0 0 50px rgba(255, 107, 157, 0.6) !important;
}

.cursor-hovering {
  transform: translate(-50%, -50%) scale(1.3);
  background: linear-gradient(135deg, #00b4d8 0%, #64ffda 100%) !important;
}