@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap");

*,
*:after,
*:before {
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  background-color: #f4f6fb;
  color: #2d2d2d;
  margin: 0;
  padding: 20px;
}

img {
  max-width: 100%;
  display: block;
}

input:not([type="checkbox"]):not([type="radio"]) {
  appearance: none;
  border-radius: 0;
}


.card {
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 425px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 1rem;
}

.card-image {
  border-radius: 12px;
  overflow: hidden;
  padding-bottom: 25%;
  background-repeat: no-repeat;
  background-size: 140%;
  background-position: center;
  position: relative;
}

.card-heading {
  position: absolute;
  left: 10%;
  top: 15%;
  right: 10%;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.222;
}


.card-form {
  padding: 1rem;
}

.input {
  display: flex;
  flex-direction: column-reverse;
  position: relative;
  padding-top: 1.2rem;
  margin-top: 0.9rem;
}

.input-label {
  color: #9ca3af;
  position: absolute;
  top: 1.5rem;
  transition: 0.25s ease;
}

.input-field {
  border: 0;
  z-index: 1;
  background-color: transparent;
  border-bottom: 2px solid #e5e7eb;
  font: inherit;
  font-size: 1.1rem;
  padding: 0.3rem 0;
  transition: border-color 0.25s, background-color 0.25s;
}

.input-field:focus,
.input-field:valid {
  outline: 0;
  border-bottom-color: #6366f1;
  background-color: #f9fafb;
}

.input-field:focus + .input-label,
.input-field:valid + .input-label {
  color: #4f46e5;
  transform: translateY(-1.5rem);
}

.action {
  margin-top: 1rem;
}

.action-button {
  font: inherit;
  font-size: 1.1rem;
  padding: 0.75em;
  width: 100%;
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 8px;
  color: #fff;
  border: 0;
  cursor: pointer;
}

.action-button:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-2px) scale(1.01);
}

.action-button:focus {
  outline: 0;
}



.badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}
.badge-read { background: #10b981; }  
.badge-unread { background: #ef4444; } 



h1 {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #111827;
  position: relative;
}

h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  margin: 8px auto 0;
  border-radius: 2px;
}
 

#library {
  max-width: 800px;
  margin: 0 auto;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

th {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  text-align: center;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #374151;
}

tr:nth-child(even) {
  background-color: #f9fafb;
}

tr:hover {
  background-color: #eef2ff;
  cursor: pointer;
}


.primary-btn {
  display: block;
  margin: 20px auto;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.primary-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-3px) scale(1.02);
}

.primary-btn:active {
  transform: translateY(0);
}

#btnNewBook {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 28px;
  font-weight: bold;
  padding: 0;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}



.secondary-btn {
  background-color: #e0e7ff;
  color: #1e1e2f;
  padding: 0.6rem 1.2rem;
  border: 1px solid #6366f1;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
  width: -webkit-fill-available;
}

.secondary-btn:hover {
  background-color: #c7d2fe;
}

.cancel-btn {
  background: #9ca3af;
  color: #fff;
}

.cancel-btn:hover {
  background-color: #4b5563;
}


.trash {
  display: flex;
  align-content: center;
  justify-content: center; 
  background-color: transparent;
}
.trash svg {
  transition: fill 0.2s ease-in-out, transform 0.2s;
}

.trash svg:hover {
  fill: #4338ca;
  cursor: pointer;
  transform: scale(1.2);
}



.container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 24, 39, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.hidden {
  display: none;
}

.container.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}



.checkbox-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
}

.checkbox-input input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4f46e5;
  cursor: pointer;
}

.checkbox-label {
  font-size: 1rem;
  color: #111827;
  cursor: pointer;
}
