@charset "UTF-8";

/* 변수 설정 - 기존 테마 유지 */
:root {
    --deep-red: #be123c;
    --dark-slate: #0f172a;
    --soft-bg: #f8fafc;
    --card-bg: #ffffff;
    --sub-text: #64748b;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard",
                 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    min-height: 100vh;
}

/* ======================
   공통
====================== */
/* ======================
   프리미엄 헤더 디자인
====================== */
.header {
	background: var(--main);
	color: #fff;
	padding: 16px;
	text-align: center;
	box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-content {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px; /* 요소 간 간격 */
	flex-wrap: wrap;
}

/* 상대 팀명 뱃지 스타일 */
.away-badge {
	display: none; /* 기본 숨김 (JS에서 텍스트가 있을 때만 block 처리) */
	background: rgba(255, 255, 255, 0.2); /* 반투명 화이트 */
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 800;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.3);
	letter-spacing: -0.5px;
}

.header-title {
	font-size: 17px;
	font-weight: 900;
	letter-spacing: -0.5px;
}

.header-date-wrap {
	font-size: 13px;
	font-weight: 500;
	opacity: 0.9;
}

/* 헤더 텍스트에 은은한 빛 효과 */
.header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* 로고/타이틀 포인트 */
.header span {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 30px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}



/* 울트라 슬림 프리미엄 헤더 */
.lynn-header-ultra-slim {
    background: #0f172a; /* 딥 네이비 블랙 */
    padding: 12px 20px;  /* 높이 최소화 */
    display: flex;
    align-items: center;
    justify-content: space-between; /* 양 끝 배치 */
    border-bottom: 2px solid #be123c;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.lynn-logo-mini {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lynn-text-mini {
    font-family: 'Inter', 'Arial Black', sans-serif;
    font-size: 26px;      /* 크기를 줄여 한 줄 최적화 */
    font-weight: 950;
    font-style: italic;
    letter-spacing: -2.5px;
    background: linear-gradient(180deg, #fb7185 0%, #be123c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lynn-fc-tag {
    font-size: 10px;
    font-weight: 900;
    color: #111;
    background: #fff;
    padding: 1px 4px;
    border-radius: 3px;
    transform: skewX(-10deg);
    margin-bottom: 2px;
}

.lynn-page-name {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.wrap {
    padding: 16px;
    /* 하단 탭바/푸터 높이에 맞춰 넉넉히 조절 (최소 150px 추천) */
    padding-bottom: 100px !important; 
}


.card{
  background:var(--card);
  border-radius:18px;
  padding:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  margin-bottom:16px;
}

/* ================================
   로그인 레이아웃
================================ */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 360px;
    background: #ffffff;
    border-radius: 28px;
    padding: 32px 26px 28px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.35);
    position: relative;
    overflow: hidden;
}

/* 상단 포인트 라인 */
.login-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(135deg, #be123c, #9f1239);
}

/* ================================
   타이틀
================================ */
.login-title {
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 26px;
    letter-spacing: -0.6px;
}

/* ================================
   입력 폼
================================ */
#loginForm {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#loginForm input[type="text"],
#loginForm input[type="password"] {
    height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    outline: none;
    transition: all 0.2s ease;
}

#loginForm input::placeholder {
    font-weight: 600;
    color: #94a3b8;
}

#loginForm input:focus {
    background: #ffffff;
    border-color: #be123c;
    box-shadow: 0 0 0 4px rgba(190, 18, 60, 0.12);
}

/* ================================
   자동 로그인
================================ */
.auto {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-top: 2px;
}

.auto input {
    accent-color: #be123c;
}

/* ================================
   로그인 버튼
================================ */
#loginBtn {
    margin-top: 8px;
    height: 54px;
    border-radius: 18px;
    border: none;
    background: linear-gradient(135deg, #be123c, #9f1239);
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.4px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(190, 18, 60, 0.35);
    transition: all 0.2s ease;
}

#loginBtn:active {
    transform: scale(0.97);
}

