body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #eaeaea;

    /* MULTI-COLOR DARK AURORA BACKGROUND */
    background: linear-gradient(135deg,
        #0d0d1a 0%,
        #1a1a34 20%,
        #2a1f4d 40%,
        #14233c 60%,
        #10324a 80%,
        #271739 100%
    );

    background-size: 600% 600%;
    animation: auroraFlow 28s ease-in-out infinite;

    transition: background 3s ease;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.05;
}

body::after {
    content: "";
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06), transparent 70%);
    pointer-events: none;
    mix-blend-mode: soft-light;
}





.container {
    width: 400px;
    margin: 50px auto;
    text-align: center;
}

input, select {
    padding: 10px;
    margin: 10px;
    width: 80%;
    border-radius: 6px;
    border: none;
}

button {
    padding: 10px 20px;
    background: #4caf50;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    color: white;
}

.habit-box {
    background: #222;
    margin: 8px 0;
    padding: 10px;
    border-radius: 6px;
}



@keyframes rewardPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -80%) scale(0.7);
    }
}


.habit-card {
    background: rgba(20, 20, 35, 0.6);
    border-radius: 18px;
    padding: 18px;
    margin: 15px 0;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
    transition: 0.3s ease;
}

.habit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.65);
}

.habit-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.habit-icon-svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.2));
}

.habit-name {
    font-size: 20px;
    font-weight: 600;
}

.habit-details {
    margin-top: 6px;
    font-size: 16px;
    opacity: 0.8;
}

.streak-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.streak-svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.4));
}

/* Good / Bad color strips */
.habit-good {
    border-left: 5px solid #4ade80;
}

.habit-bad {
    border-left: 5px solid #f87171;
}



.complete-btn:hover {
    transform: scale(1.05);
    background: #005fcc;
}


/* @keyframes bgMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
} */

body {
    font-family: "Poppins", sans-serif;
}


@keyframes auroraFlow {
    0%   { background-position: 0% 50%; }
    20%  { background-position: 50% 0%; }
    40%  { background-position: 100% 50%; }
    60%  { background-position: 50% 100%; }
    80%  { background-position: 0% 50%; }
    100% { background-position: 0% 50%; }
}

.coin-count {
    font-size: 26px;
    font-weight: bold;
    color: #ffd966; /* warm gold */
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
    margin-top: 8px;
}


.coin-icon {
    width: 40px;
    height: 40px;
    animation: coinSpin 1.8s linear infinite;
}

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

@keyframes coinPop {
    0% { transform: scale(1); filter: drop-shadow(0 0 4px gold); }
    40% { transform: scale(1.4); filter: drop-shadow(0 0 20px yellow); }
    100% { transform: scale(1); filter: drop-shadow(0 0 4px gold); }
}


.coin-icon {
    width: 40px;
    height: 40px;
    animation: coinGlow 5s ease-in-out infinite;
    filter: drop-shadow(0 0 6px gold);
}

/* Calm breathing glow effect */
@keyframes coinGlow {
    0% { transform: scale(1); filter: drop-shadow(0 0 4px gold); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 12px gold); }
    100% { transform: scale(1); filter: drop-shadow(0 0 4px gold); }
}


/* .habit-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
} */


/* Button Row */
.habit-actions {
    margin-top: 14px;
    display: flex;
    gap: 12px;
}

/* Base button style (shared for all three) */
.habit-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: 0.25s ease;
    color: white;
}

/* COMPLETE BUTTON (Blue) */
.complete-btn {
    background: #007bff;
}
.complete-btn:hover {
    background: #005fcc;
    transform: scale(1.05);
}

/* EDIT BUTTON (Yellow) */
.edit-btn {
    background: #facc15;
    color: black;
}
.edit-btn:hover {
    background: #eab308;
    transform: scale(1.05);
}

/* DELETE BUTTON (Red) */
.delete-btn {
    background: #ef4444;
}
.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.complete-btn:disabled {
    background: #4b5563;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

/* Floating reward animation container */
.reward-animation {
    position: fixed;
    left: 50%;
    top: 60%;
    transform: translate(-50%, -50%);
    animation: floatUp 1.4s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

/* Flex layout for coin + text */
.reward-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Spinning coin */
.reward-coin {
    width: 32px;
    height: 32px;
    animation: spinCoin 1.4s ease-out;
    filter: drop-shadow(0px 0px 6px rgba(255, 215, 0, 0.8));
}

/* Floating reward text */
.reward-text {
    font-size: 20px;
    font-weight: 700;
    color: #ffd84d; 
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
}

/* Coin spin animation */
@keyframes spinCoin {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.4); }
    100% { transform: rotateY(360deg) scale(1); }
}

