@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root{
  --bg-1: #0f1724;
  --bg-2: #0b1b2b;
  --card: rgba(255, 255, 255, 0.04);
  --glass: rgba(255, 255, 255, 0.06);
  --accent: linear-gradient(90deg,#ffd36b 0%, #ffb84d 100%);
  --muted: rgba(255, 255, 255, 0.65);
  --success: #3ecf8e;
  --danger: #ff6b6b;
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* Page background */
html,body{
  height: 100%;
}

body{
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(255, 215, 130, 0.04), transparent 10%),
              linear-gradient(180deg,var(--bg-1), var(--bg-2));
  color:var(--muted);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

/* Main card */
div > div:first-child{
  /* noop: keep specificity low; primary container styling below */
}

/* Container card that wraps whole UI */
body > div{
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 8px 40px rgba(2, 6, 23, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px) saturate(120%);
}

/* Header / total */
#BetragInsgesamt{
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  margin: 0 0 18px 0;
  letter-spacing: 0.6px;
  background: linear-gradient(90deg,#ffd36b, #ffb84d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 18px rgba(255, 184, 77, 0.06);
}

/* Inputs + button row */
input[type="number"], input[type="text"]{
  width: calc(50% - 10px);
  padding: 12px 14px;
  margin-right: 12px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  color: var(--muted);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  font-size: 14px;
}

input[type="number"]::placeholder, input[type="text"]::placeholder{
  color: rgba(255, 255, 255, 0.35);
}

input[type="number"]:focus, input[type="text"]:focus{
  transform: translateY(-2px);
  border-color: rgba(255, 184, 77, 0.5);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(255, 184, 77, 0.04);
}

/* make inputs stack on small screens */
@media (max-width: 520px){
  input[type="number"], input[type="text"]{
    width: 100%;
    margin-right: 0;
    margin-bottom: 12px;
  }
}

/* Add button */
#hinzufügen{
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  background-size: 200% 200%;
  color: #111;
  box-shadow: 0 6px 18px rgba(255, 184, 77, 0.12);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

#hinzufügen:hover{
  transform: translateY(-2px);
  filter: brightness(1.02);
  box-shadow: 0 12px 28px rgba(255, 184, 77, 0.14);
}

#hinzufügen:active{
  transform: translateY(0);
}

/* Error message */
#errorMsg{
  margin-top: 12px;
  min-height: 20px;
  font-size: 13px;
  color: var(--danger);
  opacity: 0.95;
}

/* Entries list */
#entries{
  list-style: none;
  padding: 0;
  margin: 18px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#entries li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.00));
  box-shadow: 0 6px 20px rgba(3, 8, 20, 0.6);
}

#entries li span{
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#entries li span.amount{
  font-weight: 700;
  min-width: 110px;
  text-align: right;
}

/* Delete button */
#entries li button{
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .12s ease;
}

#entries li button:hover{
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.amount-positive{ color: var(--success) !important; }
.amount-negative{ color: var(--danger) !important; }

@media (max-width: 380px){
  #entries li{
    flex-direction: column;
    align-items: flex-start;
  }
  #entries li span.amount{ text-align: left; }
}

@keyframes floatIn{
  from{ opacity: 0; transform: translateY(8px) scale(.995); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}
#entries li{ animation: floatIn .38s cubic-bezier(.2, .9, .2, 1) both; }

.footer-note{
  margin-top: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.36);
  text-align: center;
}