/* ================================
   에러 메시지
================================ */
.login-error {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: #be123c;
    min-height: 18px;
}
/* ======================
   랭킹
====================== */
.rank-item{
  position:relative;
  padding:14px;
  border-radius:12px;
  background:#f9fafb;
  overflow:hidden;
  margin-bottom:10px;
}

.bar-bg{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:100%;
  background:#e5e7eb;
}

.bar-bg span{
  display:block;
  height:100%;
  background:rgba(37,99,235,.15);
}

.rank-item .content{
  position:relative;
  z-index:1;
  display:flex;
  justify-content:space-between;
  font-size:14px;
}
.rank-item b{color:var(--main)}

/* ======================
   하단 탭바 (슬라이드)
====================== */
/* ======================
   개선된 하단 탭바 (Floating Tabbar)
====================== */
.tabbar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 70px; background: #0f172a; /* 헤더와 동일한 다크 네이비 */
    display: flex; justify-content: space-around; align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    z-index: 2000; padding-bottom: env(safe-area-inset-bottom);
}

.tab {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: #94a3b8; transition: all 0.3s ease;
}

/* 활성 탭 스타일 (딥 레드 강조) */
.tab.active { color: #fff; }
.tab.active svg { stroke: var(--deep-red); filter: drop-shadow(0 0 5px rgba(190, 18, 60, 0.6)); transform: translateY(-2px); }
.tab span { font-size: 10px; font-weight: 700; margin-top: 4px; }

/* --- 바텀 시트 프리미엄 디자인 --- */
.more-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px);
    display: none; align-items: flex-end;
}

.more-sheet {
    width: 100%; background: #0f172a; /* 다크 테마 유지 */
    border-radius: 32px 32px 0 0; padding: 12px 20px 40px;
    transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 2px solid var(--deep-red);
}

.sheet-handle { width: 40px; height: 5px; background: rgba(255,255,255,0.2); border-radius: 10px; margin: 0 auto 20px; }
.sheet-title { font-size: 18px; font-weight: 900; color: #fff; margin-bottom: 24px; text-align: center; }

/* 그리드 아이템 보정 */
.sheet-item {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.05); padding: 16px; border-radius: 20px;
    text-decoration: none; border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s ease;
}
.sheet-item:active { background: rgba(255,255,255,0.1); transform: scale(0.96); }

.icon-box {
    width: 42px; height: 42px; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
}

.sheet-item span { font-size: 14px; font-weight: 700; color: #cbd5e1; }
.sheet-item.logout { background: rgba(225, 29, 72, 0.1); border-color: rgba(225, 29, 72, 0.2); }
.sheet-item.logout span { color: #fb7185; }

.sheet-close-btn {
    width: 100%; margin-top: 20px; padding: 16px;
    border: none; border-radius: 18px; background: rgba(255,255,255,0.1);
    color: #fff; font-weight: 800; cursor: pointer;
}

/* ======================
   랭킹 스크롤 영역
====================== */
.rank-scroll{
  max-height:300px;      /*높이 고정 */
  overflow-y:auto;
  margin-top:10px;
}

.rank-item{
	display:flex;
	justify-content:space-between;
	align-items:center;
	padding:10px 4px;
	font-size:15px;
	background:#fff;
	border-radius:12px;
	padding:12px;
	text-align:center;
	margin-bottom:5px;
}
/* ======================
   모달
====================== */
#memberModal{
  position:fixed;
  inset:0;
  z-index:2000;
}
.modal-bg{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.4);
}
.modal{
  position:relative;
  margin:10vh auto;
  background:#fff;
  border-radius:20px;
  padding:20px;
  width:90%;
  max-width:360px;
}
.modal input,
.modal select{
  width:100%;
  padding:12px;
  margin-bottom:10px;
  border-radius:10px;
  border:1px solid #d1d5db;
}
.modal button{
  width:100%;
  padding:12px;
  margin-top:6px;
}

