@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-primary: rgba(0, 0, 0, 0.1);
  --shadow-secondary: rgba(0, 0, 0, 0.05);
  --text-primary: #333;
  --text-secondary: #666;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 20px;
  background: var(--bg-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

app-bar header,
header {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #ffffff, #f8f9ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

form {
  width: 100%;
  max-width: 600px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px var(--shadow-primary);
  margin: 40px 0 40px 0;
}

input, textarea {
  width: 100%;
  margin: 8px 0;
  padding: 16px 20px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.9);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-secondary);
}

input:focus,
textarea:focus {
  border: 2px solid rgba(102,126,234,0.5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button, .submit {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  background: var(--primary-gradient);
  color: white;
  transition: 0.3s;
  width: 100%;
  margin-top: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

button.submit {
  background: var(--secondary-gradient);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.notes-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  padding: 20px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #333;
}

.empty-state p {
  font-size: 16px;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  position: relative;
}

.modal-title {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #eee;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .notes-container {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  form {
    width: 95%;
    padding: 20px;
  }
}