@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

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

:root {
  --brand:       #111111;
  --brand-hover: #333333;
  --danger:      #e53935;
  --success:     #43a047;
  --bg:          #f0f0f0;
  --card-bg:     #ffffff;
  --border:      #e0e0e0;
  --text:        #111111;
  --muted:       #888888;
  --radius:      12px;
  --shadow:      0 2px 20px rgba(0,0,0,.08);
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* ── 카드 ── */
.container {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 40px 36px;
  width: 100%;
  max-width: 460px;
  position: relative;
}

/* ── 타이틀 ── */
.container h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 22px;
  letter-spacing: -.4px;
}

/* ── 비로그인 화면 ── */
.guest-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 28px;
}
.btn-full {
  width: 100%;
  padding: 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.btn-full:hover { background: var(--brand-hover); }

/* ── 로그인 상태 ── */
.login-status {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-name  { font-size: 13px; font-weight: 700; color: var(--text); }
.admin-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
}
.logout-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  background: #f5f5f5;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.logout-btn:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ── 입력 그룹 ── */
.input-group {
  position: relative;
  margin-bottom: 14px;
}
#longUrl {
  width: 100%;
  padding: 13px 80px 13px 14px;
  font-size: 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  background: #fafafa;
  transition: border-color .2s;
  color: var(--text);
}
#longUrl:focus { border-color: var(--brand); background: #fff; outline: none; }
#longUrl::placeholder { color: #bbb; }

#shortenBtn {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 800;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  letter-spacing: -.2px;
}
#shortenBtn:hover  { background: var(--brand-hover); }
#shortenBtn:disabled { opacity: .5; cursor: default; }

/* ── 도메인 선택 ── */
.domain-group { margin-bottom: 16px; }
.domain-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
#domainSelect {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fafafa;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s;
}
#domainSelect:focus { border-color: var(--brand); background: #fff; outline: none; }

/* ── 결과 박스 ── */
.result {
  background: #f8f8f8;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
#shortUrl {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
  flex: 1;
}
#copyBtn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .15s;
  flex-shrink: 0;
}
#copyBtn:hover { background: var(--brand-hover); }

/* ── 하단 버튼 ── */
.bottom-nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.btn-outline {
  padding: 8px 20px;
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.btn-outline:hover { border-color: var(--brand); background: var(--brand); color: #fff; }

/* ── 알림 토스트 ── */
.copy-notification {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  animation: fadeInUp .22s ease-out;
  z-index: 9999;
  white-space: nowrap;
  font-family: 'Pretendard', sans-serif;
}
.copy-notification.error { background: var(--danger); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ── 반응형 ── */
@media (max-width: 520px) {
  .container { padding: 36px 20px 28px; }
  .login-status { top: 12px; right: 12px; }
}
