:root {
  --primary: #4a55a2;
  --secondary: #7895cb;
  --white: #f8f9fa;
  --black: #2c3e50;
  --red: #e74c3c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Outfit";
}

body {
  background-color: var(--white);
  color: var(--black);
  line-height: 1.6;
  min-height: 100vh;
}

header {
  background: var(--primary);
  color: var(--white);
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}

h1 {
  margin: 0;
  font-size: 2rem;
  text-align: center;
  font-weight: 600;
}

.container {
  max-width: 1200px;
  margin: 7rem auto 0;
  padding: 0 20px;
}

form {
  background: var(--white);
  border: 2px solid #e0e0e0;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  color: var(--black);
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  display: block;
}

input,
textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  margin-top: 0.5rem;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
}

button {
  background: var(--primary);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s, background 0.3s;
}

button:disabled {
  background: #c7c8cc;
  cursor: not-allowed;
}

button:hover:enabled {
  background: var(--secondary);
  transform: translateY(-2px);
}

.validation {
  color: var(--red);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.invalid .validation {
  display: block;
}

.invalid input,
.invalid textarea {
  border-color: var(--red);
  animation: shake 0.3s;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}

.notes-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  padding: 20px 0;
}

.note-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  height: 100%;
  border-left: 6px solid var(--primary);
}

.note-card:hover {
  transform: translateY(-5px);
}

h3 {
  margin: 0 0 1rem 0;
  color: var(--black);
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  color: #575757;
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
  flex-grow: 1;
}

small {
  color: #6f6f6f;
  font-size: 0.85rem;
  display: block;
  text-align: right;
}

footer {
  padding: 1rem 0;
  background: var(--primary);
  color: var(--white);
  text-align: center;
  font-size: 1rem;
}

@media (max-width: 768px) {
  footer {
    font-size: 0.875rem;
    padding: 0.75rem 0;
  }

  .container {
    padding: 0 15px;
  }

  app-header h1 {
    font-size: 1.75rem;
  }

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

@media (max-width: 480px) {
  footer {
    font-size: 0.75rem;
    padding: 0.5rem 0;
  }

  body {
    padding: 0;
  }

  .note-form {
    margin: 0 -15px;
    border-radius: 0;
  }
}
