* {
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  background-color: #f4f6fb;
  text-align: center;
  padding: 40px;
}

h1 {
  color: #333;
}

input {
  padding: 10px;
  margin: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

button {
  padding: 10px 18px;
  margin: 10px;
  border: none;
  border-radius: 6px;
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background-color: #45a049;
}

#result {
  margin-top: 20px;
  font-size: 18px;
  font-weight: bold;
}

.container {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 400px;
  margin: auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
body {
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  display: flex;
  justify-content: center;
  padding: 30px;
}

.container {
  width: 350px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

input, select, button {
  width: 100%;
  max-width: 300px;
  padding: 10px;
  margin-top: 8px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

button {
  background: #4f46e5;
  color: white;
  border: none;
  cursor: pointer;
}

button:hover {
  background: #4338ca;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  background: #f9fafb;
  margin-top: 8px;
  padding: 10px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

li button {
  width: auto;
  background: #ef4444;
  padding: 5px 10px;
}

li button:hover {
  background: #dc2626;
}
h1 {
  text-align: center;
  margin-bottom: 20px;
}

h3 {
  margin-top: 20px;
  color: #374151;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}
#totalAmount {
  margin-top: 15px;
  text-align: right;
  font-weight: bold;
  color: #4f46e5;
}
#expenseList li {
  background: white;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.2s;
}

#expenseList button {
  background: #ff4d4d;
  border: none;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

#expenseList button:hover {
  background: #e60000;
}
#balanceList li {
  background: #f9f9f9;
  padding: 12px;
  margin: 10px 0;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 600px) {

  body {
    padding: 10px;
    font-size: 16px;
  }

  h1, h2, h3 {
    text-align: center;
  }

  input, button, select {
    width: 100%;
    margin: 8px 0;
    padding: 10px;
    font-size: 16px;
  }

  ul {
    padding: 0;
  }

  li {
    flex-direction: column;
    align-items: flex-start;
  }

  li button {
    margin-top: 5px;
    width: 100%;
  }

}
button {
  cursor: pointer;
}
button {
  margin-top: 15px;
}
button {
  margin-top: 15px;
  cursor: pointer;
}
button[onclick="clearAllData()"] {
  background-color: red;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
}
button[onclick="clearAllData()"]:hover {
  background-color: darkred;
}
.delete-btn {
  background-color: red;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 5px;
}

.delete-btn:hover {
  background-color: darkred;
}
.group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f5f5f5;
  padding: 10px;
  margin: 8px 0;
  border-radius: 8px;
}

.group-item:hover {
  background-color: #e0e0e0;
}

.group-name {
  cursor: pointer;
  font-weight: bold;
}

button {
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
}

button[onclick="addMember()"],
button[onclick="splitBill()"],
button[onclick="showAddExpense()"] {
  background-color: #4CAF50;
  color: white;
}

button[onclick="addMember()"]:hover,
button[onclick="splitBill()"]:hover,
button[onclick="showAddExpense()"]:hover {
  background-color: #3e8e41;
}
#expenseList li {
  background-color: #f9f9f9;
  padding: 10px;
  margin: 8px 0;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#balanceList li {
  background-color: #f1f1f1;
  padding: 10px;
  margin: 8px 0;
  border-radius: 8px;
}
h1 {
  text-align: center;
  color: #333;
}

h2, h3 {
  color: #444;
}
.group-item,
#expenseList li,
#balanceList li {
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
#totalCard {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  padding: 18px;
  margin: 15px 0;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}

#totalCard p {
  margin: 0;
  color: #777;
  font-size: 14px;
}

#totalCard h2 {
  margin: 5px 0 0;
  color: #333;
}
body {
  font-family: Arial, sans-serif;
  background-color: #f4f6f8;
  margin: 0;
  padding: 10px;
}

.screen {
  max-width: 350px;   
  margin: auto;
}

input, select {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

button {
  margin-top: 10px;
}
.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  padding: 8px 10px;
  margin: 6px auto;    
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);

  width: 100%;         
  max-width: 300px;   
}

.member-name {
  font-weight: 500;
}
.member-item:hover {
  background-color: #f5f5f5;
}
.main-btn {
  width: 100%;
}
.member-item {
  gap: 10px;
}

.member-item button {
  width: auto;   
  padding: 4px 8px;
  font-size: 12px;
}
.member-item {
  flex-direction: row !important;     
  align-items: center !important;
  padding: 6px 10px;                
  margin: 4px 0;                     
}

.member-item button {
  width: auto !important;            
  padding: 4px 8px;
  font-size: 12px;
}
#memberList {
  width: 100%;
  max-width: 300px;   
  margin: auto;
}
.member-item {
  width: 100%;
  max-width: 300px;   
  margin: 6px auto;   
}
#memberList {
  display: flex;
  flex-direction: column;
  align-items: center;
}
button[onclick="settleAll()"] {
  background-color: red;
}

button[onclick="settleAll()"]:hover {
  background-color: darkred;
}
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 300px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  text-align: center;
}

.popup-content h3 {
  margin-bottom: 15px;
}

