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

html, body { width: 100%; min-height: 100%; }
html { font-size: 10px; -webkit-text-size-adjust: 100%; }

body { position: relative; min-width: 1600px; min-height: 100vh; background: #070B10; font-family: "SUIT", sans-serif; font-size: 1.4rem; font-weight: 400; line-height: 1.4; color: #D7DDE3; letter-spacing: -0.04em; overflow: hidden; }

/* 여백 초기화 */
html, body, div, span, h1, h2, h3, h4, h5, h6,
ul, ol, li, dl, dt, dd, p, address, blockquote, pre, cite,
form, fieldset, input, textarea, select, button, iframe, table, th, td,
figure, figcaption { margin: 0; padding: 0; }

/* 테두리 초기화 */
table, fieldset, img { border: 0 none; }

/* 목록 초기화 */
ul, ol { list-style: none; }

/* 테이블 */
table { width: 100%; border-collapse: collapse; border-spacing: 0; }
th { font-weight: normal; text-align: left; }

caption { overflow: hidden; position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0, 0, 0, 0); white-space: nowrap;}

/* 이미지와 폼 요소 정렬 */
img { max-width: 100%; vertical-align: top; }
label, input, select, textarea, button { vertical-align: middle; }

/* 링크 */
a { color: inherit; text-decoration: none; }

/* 텍스트 초기화 */
strong { font-weight: normal; }
em, address, cite { font-style: normal; }
strong, b { font-weight: 800; }

/* 폼 요소 */
label, button { cursor: pointer; }

fieldset { border: 0; }

legend { overflow: hidden; position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0, 0, 0, 0); white-space: nowrap;}

button,input,textarea,select,option { font-family: "SUIT", sans-serif; font-size: 1.4rem; letter-spacing: -0.04em; color: inherit; }

input,textarea,select { border-radius: 0; border: 0; background: transparent; outline: none;}

input[type=file],
input[type=number],
input[type=text],
input[type=password],
input[type=search],
textarea { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding: 0; border: 0;}

select { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding: 0; border: 0; cursor: pointer;}
select::-ms-expand { display: none; }
textarea { white-space: pre-wrap; resize: none; }

