/*
  딸랑이 봇 — 공용 디자인 시스템 (mello.html 참고)
  모든 페이지가 공유하는 색상 토큰 + 헤더/버튼/카드 컴포넌트.
*/

:root {
  /* mello 원본 토큰 */
  --blue-1: #EAF3FC;
  --blue-2: #CFE3F7;
  --blue-3: #9FC3E8;
  --blue-4: #6FA3D8;
  --navy: #2F4C6B;
  --navy-soft: #4A6B8C;
  --white: #ffffff;
  --mello-card-bg: #F7FAFD;
  --green: #4CC98B;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;

  /* 사이트 공용 토큰 (기존 페이지 호환) */
  --bg: linear-gradient(180deg, #EEF5FC 0%, #F7FBFE 40%);
  --bg-solid: #EEF5FC;
  --card: var(--white);
  --card-bg: var(--mello-card-bg);
  --card-border: rgba(140, 170, 205, 0.16);
  --text: var(--navy);
  --text-title: var(--navy);
  --muted: #7C93AB;
  --text-desc: #7C93AB;
  --accent: var(--blue-4);
  --accent2: #8FB9E0;
  --accent-soft: rgba(111, 163, 216, 0.12);
  --tag-bg: rgba(111, 163, 216, 0.10);
  --tag-border: rgba(111, 163, 216, 0.28);
  --shadow: 0 8px 30px rgba(120, 160, 200, 0.14);
  --shadow-hover: 0 14px 34px rgba(120, 160, 200, 0.22);
  --nav-bg: rgba(255, 255, 255, 0.82);
  --nav-border: rgba(140, 170, 205, 0.14);
  --input-bg: #F7FAFD;
  --input-border: var(--blue-2);
  --border: var(--card-border);
}

body.dark {
  --bg: linear-gradient(180deg, #10151f 0%, #141a26 40%);
  --bg-solid: #10151f;
  --card: #182031;
  --card-bg: #182031;
  --card-border: rgba(111, 163, 216, 0.16);
  --navy: #E7EEF7;
  --text: #E7EEF7;
  --text-title: #F2F6FB;
  --navy-soft: #A9BFD6;
  --muted: #8497B3;
  --text-desc: #8497B3;
  --accent: #7FB2E8;
  --accent2: #9DC4EE;
  --accent-soft: rgba(127, 178, 232, 0.14);
  --tag-bg: rgba(127, 178, 232, 0.12);
  --tag-border: rgba(127, 178, 232, 0.3);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(16, 21, 31, 0.86);
  --nav-border: rgba(127, 178, 232, 0.14);
  --input-bg: #10151f;
  --input-border: #26324a;
  --border: var(--card-border);
  --white: #182031;
  --green: #4CC98B;
}

* { box-sizing: border-box; }

body {
  font-family: 'Noto Sans KR', 'Gowun Dodum', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background-color .3s, color .3s;
}

/* ===== 공용 헤더 ===== */
.mello-wrap { max-width: 1480px; margin: 0 auto; padding: 20px 24px 60px; }

.mello-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card);
  border-radius: 24px;
  padding: 14px 26px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  gap: 16px;
  transition: background-color .3s;
}
.mello-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; background: none; border: none; padding: 0; }
.mello-logo svg { width: 32px; height: 32px; flex-shrink: 0; }
.mello-logo span { font-family: 'Yellowtail', 'Gowun Dodum', cursive; font-size: 30px; font-weight: 400; color: var(--accent); white-space: nowrap; }

.mello-nav { display: flex; gap: 30px; }
.mello-nav a, .mello-nav .mello-nav-item {
  text-decoration: none; color: var(--navy-soft); font-size: 15px; font-weight: 500;
  padding-bottom: 6px; position: relative; cursor: pointer; background: none; border: none; font-family: inherit;
}
.mello-nav a.active, .mello-nav .mello-nav-item.active { color: var(--text); font-weight: 700; }
.mello-nav a.active::after, .mello-nav .mello-nav-item.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent); border-radius: 2px;
}

.mello-actions { display: flex; align-items: center; gap: 10px; }

.mello-icon-btn {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .95rem;
  transition: background .2s, color .2s;
}
.mello-icon-btn:hover { background: var(--accent-soft); color: var(--accent); }

.mello-btn {
  border: none; border-radius: 20px; padding: 9px 20px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s;
}
.mello-btn-outline { background: var(--card); border: 1.5px solid var(--blue-3); color: var(--navy-soft); }
.mello-btn-outline:hover { background: var(--accent-soft); }
.mello-btn-solid { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(111,163,216,0.35); }
.mello-btn-solid:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(111,163,216,0.45); }

/* 로그인 드롭다운 */
.mello-auth { position: relative; }
.mello-auth-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 16px;
  box-shadow: var(--shadow-hover); padding: 8px; min-width: 190px;
  display: none; flex-direction: column; gap: 4px; z-index: 300;
}
.mello-auth-menu.open { display: flex; }
.mello-auth-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; text-decoration: none;
  color: var(--text); font-size: .86rem; font-weight: 600;
  transition: background .15s;
}
.mello-auth-menu a:hover { background: var(--accent-soft); }
.mello-auth-menu a.discord i { color: #5865F2; }
.mello-auth-menu a img { width: 16px; height: 16px; }

.mello-user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--input-bg); padding: 5px 14px 5px 5px;
  border-radius: 50px; border: 1px solid var(--card-border);
  font-size: .85rem; color: var(--text);
}
.mello-user-chip img { width: 28px; height: 28px; border-radius: 50%; }
.mello-user-chip a { color: var(--muted); text-decoration: none; font-size: .74rem; margin-left: 2px; transition: color .2s; }
.mello-user-chip a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .mello-nav { display: none; }
}
