/* Base styles & variables */
:root {
  --bg-color: #fcfcfc;
  --text-primary: #111111;
  --text-secondary: #666666;
  --border-color: #eaeaea;
  --accent-color: #000000;
  --success-color: #2b8a3e;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
p { color: var(--text-secondary); }

/* Layout & Containers */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #ffffff;
}

.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

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

/* Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 500;
}

input, textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

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

/* Login Page Specifics */
.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.login-wrapper h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.login-wrapper p { margin-bottom: 2rem; max-width: 400px; }

/* Dashboard Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.logo { font-size: 1.25rem; font-weight: 700; }

/* Drop Link Form */
.drop-zone {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  background: #ffffff;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.drop-zone input { flex: 1; margin-bottom: 0; }

/* Drafts Grid */
.drafts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.draft-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.draft-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.draft-meta { font-size: 0.8rem; color: var(--text-secondary); display: flex; gap: 0.5rem;}
.draft-title { font-size: 1.1rem; font-weight: 600; }
.draft-summary { font-size: 0.9rem; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #f1f8f5;
  color: var(--success-color);
  border: 1px solid #d3ebd9;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(2px);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  padding: 2rem;
  transform: translateY(20px);
  transition: transform 0.2s;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.close-modal { cursor: pointer; font-size: 1.5rem; color: var(--text-secondary); border: none; background: transparent; }

/* Utilities */
.hidden { display: none !important; }