/* ============================================================
   루드라 통합디코 — 디자인 토큰
   Deep navy + 보라→시안 gradient, MMO 판타지 모티프
   ============================================================ */

:root {
  /* ---------- Base surfaces (dark mode default) ---------- */
  --bg-void: #06070F;           /* 페이지 가장 바깥 */
  --bg-base: #0B0D1A;           /* 기본 캔버스 */
  --bg-raised: #111428;         /* 카드/패널 */
  --bg-elevated: #161A33;       /* 호버/강조 카드 */
  --bg-inset: #080A15;          /* 입력창/인셋 */

  /* 판넬 안쪽 미묘한 그라디언트용 */
  --panel-sheen: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 40%);
  --panel-sheen-strong: linear-gradient(180deg, rgba(139,126,255,0.06) 0%, rgba(255,255,255,0) 50%);

  /* ---------- Borders / hairlines ---------- */
  --line-soft: rgba(148, 163, 220, 0.08);
  --line: rgba(148, 163, 220, 0.14);
  --line-strong: rgba(148, 163, 220, 0.24);
  --line-accent: rgba(139, 126, 255, 0.35);

  /* ---------- Text ---------- */
  --text-hi: #F0F2FF;           /* 제목 */
  --text: #D5D9F0;              /* 본문 */
  --text-mid: #9099C4;          /* 보조 */
  --text-dim: #626A92;          /* 디스에이블/메타 */
  --text-faint: #3F4668;

  /* ---------- Accents (Aion2 모티프 보라→시안) ---------- */
  --accent-violet: #8B7EFF;
  --accent-violet-strong: #A99BFF;
  --accent-violet-deep: #5A4FD4;
  --accent-cyan: #5EE2F5;
  --accent-cyan-deep: #2AAFC9;

  --accent-grad: linear-gradient(135deg, #8B7EFF 0%, #5EE2F5 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(139,126,255,0.15) 0%, rgba(94,226,245,0.12) 100%);
  --accent-grad-line: linear-gradient(90deg, transparent 0%, rgba(139,126,255,0.4) 20%, rgba(94,226,245,0.4) 80%, transparent 100%);

  /* 루드라 시그니처 앰버 (경고/중요) */
  --accent-amber: #E8B24A;
  --accent-amber-deep: #B88820;

  /* ---------- Semantic ---------- */
  --ok: #5DD29F;
  --ok-deep: #2E9A6B;
  --warn: #E8B24A;
  --danger: #F26D6D;
  --danger-deep: #C84848;
  --info: #5EE2F5;

  /* ---------- Class colors (직업) ---------- */
  --cls-tank: #4FA9FF;          /* 검성, 수호성 */
  --cls-tank-bg: rgba(79, 169, 255, 0.12);
  --cls-dps: #FF7A59;            /* 궁성, 마도성, 정령성, 살성 */
  --cls-dps-bg: rgba(255, 122, 89, 0.12);
  --cls-support: #5DD29F;        /* 치유성, 호법성 */
  --cls-support-bg: rgba(93, 210, 159, 0.12);

  /* ---------- Role ---------- */
  --role-admin: #E8B24A;
  --role-member: #8B7EFF;
  --role-guest: #626A92;

  /* ---------- Shadows (minimal) ---------- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 0 1px rgba(139,126,255,0.3), 0 0 24px rgba(139,126,255,0.15);

  /* ---------- Radii ---------- */
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* ---------- Spacing ---------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  /* ---------- Fonts ---------- */
  --font-sans: 'Pretendard', 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* ---------- Motion ---------- */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 320ms;

  /* ---------- Focus ring ---------- */
  --focus-ring: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent-violet);
}

/* ---------- Light mode override ---------- */
:root[data-theme="light"] {
  --bg-void: #EEF0F8;
  --bg-base: #F5F6FB;
  --bg-raised: #FFFFFF;
  --bg-elevated: #FAFBFE;
  --bg-inset: #F0F2F8;

  --panel-sheen: linear-gradient(180deg, rgba(139,126,255,0.02) 0%, rgba(255,255,255,0) 40%);
  --panel-sheen-strong: linear-gradient(180deg, rgba(139,126,255,0.04) 0%, rgba(255,255,255,0) 50%);

  --line-soft: rgba(45, 49, 82, 0.06);
  --line: rgba(45, 49, 82, 0.1);
  --line-strong: rgba(45, 49, 82, 0.18);
  --line-accent: rgba(90, 79, 212, 0.35);

  --text-hi: #0B0D1A;
  --text: #262A44;
  --text-mid: #5A6186;
  --text-dim: #8A90B0;
  --text-faint: #B8BCD0;

  --accent-violet: #5A4FD4;
  --accent-violet-strong: #7668EC;
  --accent-violet-deep: #3E35A3;
  --accent-cyan: #0891A8;
  --accent-cyan-deep: #066577;

  --accent-grad: linear-gradient(135deg, #5A4FD4 0%, #0891A8 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(90,79,212,0.08) 0%, rgba(8,145,168,0.06) 100%);

  --role-admin: #B88820;
  --role-member: #5A4FD4;

  --shadow-sm: 0 1px 2px rgba(17, 20, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(17, 20, 40, 0.08), 0 1px 2px rgba(17, 20, 40, 0.04);
  --shadow-lg: 0 16px 40px rgba(17, 20, 40, 0.1), 0 2px 6px rgba(17, 20, 40, 0.06);
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-void);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { min-height: 100vh; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, select, textarea { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

/* Text selection */
::selection { background: rgba(139, 126, 255, 0.35); color: var(--text-hi); }

/* Scrollbar (subtle) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); background-clip: padding-box; border: 2px solid transparent; }

/* Mono utility */
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum' 1, 'zero' 1; }

/* Utility: 판타지 카드 코너 마커 */
.corner-frame {
  position: relative;
}
.corner-frame::before,
.corner-frame::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  border-color: var(--line-accent);
  border-style: solid;
}
.corner-frame::before {
  top: -1px; left: -1px;
  border-width: 1px 0 0 1px;
}
.corner-frame::after {
  bottom: -1px; right: -1px;
  border-width: 0 1px 1px 0;
}

/* 얇은 그라디언트 hairline */
.hairline-accent {
  height: 1px;
  background: var(--accent-grad-line);
  border: none;
}

/* 룬 모티프 구분자 (순수 기하학) */
.rune-divider {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text-faint);
}
.rune-divider::before,
.rune-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