/* Float upwards animation */
@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, 20px); }
    100% { opacity: 0; transform: translate(-50%, -80px); }
}


.lb-coins {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.rank-icon svg {
    vertical-align: middle;
}


.leaderboard-btn {
    margin-top: 10px;
    background: #8b5cf6;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 10px;
    color: white;
    transition: 0.3s;
}

.leaderboard-btn:hover {
    transform: scale(1.05);
    background: #7c3aed;
}

.back-btn {
    margin-top: 30px;
    padding: 10px 20px;
    border-radius: 10px;
    background: #374151;
    color: white;
    transition: 0.3s;
}

.back-btn:hover {
    transform: scale(1.06);
    background: #4b5563;
}

.leaderboard-btn svg {
    transition: transform 0.2s ease;
}

.leaderboard-btn:hover svg {
    transform: scale(1.15);
}


/* ❌ Negative reward animation (sad coin drop) */
.negative-reward-animation {
    position: fixed;
    left: 50%;
    top: 58%;
    transform: translate(-50%, -50%);
    animation: negFall 1.4s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

.negative-content {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.15); /* red transparent glass */
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    backdrop-filter: blur(6px);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.negative-coin {
    width: 26px;
    height: 26px;
    opacity: 0.8;
    filter: grayscale(50%) brightness(75%);
}

.negative-text {
    font-size: 20px;
    font-weight: 700;
    color: #ef4444; /* bright red */
    text-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}

/* Falling + fading animation */
@keyframes negFall {
    0% {
        transform: translate(-50%, -60%) scale(1);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    60% {
        transform: translate(-50%, 0%) scale(0.92);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, 30%) scale(0.85);
        opacity: 0;
    }
}

@keyframes negShake {
    0%, 100% { transform: translate(0,0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-1px, 2px); }
}

.negative-coin {
    animation: negShake 0.3s ease;
}


/* ---- Login card base (replace existing card rules) ---- */
.login-card, .login-box {
  width: 380px;
  padding: 34px 32px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 30px rgba(2,6,23,0.6);
  margin: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Logo wrapper keeps logo and small label nicely centered */
.logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

/* logo image sizing */
.arena-logo {
  width: 240px;          /* smaller so it doesn't dominate */
  height: auto;
  display: block;
  margin: 0 auto;
  transition: transform 0.35s ease, filter 0.35s ease;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.45)) drop-shadow(0 0 10px rgba(255,200,0,0.12));
  animation: logoBreath 4s ease-in-out infinite;
}
@keyframes logoBreath {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* small label next to or under logo (if you want to show HA and ARENA) */
.logo-small-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #e6eefc;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 0;
}

/* Big app title */
.login-title {
  font-size: 28px;
  color: #ffffff;
  margin: 10px 0 6px;
  line-height: 1;
}

/* subtitle */
.login-subtitle {
  font-size: 13px;
  color: #aeb9c8;
  margin-bottom: 20px;
}

/* Inputs container & style */
.input-wrapper, .input-group {
  width: 100%;
  margin: 8px 0;
  position: relative;
}

.input-wrapper input, .input-group input {
  width: calc(100% - 0px);
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 15px;
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  display: block;
  box-sizing: border-box;
}

/* space for eye icon inside the input */
.input-wrapper .toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.8;
  z-index: 4;
}

/* login button */
.button-primary {
  width: 100%;
  padding: 12px;
  margin-top: 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg,#6366f1,#7c3aed);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}
.button-primary:hover { transform: translateY(-2px); filter: brightness(1.03); }

/* tiny register line */
.register-line {
  margin-top: 14px;
  font-size: 13px;
  color: #aeb9c8;
}
.register-line .action { color: #9aa8ff; cursor: pointer; font-weight:700; }

/* small adjustments for mobile/smaller screens */
@media (max-width:420px){
  .login-card { width: 92%; padding: 22px; }
  .arena-logo { width: 72px; }
  .login-title { font-size: 24px; }
}

/* ERROR POPUP */
.error-popup {
    position: fixed;
    bottom: -80px; /* Hidden off-screen */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 60, 60, 0.85);
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(255, 50, 50, 0.6);
    opacity: 0;
    transition: all 0.6s ease;
    z-index: 9999;
}

.error-popup.show {
    bottom: 30px;
    opacity: 1;
}

/* Error Icon */
.error-icon {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 4px rgba(255, 60, 60, 0.9));
}
