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

:root {
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-sub: #6b7280;
  --border: #e5e7eb;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --kakao: #fee500;
  --kakao-text: #1a1a1a;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  padding: 24px 16px 60px;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header */
.header {
  text-align: center;
  padding: 24px 0 8px;
}

.header-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.logo {
  font-size: 28px;
}

.header h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.header-sub {
  color: var(--text-sub);
  font-size: 14px;
}

/* Card */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border: 1px solid var(--border);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.hint {
  font-size: 12px;
  color: var(--text-sub);
}

/* Badge */
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}

.badge-off {
  background: #f3f4f6;
  color: var(--text-sub);
}

.badge-on {
  background: #d1fae5;
  color: #065f46;
}

/* Kakao Section */
.kakao-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.kakao-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}

.kakao-info {
  flex: 1;
}

.kakao-info p {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-kakao {
  background: var(--kakao);
  color: var(--kakao-text);
}

.btn-kakao:hover {
  background: #ffd900;
}

.btn-ghost {
  background: transparent;
  color: var(--text-sub);
  font-size: 13px;
  padding: 6px 10px;
}

.btn-ghost:hover {
  background: var(--bg);
}

/* Board List */
.board-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.board-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.board-item:last-child {
  border-bottom: none;
}

.board-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.board-name {
  font-size: 14px;
  font-weight: 600;
}

.board-url {
  font-size: 12px;
  color: var(--text-sub);
}

/* Toggle Switch */
.toggle-wrap {
  position: relative;
}

.toggle-input {
  display: none;
}

.toggle {
  display: block;
  width: 44px;
  height: 24px;
  background: #d1d5db;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-input:checked + .toggle {
  background: var(--primary);
}

.toggle-input:checked + .toggle::after {
  transform: translateX(20px);
}

/* Keyword */
.keyword-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.keyword-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border 0.15s;
}

.keyword-input-row input:focus {
  border-color: var(--primary);
}

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ede9fe;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
}

.keyword-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: #7c6fe0;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
}

.keyword-tag button:hover {
  color: var(--danger);
}

/* Alert Log */
#alert-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.alert-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.alert-item-title:hover {
  color: var(--primary);
}

.alert-item-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-sub);
}

.alert-item-keyword {
  background: #ede9fe;
  color: #4f46e5;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

/* Empty State */
.empty-state {
  color: var(--text-sub);
  font-size: 13px;
  text-align: center;
  padding: 12px 0;
  width: 100%;
}