/* ======================
   상단 액션 버튼
====================== */
.top-actions{
  display:flex;
  justify-content:flex-end; /*오른쪽 정렬 */
  margin-bottom:14px;
}

.btn-primary {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #be123c 0%, #9f1239 100%); /* 로고와 맞춘 딥 레드 그라데이션 */
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.5px;
    box-shadow: 0 8px 20px rgba(190, 18, 60, 0.25); /* 입체감 있는 레드 그림자 */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
}

.btn-primary:active {
    transform: scale(0.96);
    filter: brightness(0.9);
}

/* ======================
   Sticky 상단 액션바
====================== */
.top-actions.sticky{
  position:sticky;
  top:0;                 /* header 바로 아래 */
  z-index:900;
  background:var(--bg);  /* 스크롤 시 겹침 방지 */
  padding:8px 0 12px;
  margin-bottom:12px;
}

/* 스크롤 시 살짝 그림자 */
.top-actions.sticky::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:12px;
  background:linear-gradient(to bottom,
    rgba(244,246,248,1),
    rgba(244,246,248,0)
  );
  pointer-events:none;
}

#changeGame{
  margin-left:10px;
  padding:8px 14px;
  border:none;
  border-radius:8px;
  background:#ff4d4f;
  color:#fff;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}

#changeGame:active{
  transform:scale(0.97);
}

#changeGame:hover{
  background:#e6393b;
}

.auto {
    display: flex;
    align-items: center;    /* 수직 중앙 정렬 */
    justify-content: center; /* 가로 중앙 정렬 (이 부분이 추가되어야 합니다) */
    gap: 6px;               /* 체크박스와 글자 사이 간격 */
    font-size: 13px;
    color: #374151;
    margin: 8px 0 12px;
    cursor: pointer;        /* 마우스 커서를 손가락 모양으로 변경 */
}

/* 체크박스 자체의 기본 마진 제거 */
.auto input[type="checkbox"] {
    width: auto;            /* 기존 input 스타일(100%)을 덮어씌움 */
    margin: 0;              /* 기본 여백 제거 */
    cursor: pointer;
}


.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

/* 기본 카드 */
.stat-card {
    background: #0f172a; /* 관리자 다크 */
    border-radius: 18px;
    padding: 18px 12px;
    text-align: center;

    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.6),
        inset 0 1px 0 rgba(255,255,255,0.04);

    border: 1px solid rgba(148,163,184,0.08);
}

/* 숫자 */
.stat-card .v {
    font-size: 28px;
    font-weight: 900;
    color: #f8fafc;
    letter-spacing: -0.5px;
}

/* 라벨 */
.stat-card .label {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
}

/* 총 경기수 강조 */
.stat-card:last-child {
    background: linear-gradient(
        135deg,
        #1e293b,
        #020617
    );
    border-color: rgba(190, 18, 60, 0.35);
}

.stat-card:last-child .v {
    color: #fbbf24; /* 포인트 컬러 */
}

.stat-card:last-child .label {
    color: #fde68a;
}

.year-filter {
    padding: 12px 16px;
    background: var(--bg);
    display: flex;
    justify-content: flex-end;
}

.year-filter select {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: var(--card);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    -webkit-appearance: none; /* 브라우저 기본 화살표 숨김(선택) */
}

.more-menu-wrapper {
    position: fixed; inset: 0; z-index: 2000;
    display: none; align-items: flex-end; /* 아래에서 위로 */
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

/* 메뉴 콘텐츠 박스 */
.more-menu-content {
    width: 100%;
    background: #fff;
    border-radius: 30px 30px 0 0;
    padding: 24px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    transform: translateY(100%); /* 처음에 아래 숨김 */
    transition: transform 0.3s ease;
}

.more-menu-wrapper.active { display: flex; }
.more-menu-wrapper.active .more-menu-content { transform: translateY(0); }

.more-header { font-size: 16px; font-weight: 800; margin-bottom: 20px; text-align: center; }

/* 2열 그리드 배치 */
.more-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.more-item {
    background: #f8fafc;
    padding: 16px;
    border-radius: 16px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    border: 1px solid #f1f5f9;
}

.more-close {
    width: 100%; padding: 14px; border: none; border-radius: 14px;
    background: #f1f5f9; color: #64748b; font-weight: 700;
}


/* --- 바텀 시트 오버레이 --- */
.more-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: none; align-items: flex-end;
    opacity: 0; transition: opacity 0.3s ease;
}
.more-overlay.active { display: flex; opacity: 1; }