input::placeholder,
textarea::placeholder { color: #5F6872; }

input[type="number"] { -moz-appearance: textfield; }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* 포커스 스타일 */
:focus-visible {
	outline: 1px solid rgba(255,255,255,0.85);
	outline-offset: 2px;
	box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}

/* 컨테이너 */
.container { width: 100%; min-height: 100vh; background: #070B10;}

/* --------------------------------------------------------------------------
   디자인 토큰
   -------------------------------------------------------------------------- */
:root {
	--mb-surface-1: #0A0E14;
	--mb-surface-2: #111820;
	--mb-surface-hover: #151D26;
	--mb-surface-raised: #1A2430;
	--mb-line: #404B57;
	--mb-line-strong: #5F6872;
	--mb-text: #FFFFFF;
	--mb-text-muted: #BFC7CE;
	--mb-accent: #0D9B7A;

	/* 기록 그룹 색상 토큰 */
	--rc-out:        #E5150B;
	--rc-hit:        #08C71A;
	--rc-steal:      #8A2BFF;
	--rc-sacrifice:  #DAA126;
	--rc-onbase:     #5C6B99;
	--rc-error:      #69B3FF;
	--rc-score:      #3657FF;

	/* 자주쓰는 기록코드 버튼 전용 — #FF453A 기준 밝기/채도 통일 */
	--rc-q-out:       #FF453A;
	--rc-q-hit:       #3DD65C;
	--rc-q-steal:     #A040FF;
	--rc-q-sacrifice: #F5B731;
	--rc-q-onbase:    #7B96D4;
	--rc-q-error:     #5BB5FF;
	--rc-q-score:     #4D76FF;
}

/* --------------------------------------------------------------------------
   공통 유틸리티 클래스 — board.html에서 미사용 (다른 페이지/추후 사용 가능)
   TODO: 프로젝트가 단일 페이지인 경우 아래 섹션 제거 검토
   .btn-wrap, .input-text, .select-wrap, .input-wrap, .panel, .table, .badge,
   .scrollbar, .text-*, .flex/block/display 유틸, .gap-*, .w-full, .h-full
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   button reset
   -------------------------------------------------------------------------- */
button { display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; line-height: 1; letter-spacing: inherit; appearance: none; -webkit-appearance: none; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; pointer-events: none; }
button:focus-visible { outline: none; }

/* --------------------------------------------------------------------------
   .btn — 프로젝트 기본 버튼
   -------------------------------------------------------------------------- */
.btn-wrap { position: relative; }
.btn-wrap.right { text-align: right; }
.btn-wrap.mg-top { margin-top: 10px; }
.btn-wrap.mg-0 .btn { margin: 0; }
.btn-wrap.pd-left { padding-left: 5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 28px; padding: 0 10px; border: 1px solid var(--mb-line); border-radius: 4px; background: var(--mb-surface-2); color: var(--mb-text); font-size: 1.2rem; font-weight: 600; line-height: 1; white-space: nowrap; transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, opacity 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease; }
.btn:hover { background: var(--mb-surface-hover); border-color: var(--mb-line-strong); }
.btn:active:not(:disabled):not(.disabled) { transform: scale(0.96); background: #0A0E14; border-color: var(--mb-line-strong); box-shadow: inset 0 1px 3px #000000; transition-duration: 0.05s; }
.btn:focus-visible { outline: none; border-color: rgba(255,255,255,0.85); box-shadow: 0 0 0 2px rgba(255,255,255,0.1); }
.btn:focus-visible:active:not(:disabled):not(.disabled) { box-shadow: inset 0 1px 3px #000000, 0 0 0 2px rgba(255,255,255,0.08); }
.btn.active,
.btn.selected { border-color: var(--mb-accent); color: var(--mb-text); }
.btn:disabled,
.btn.disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* --------------------------------------------------------------------------
   .control-btn — 수치 조작 버튼 (.btn과 함께 사용)
   -------------------------------------------------------------------------- */
.btn.control-btn { width: 30px; height: 28px; padding: 0; border-radius: 3px; color: var(--mb-text-muted); font-size: 1.2rem; font-weight: 700; }
.btn.control-btn:hover { color: var(--mb-text); }
.btn.control-btn:active:not(:disabled):not(.disabled) { transform: scale(0.92); }
.btn.control-btn[data-action="increase"]:active,
.btn.control-btn[data-action="inning-increase"]:active,
.btn.control-btn[data-action="score-adjust"][data-value^="+"]:active { transform: scale(0.92); border-color: #0F8A6D; background: var(--mb-surface-hover); color: #6AE1BF; box-shadow: inset 0 1px 3px #000000; }

/* --------------------------------------------------------------------------
   .icon-btn — 아이콘 버튼 (.btn과 함께 사용)
   -------------------------------------------------------------------------- */
.btn.icon-btn { width: 32px; height: 32px; padding: 0; }
.btn.icon-btn img { display: block; width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   입력 필드
   -------------------------------------------------------------------------- */
.input-text { display: inline-block; }
.input-text input { display: inline-block; width: 100%; height: 30px; padding: 0 10px; background: #101214; border: 1px solid transparent; border-radius: 4px; font-size: 1.5rem; color: #BDC4CA; transition: background 0.1s ease, border 0.1s ease; }
.input-text input:focus { border: 1px solid rgba(255,255,255,0.85) !important; outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,0.1); }
.input-text input.align-center { text-align: center; }
.input-text input.align-right { text-align: right; }
.input-text.w-40 input { width: 40px; }
.input-text.w-50 input { width: 50px; }
.input-text.w-80 input { width: 80px; }
.input-text.w-120 input { width: 120px; }
.input-text.w-170 input { width: 170px; }
.input-text.full { width: 100%; }
.input-text.full input { width: 100%; }
.input-text.number input[type=number] { box-sizing: border-box; -moz-appearance: textfield; padding: 0 25px 0 10px; }
.input-wrap { display: flex; gap: 4px; align-items: flex-start; }
.input-wrap.align-center { align-items: center; }
.input-wrap.full { width: 100%; }
.input-wrap.full .input-text { flex: 1; }

/* --------------------------------------------------------------------------
   셀렉트
   -------------------------------------------------------------------------- */
.select-wrap { position: relative; display: inline-block; }
.select-wrap::after { content: ''; position: absolute; top: 50%; right: 10px; width: 6px; height: 6px; border-right: 1px solid #8B949E; border-bottom: 1px solid #8B949E; transform: translateY(-65%) rotate(45deg); pointer-events: none; }
.select-wrap select { width: 100%; height: 30px; padding: 0 28px 0 10px; background: #101214; border: 1px solid #26313C; border-radius: 4px; font-size: 1.4rem; color: #BDC4CA; }
.select-wrap select:focus { border: 1px solid rgba(255,255,255,0.85); box-shadow: 0 0 0 2px rgba(255,255,255,0.1); }
.select-wrap.w-80 { width: 80px; }
.select-wrap.w-120 { width: 120px; }
.select-wrap.w-170 { width: 170px; }
.select-wrap.full { width: 100%; }

/* --------------------------------------------------------------------------
   컬러 인풋
   -------------------------------------------------------------------------- */
input[type="color"] { appearance: none; width: 24px; height: 24px; padding: 0; background: transparent; border: 1px solid #FFFFFF; border-radius: 4px; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 4px; }
input[type="color"]::-moz-color-swatch { border: none; border-radius: 4px; }
.input-wrap .color-preview { border-radius: 4px; cursor: pointer; }

/* --------------------------------------------------------------------------
   패널
   -------------------------------------------------------------------------- */
.panel { background: #0D141B; border: 1px solid #1B252F; border-radius: 4px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 0 12px; border-bottom: 1px solid #1B252F; }
.panel-title { font-size: 1.4rem; font-weight: 700; color: #F2F5F8; }
.panel-body { padding: 12px; }

/* --------------------------------------------------------------------------
   배지
   -------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 6px; background: #111922; border: 1px solid #26313C; border-radius: 3px; font-size: 1.1rem; font-weight: 700; line-height: 1; color: #8B949E; white-space: nowrap; }
.badge.green { background: #122A1F; border-color: #1E7A47; color: #67D990; }
.badge.blue { background: #152038; border-color: #2D5090; color: #8BB4FF; }
.badge.red { background: #2A1514; border-color: #8C3A36; color: #FF8D87; }
.badge.yellow { background: #2A2612; border-color: #8C7820; color: #F0CF3A; }
.badge.purple { background: #25152E; border-color: #6E3A8C; color: #D28CFF; }

/* --------------------------------------------------------------------------
   테이블
   -------------------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.table th,
.table td { height: 32px; padding: 0 8px; border-bottom: 1px solid #1B252F; font-size: 1.3rem; color: #D7DDE3; text-align: left; vertical-align: middle; }
.table th { background: #111922; font-weight: 700; color: #8B949E; }

.table tr:hover td { background: #131619; }

.table tr.active td,
.table tr.is-active td {
	background: #152824;
	box-shadow: inset 0 0 0 1px #2A5A50;
}

/* 스크롤바 */
.scrollbar { overflow: auto; }

.scrollbar::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

.scrollbar::-webkit-scrollbar-track {
	background: #131619;
}

.scrollbar::-webkit-scrollbar-thumb {
	background: #46515C;
	border-radius: 999px;
}

.scrollbar::-webkit-scrollbar-thumb:hover { background: #5A6673; }

body::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

body::-webkit-scrollbar-track { background: #05080C; }

body::-webkit-scrollbar-thumb {
	background: #3A4652;
	border-radius: 999px;
}

/* 접근성 */
.blind,
.sr-only {
	overflow: hidden;
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* 텍스트 유틸 */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.text-primary { color: #6AE1BF !important; }
.text-blue { color: #3478F6 !important; }
.text-red { color: #FF4B42 !important; }
.text-yellow { color: #F0CF3A !important; }
.text-green { color: #16B55F !important; }
.text-purple { color: #B64DFF !important; }
.text-muted { color: #8B949E !important; }
.text-dim { color: #5F6872 !important; }

.ellipsis {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* display 유틸 */
.clearfix::after {
	content: '';
	display: block;
	clear: both;
}

.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.none { display: none !important; }

.items-start { align-items: flex-start !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }

.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }

.gap-4 { gap: 4px !important; }
.gap-6 { gap: 6px !important; }
.gap-8 { gap: 8px !important; }
.gap-10 { gap: 10px !important; }

.w-full { width: 100% !important; }
.h-full { height: 100% !important; }