/* 🌈 Animated gradient background */
body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* align container to top */
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-y: auto; /* allow scrolling if content exceeds viewport */
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Card-style container */
.container {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px 30px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  max-width: 700px;
  width: 100%;
  text-align: center;
  margin-top: 40px; /* spacing from top */
}

h1 {
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: #333;
}

/* Owner rows */
.owner {
  position: relative;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s ease;
  margin-bottom: 10px;
  min-height: 40px; /* keeps row height consistent */
}

.owner:hover {
  background: rgba(0,0,0,0.05);
}

/* Display text and edit inputs occupy same space */
.owner-display,
.owner-edit {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  width: calc(100% - 20px);
}

.owner-display {
  font-size: 1rem;
  color: #333;
}

.owner-edit {
  display: none;
  gap: 8px;
  align-items: center;
}

.owner input[type="text"],
.owner input[type="number"] {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  font-size: 0.95rem;
}

.owner input[type="text"] {
  flex: 1;
}

.owner input[type="number"] {
  width: 80px;
}

/* Show edit inputs on hover */
.owner:hover .owner-display {
  display: none;
}

.owner:hover .owner-edit {
  display: flex;
}

button {
  background: #23a6d5;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.3s ease;
}

button:hover {
  background: #1b87b3;
  transform: scale(1.05);
}

.add-btn {
  margin-top: 10px;
}

/* Chart styling */
.chart-container {
  margin-top: 30px;
}
