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

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f4f6fb;
  padding: 30px;
  color: #222;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.top-bar {
  margin-bottom: 30px;
}

.top-bar h1 {
  font-size: 32px;
  display: flex;
  justify-content: center;
  color: #2f4f9f;
}

.main {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.add-contact {
  width: 250px;
  background-color: #ffffff;
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.add-contact h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #2f4f9f;
}

.add-contact h3 {
  font-size: 14px;
  margin-bottom: 8px;
  margin-top: 14px;
  color: #444;
}

.add-contact input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d9deea;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.add-contact input:focus {
  border-color: #4a6cf7;
}

.addBtn {
  width: 100%;
  margin-top: 22px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background-color: #4a6cf7;
  color: white;
  font-size: 15px;
  cursor: pointer;
}

.addBtn:hover {
  background-color: #3557e0;
}

.view-contact {
  flex: 1;
}

.view-contact h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #222;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.contact-list li {
  width: 260px;
  background-color: #ffffff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  position: relative;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.contact-list li strong {
  display: block;
  font-size: 23px;
  color: #222;
}

.contact-list li span {
  display: block;
  font-size: 14px;
  color: #444;
  margin-bottom: 10px;
}

.menu-btn {
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 8px;
}

.menu-btn:hover {
  background-color: #f1f1f1;
}

.menu {
  position: absolute;
  top: 55px;
  right: 18px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  padding: 6px 0;
  display: none;
  min-width: 110px;
  z-index: 10;
}

.menu button {
  width: 100%;
  border: none;
  background: none;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}

.menu button:hover {
  background: #f5f5f5;
}
