:root {
  --color-bg: #f4f6fb;
  --color-card: #ffffff;
  --color-text: #1f2430;
  --color-text-muted: #6b7280;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-border: #e2e8f0;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --shadow-card: 0 10px 30px rgba(31, 36, 48, 0.08);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 48px 16px;
  background: linear-gradient(180deg, #e8eefc 0%, var(--color-bg) 100%);
  color: var(--color-text);
  font-family:
    "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui,
    -apple-system, sans-serif;
  line-height: 1.5;
}

.app {
  width: 100%;
  max-width: 560px;
}

.auth-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 48px 32px;
  text-align: center;
}

.auth-card h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.auth-card .app-subtitle {
  margin: 12px 0 28px;
  line-height: 1.6;
}

.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(31, 36, 48, 0.08);
  transition: background 0.15s ease;
}

.google-button:hover {
  background: #f8fafc;
}

.auth-card .status {
  margin-top: 16px;
}

.app-header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.app-subtitle {
  margin: 8px 0 24px;
  color: var(--color-text-muted);
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.user-picture {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.logout-button:hover {
  background: var(--color-bg);
}

.todo-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.todo-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
}

.todo-form input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  background: #ffffff;
}

.todo-form button {
  padding: 12px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.todo-form button:hover {
  background: var(--color-primary-hover);
}

.todo-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  min-height: 1.5em;
  margin: 12px 2px 0;
  font-size: 0.9rem;
}

.status.error {
  color: var(--color-danger);
}

.status.success {
  color: var(--color-success);
}

.todo-section {
  margin-top: 16px;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.todo-item.is-done .todo-title {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.todo-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.todo-title {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.todo-delete {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--color-danger-bg);
  color: var(--color-danger);
  font-size: 0.85rem;
  cursor: pointer;
}

.todo-delete:hover {
  background: #fee2e2;
}

.todo-delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.empty-state {
  margin: 24px 0 0;
  padding: 28px 16px;
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-card);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  body {
    padding: 28px 12px;
  }

  .app-header h1 {
    font-size: 1.6rem;
  }

  .todo-form {
    flex-direction: column;
  }

  .todo-form button {
    width: 100%;
  }
}