.popup-content input,
.popup-content select {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.popup-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.popup-buttons button {
  width: 48%;
}

.cancel-btn {
  background-color: #ef4444;
}

.cancel-btn:hover {
  background-color: #dc2626;
}
#expenseList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#expenseList li div {
  display: flex;
  gap: 4px;             
  align-items: center;  
}
#expenseList button {
  padding: 5px 10px;
  font-size: 12px;
}
#expenseList button {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 5px;
}

#expenseList button:first-child {
  background-color: #22c55e; 
  color: white;
}

#expenseList button:first-child:hover {
  background-color: #16a34a;
}

#expenseList button:last-child {
  background-color: #ef4444; 
  color: white;
}

#expenseList button:last-child:hover {
  background-color: #dc2626;
}
#expenseList button {
  padding: 4px;
  font-size: 14px;
  border-radius: 5px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#expenseList button:hover {
  transform: scale(1.1);
}
#memberList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#memberList li div {
  display: flex;
  gap: 2px;
}
#memberList button:first-child {
  background-color: #22c55e; 
  color: white;
}

#memberList button:first-child:hover {
  background-color: #16a34a;
}


#expensesScreen,
#balancesScreen {
  text-align: center;
  width: 300px;
}
#expensesScreen,
#balancesScreen {
  width: 300px;
  margin: auto;
}
.inner-box {
  max-width: 300px;  
  margin: 0 auto;    
  width: 100%;
}
#expensesScreen button,
#balancesScreen button {
  max-width: 100%;
}
#expenseList li {
  align-items: center;   
}
#expenseList li span {
  flex: 1;  
}
#balancesScreen button {
  display: block;
  margin: 10px auto;
}
#expensesScreen button {
  display: block;
  margin: 10px auto;
}
#expenseList li:hover {
  transform: scale(1.01);
}
#expenseList button {
  border-radius: 6px;
}
#totalCard p {
  margin: 0;
  font-size: 14px;
  opacity: 1;         
  color: #e0e7ff;    
}

#totalCard h2 {
  margin: 5px 0 0;
  font-size: 24px;
  font-weight: bold;
}
#totalCard h2 {
  letter-spacing: 1px;
}
.screen {
  padding: 20px;
}
h2 {
  margin-bottom: 15px;
}

#totalCard {
  margin-bottom: 20px;
}

ul {
  margin-bottom: 20px;
}
button {
  margin-top: 12px;
}
#expenseList li {
  margin-bottom: 12px;
}
#expenseList button {
  width: 30px;
  height: 30px;
  font-size: 14px;
  border-radius: 50%;  
  display: flex;
  align-items: center;
  justify-content: center;
}
button:hover {
  transform: translateY(-1px);
}

#expenseList button:hover {
  transform: scale(1.1);
}
.screen {
  transition: all 0.3s ease;
}
body {
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
}
h1 {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 20px;
}
#totalCard,
#expenseList li,
#balanceList li {
  transition: 0.2s;
}

#balanceList li:hover {
  transform: scale(1.01);
}
#totalSpending {
  font-size: 26px;
  font-weight: bold;
}
* {
  border-radius: 8px;
}
#createGroupBtn,
button[onclick="clearAllData()"] {
  display: block;
  margin: 10px auto;
}
.screen {
  padding-left: 0;
  padding-right: 0;
}
.member-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  background: #4f46e5;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
#introScreen {
  text-align: center;
}

#introScreen h1 {
  font-size: 32px;
}

#introScreen p {
  color: gray;
  margin: 15px 0;
}
#introScreen {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;  
}

.intro-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);

  max-width: 300px;
  width: 90%;
}

.intro-card h1 {
  margin-bottom: 10px;
}

.intro-card p {
  color: gray;
  margin-bottom: 20px;
}
.screen {
  display: none;
}
#introScreen {
  display: flex;
}
.emoji {
  font-size: 40px;
  margin-bottom: 10px;
}
body {
  margin: 0;
}
li {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}
li:hover {
  transform: scale(1.02);
  transition: 0.2s;
}
input, select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
}
.container {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
#balanceList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#balanceList li {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 8px;
}
#balanceList li {
  display: flex;
  align-items: center;
}

#balanceList li span {
  flex: 1; 
}

#balanceList li button {
  margin-left: auto; 
}
body {
  margin: 0;
}
.screen {
  height: 100vh;
  overflow: hidden;
}
h1, p {
  margin: 0;
}

.intro-card p {
  margin: 10px 0 20px 0;
}
#introScreen {
  overflow: hidden;
}
.container {
  max-width: 400px;
  margin: 0 auto;
  padding: 15px;
}
button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
}
#balanceList li {
  flex-direction: row; 
  gap: 10px;
}
input, select {
  width: 100%;
  font-size: 16px;
}
.container > * {
  margin-bottom: 15px;
}
body {
  font-size: 16px;
}
body {
  font-family: 'Inter', sans-serif;
}
.screen {
  height: 100vh;
  overflow-y: auto;  
}
#balanceList li button {
  width: auto;       
  padding: 6px 10px;  
  font-size: 14px;
}
