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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  min-height: 100vh;
}

header {
  background: #16213e;
  border-bottom: 1px solid #0f3460;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
}
.header-inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { color: #7289da; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.user-info { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }

main { max-width: 960px; margin: 2rem auto; padding: 0 1rem; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #7289da; color: #fff; border: none;
  padding: .5rem 1.2rem; border-radius: 6px;
  font-size: .95rem; cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: #5f73bc; }
.btn-sm { padding: .3rem .8rem; font-size: .85rem; }
.btn-discord { background: #5865f2; }
.btn-discord:hover { background: #4752c4; }
.btn.active { background: #5f73bc; }

/* 로그인 */
.login-box {
  max-width: 400px; margin: 6rem auto;
  background: #16213e; border-radius: 12px;
  padding: 3rem 2rem; text-align: center;
}
.login-box h1 { font-size: 1.6rem; margin-bottom: 1rem; }
.login-box p { color: #aaa; margin-bottom: 2rem; line-height: 1.6; }

/* 검색 */
.search-wrap { display: flex; flex-direction: column; gap: 1rem; }
.search-bar { display: flex; gap: .5rem; }
.search-bar input {
  flex: 1; padding: .6rem 1rem;
  background: #16213e; border: 1px solid #0f3460;
  border-radius: 6px; color: #e0e0e0; font-size: 1rem;
}
.search-bar input:focus { outline: none; border-color: #7289da; }
.filters { display: flex; gap: .5rem; }
.filters select {
  padding: .4rem .8rem;
  background: #16213e; border: 1px solid #0f3460;
  border-radius: 6px; color: #e0e0e0; font-size: .9rem;
}

.toggle-events {
  display: flex; align-items: center; gap: .4rem;
  font-size: .9rem; color: #aaa; cursor: pointer; user-select: none;
}
.toggle-events input { cursor: pointer; }

.results-info { color: #aaa; font-size: .9rem; }

.results { display: flex; flex-direction: column; gap: .75rem; }
.result-item {
  background: #16213e; border: 1px solid #0f3460;
  border-radius: 8px; padding: 1rem;
}
.result-meta {
  display: flex; flex-wrap: wrap; gap: .5rem;
  font-size: .8rem; color: #888; margin-bottom: .5rem;
}
.result-meta .guild { color: #7289da; }
.result-meta .channel { color: #43b581; }
.result-meta .author { color: #faa61a; }
.discord-link {
  color: #7289da; text-decoration: none; font-size: .85rem; margin-left: auto;
}
.discord-link:hover { color: #fff; }
.result-content { line-height: 1.6; word-break: break-word; }
.result-content mark { background: #faa61a33; color: #faa61a; border-radius: 2px; }
.result-meta .event-type {
  background: #5865f2; color: #fff; padding: .1rem .5rem;
  border-radius: 4px; font-weight: 600; font-size: .75rem;
}
.event-details { color: #aaa; font-size: .85rem; }
.msg-action {
  padding: .1rem .5rem; border-radius: 4px;
  font-weight: 600; font-size: .75rem; color: #fff;
}
.msg-action-update { background: #faa61a; }
.msg-action-delete { background: #ed4245; }

.pagination { display: flex; gap: .4rem; flex-wrap: wrap; }
