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

body {
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Arial, sans-serif;
  background: #faf8f5;
  padding: 2rem;
  line-height: 1.6;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.02) 2px,
    rgba(0, 0, 0, 0.02) 4px
  );
}

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

header {
  text-align: center;
  margin-bottom: 3rem;
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.add-btn {
  background: #2a5934;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.add-btn:hover {
  background: #1f4226;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(42, 89, 52, 0.2);
}

.clear-btn {
  background: transparent;
  color: #6b7c6e;
  border: 2px solid #d4cec4;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.clear-btn:hover {
  background: #fef5f5;
  color: #c44536;
  border-color: #c44536;
  transform: translateY(-1px);
}

.reset-btn {
  background: transparent;
  color: #6b7c6e;
  border: 2px solid #d4cec4;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.reset-btn:hover {
  background: #f5f8f5;
  color: #2a5934;
  border-color: #2a5934;
  transform: translateY(-1px);
}

h1 {
  font-size: 3rem;
  color: #1a3a1f;
  margin-bottom: 0.5rem;
  font-family: "Merriweather", Georgia, serif;
  font-weight: 900;
  letter-spacing: -1px;
}

.subtitle {
  color: #6b7c6e;
  font-size: 1.1rem;
  font-style: italic;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid #2a5934;
  position: relative;
}

.card:nth-child(3n + 1) {
  transform: rotate(-0.5deg);
}

.card:nth-child(3n + 2) {
  transform: rotate(0.3deg);
}

.card:nth-child(3n) {
  transform: rotate(-0.3deg);
}

.card:hover {
  transform: translateY(-4px) rotate(0deg) !important;
  box-shadow: 0 6px 16px rgba(42, 89, 52, 0.15);
}

.card-content {
  width: 100%;
}

.remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: #6b7c6e;
  font-size: 1.5rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  opacity: 0;
}

.card:hover .remove-btn {
  opacity: 1;
}

.remove-btn:hover {
  background: #fef5f5;
  color: #c44536;
}

.day-number {
  font-size: 0.85rem;
  color: #2a5934;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-date {
  font-size: 0.9rem;
  color: #6b7c6e;
}

.card h3 {
  color: #1a3a1f;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.card p {
  color: #4a5a4d;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 58, 31, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #faf8f5;
  padding: 2rem;
  border-radius: 4px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 24px rgba(42, 89, 52, 0.3);
  border-left: 4px solid #2a5934;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
  color: #6b7c6e;
  background: none;
  border: none;
}

.close:hover {
  color: #2a5934;
}

.modal h2 {
  color: #1a3a1f;
  margin-bottom: 1rem;
  font-family: "Merriweather", Georgia, serif;
}

.modal-day {
  color: #2a5934;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-block {
  background: #f0ede7;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  margin: 1rem 0;
  border: 1px solid #d4cec4;
  border-left: 3px solid #2a5934;
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #1a3a1f;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #d4cec4;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  background: white;
}

.form-group textarea {
  resize: vertical;
  font-family: "Courier New", monospace;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2a5934;
}

.submit-btn {
  background: #2a5934;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  font-weight: 600;
}

.submit-btn:hover {
  background: #1f4226;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(42, 89, 52, 0.2);
}