/* --- 바텀 시트 본체 --- */
.more-sheet {
    width: 100%;
    background: #ffffff;
    border-radius: 28px 28px 0 0;
    padding: 12px 20px 40px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.more-overlay.active .more-sheet { transform: translateY(0); }

/* 상단 핸들 (디자인 포인트) */
.sheet-handle {
    width: 40px; height: 5px; background: #e5e7eb;
    border-radius: 10px; margin: 0 auto 20px;
}

.sheet-title {
    font-size: 18px; font-weight: 900; color: #111827;
    margin-bottom: 24px; text-align: center; letter-spacing: -0.5px;
}

/* --- 그리드 메뉴 아이템 --- */
.sheet-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

.sheet-item {
    display: flex; align-items: center; gap: 12px;
    background: #f8fafc; padding: 18px 15px; border-radius: 20px;
    text-decoration: none; border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}
.sheet-item:active { background: #f1f5f9; transform: scale(0.96); }

.icon-box {
    width: 40px; height: 40px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; font-size: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.sheet-item span { font-size: 14px; font-weight: 700; color: #334155; }

/* 로그아웃 전용 스타일 */
.sheet-item.logout { background: #fef2f2; border-color: #fee2e2; }
.sheet-item.logout span { color: #ef4444; }

/* 닫기 버튼 */
.sheet-close-btn {
    width: 100%; margin-top: 20px; padding: 16px;
    border: none; border-radius: 18px; background: #f3f4f6;
    color: #64748b; font-weight: 800; font-size: 15px; cursor: pointer;
}


.material-icons {
  font-family: 'Material Icons' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;  /* 아이콘 크기 */
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;

  /* 아이콘 렌더링 최적화 */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
}


.icon-box {
    width: 42px; 
    height: 42px; 
    background: #fff;
    display: flex; 
    align-items: center; 
    justify-content: center;
    border-radius: 12px; 
    flex-shrink: 0; /* 아이콘 찌그러짐 방지 */
}

.icon-box svg {
    display: block;
}

/* 탭바 아이콘 공통 설정 */
.tab svg {
    margin-bottom: 4px; /* 아이콘과 글자 사이 간격 */
    transition: transform 0.2s ease;
}

/* 활성 탭 아이콘 색상 및 효과 */
.tab.active svg {
    stroke: var(--main); /* 활성화된 탭 아이콘은 파란색으로 */
    transform: translateY(-2px); /* 살짝 위로 띄워주는 효과 */
}

/* 탭 텍스트 크기 조정 */
.tab span {
    font-size: 11px;
    font-weight: 700;
}

/* 더보기 버튼 전용 스타일 */
.more-trigger svg {
    stroke: #64748b; /* 평소 색상 */
}

/* 기본 상태: 색상은 유지하되 약간 투명하게 */
.tab svg {
    margin-bottom: 4px;
    opacity: 0.5; /* 비활성 상태 투명도 */
    transition: all 0.3s ease;
}

/* 활성 상태: 투명도 해제 및 크기 강조 */
.tab.active svg {
    opacity: 1; 
    transform: translateY(-3px) scale(1.1); /* 위로 살짝 올라오며 커짐 */
}

/* 텍스트 색상도 아이콘과 맞춤 (선택사항) */
.tab.home.active span { color: #2563eb; }
.tab.attend.active span { color: #22c55e; }
.tab.formation.active span { color: #f59e0b; }
