@import url("pretendard.css");

:root {
    --bg: #0f172a;           /* 거의 검정에 가까운 진한 네이비 */
    --bg-sub: #1e293b;       /* 어두운 배경 보조 */
    --text: #e0e7ff;         /* 밝고 부드러운 흰색 */
    --text-muted: #94a3b8; 
    --text-foreground: #fff;
    --text-secondary: #64748b;
    --border: #475569;       /* 중간톤 블루 그레이 */
    --accent: #2563eb;       /* 밝은 블루 (하이라이트용) */
    --card: #1e293b;         /* 카드 배경 어두운 블루 */
    --highlight: #3b82f6;    /* 좀 더 밝은 하이라이트 블루 */
    --light: #f8fafc;        /* 밝은 회색 */
    --dark-gray: #cbd5e1;    /* 밝은 회색 톤 텍스트 */
    --medium-gray: #94a3b8;  /* 중간 톤 회색 */
    --white: #f8fafc;        /* 거의 흰색 */
    --black: #000000;        /* 검정 */
    --gray-light: #64748b;   /* 어두운 회색 */
    --gray-medium: #64748b;  /* 중간 어두운 회색 */
    --gray-dark: #e2e8f0;    /* 밝은 회색 */
    --blue-light: #3b82f6;   /* 진한 파란색 */
    --blue-bg: #1e293b;      /* 어두운 배경 블루 */
    --header-bg: #0f172a;    /* 헤더 배경 더 어둡게 */
    --border-color: #475569; /* 중간톤 블루 그레이 */
    --stat-border: #334155;  /* 카드 경계 더 진하게 */
    --scroll-thumb: #2563eb80; /* 스크롤바 색상 강조 */
    --ranking-blue: #3b82f6; /* 랭킹 파란색 좀 더 밝게 */
    --ranking-purple: #7c3aed; /* 진한 보라 */
    --ranking-slate: #64748b; /* 어두운 블루 그레이 */
    --ranking-emerald: #059669; /* 선명한 녹색 */
    --point-bg: #2563EB;
    --ranking-badge: #1E3A8A; /* 다크 블루 그레이 배경 */
    --border-table-color: #E2E8F010;
    --th: #1E3A8A;
    --td: #1E3A8A70; /* td */

  /* light 일때 */
  /* --bg: #0f172a;
  --bg-sub: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --accent: #60a5fa;
  --card: #1e293b;
  --highlight: #2563eb;
  --light: #ffffff;
  --dark-gray: #374151;
  --medium-gray: gray;
  --white: #ffffff;
  --black: #000000;
  --gray-light: #ccc;
  --gray-medium: #6b7280;
  --gray-dark: #111827;
  --blue-light: #BFDBFE;
  --blue-bg: #E4EEFF;
  --header-bg: #F6F9FF;
  --border-color: #D4DAE3;
  --stat-border: #efefef;
  --scroll-thumb: #a5b4fc;
  --ranking-blue: #1d4ed8;
  --ranking-purple: #6b21a8;
  --ranking-slate: #94a3b8;
  --ranking-emerald: #166534;
  --accent-purple: #7B8EF8;
  --ranking-badge: #E2E8F0; */ 
}

*, *::before, *::after {
  box-sizing: border-box;
}
body, html, p, a, div, span, ul, li {
  margin: 0;
  padding: 0;
}
i {
  font-style: normal;
  color: var(--medium-gray);
}
.m-4 {
  margin: 16px;
}
.mt-4 {
  margin-top: 16px;
}
.mt-0 {
  margin-top:0;
}
.mb-0 {
  margin-bottom:0;
}
.ml-0 {
  margin-left:0;
}
.mr-0 {
  margin-right:0;
}
.mr-3 {
  margin-right:30px;
}
.overflow-x-auto {
  width: 100%;
  overflow-x: auto;
}
.flex_row {
  display: flex;
  flex-direction: flex-row;
  align-items: center;
  gap: 12px;
}
.justify-center {
  justify-content: center;
  gap: 4px;
}
.space_between {
  justify-content: space-between;
  align-items: center;
}
.select_wrapper {
  position: relative;
  display: inline-block;
  font-family: 'Pretendard', sans-serif;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  padding: 0.25rem 1.5rem 0.25rem 1.5rem;
  outline: none;
  cursor: pointer;
  height: 36px;
  color: inherit;
  text-align: center;
}
.line .select {
  border: 2px solid var(--white);
  border-radius: 99px;
  padding-right: 30px;
  color: var(--white);
}
.select.backcolor {
  background: #0b1532;
}
.select_wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  pointer-events: none;
  transform: translateY(-50%) rotate(45deg);
  border: solid var(--black);
  border-width: 0 2px 2px 0;
  padding: 3px;
  transition: transform 0.2s ease;
}
.select_wrapper.line::after {
 color: var(--white);
 content: "";
 position: absolute;
 top: 50%;
 right: 1rem;
 width: 0.5rem;
 height: 0.5rem;
 pointer-events: none;
 transform: translateY(-50%) rotate(45deg);
 border: solid var(--white);
 border-width: 0 2px 2px 0;
 padding: 3px;
 transition: transform 0.2s ease;
}

.select_wrapper.open::after {
  transform: translateY(-50%) rotate(-135deg);
}
.table {
  border: 1px solid var(--border-table-color);
  border-radius: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  border: 0;
}
th, td {
  padding: 8px;
  text-align: center;
  border: 0;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-table-color);
  background: var(--td);
}
th {
  font-weight: normal;
  color: var(--gray-dark);
  background: var(--th);
}
td {
  font-weight: 600;
  color: var(--gray-dark);
}
tr:last-child td {
  border-bottom: 0;
}
tr.selected {
  background: var(--blue-bg);
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Pretendard', sans-serif;
  color: var(--dark-gray);
  background: linear-gradient(to bottom, #080F24, #1E3A8A);
}
body.sub {
}
header {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-bottom: 0.25rem;
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin-top: 10px;
}
header.scrolled {
  background-color: var(--bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
header button {
  font-size: 2rem;
  color: var(--text-foreground);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
header img {
  display: block;
  height: 36px;
  margin-top: 8px;
  width: auto;
  margin-right: 16px;
}
.header_spacer {
  width: 1.5rem;
  flex-shrink: 0;
}
main {
  flex: 1;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-bottom: 0.75rem;
  overflow-y: auto;
}
.info {
  width: 100%;
  padding-top: 1rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 1rem;
}
.sub .info {
  display: flex;
  flex-direction: row;
  padding-left: 8px;
  gap: 20px;
}
.player_photo {
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  border: 6px solid var(--white);
  object-fit: cover;
}
.player_info {
  width: 100%;
  padding: 0.75rem;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.375rem;
}
.sub .info .player_info {
  display: flex;
  padding-left: 8px;
  align-items: flex-start;
  align-self: stretch;
}
.player_name {
  padding-top: 0.25rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.875rem;
  font-weight: 600;
  margin: 0;
}
.player_name > span {
  padding: 0 8px;
  border-radius: 100rem;
  background: var(--th);
  font-weight: 400;
  font-size: 1.4rem;
}
.player_grade {
  margin: 4px;
}
.player_school {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0;
}
.player_details {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--dark-gray);
  margin-top: 0.25rem;
}
.detail_tag {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
}
.detail_tag img {
  width: 1.25rem;
  height: 1.25rem;
}
.detail_badge {
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  font-size: 1rem;
  background-color: var(--td);
  font-weight: 500;
  color: var(--dark-gray);
}
.detail_badge.grade {
  background: var(--white);
  color: var(--text-secondary);
  font-weight: 400;
  border-radius: 99px;
  padding-left: 12px;
}
.num_updown {
  display: inline-flex;
  align-items: center;
}
.info_sub {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.info_card {
 width: 100%;
 border-radius: 12px;
 background: var(--point-bg);
 padding: 12px;
 color: var(--light);
 display: flex;
 flex-direction: column;
 gap: 8px;
}
.info_card .title {
  font-weight: 400;
}
.info_card h3 {
  font-size: 1.8rem;
  font-weight: 600;
  display: inline;
}
.info_card .card_data {
  height: 32px;
}
.position_tags {
  min-width: 11rem;
  display: inline-flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
}
.sub .position_tags {
  width: 100%;
}
.position_badge {
  /* flex: 1; */
  height: 2rem;
  padding: 0.25rem 1.25rem;
  background-color: var(--ranking-badge);
  border-radius: 9999px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  font-size: 1rem;
  color: var(--dark-gray);
  font-weight: 500;
}
.position_badge.on {
  background-color: var(--ranking-blue);
}
.position_badge em {
  border-right: 1px solid var(--border-color);
  font-style: normal;
  padding-right: 0.5rem;
}
.box_wrap {
  width: 100%;
}
.section_header {
  width: 100%;
  height: 3rem;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.section_header h4 {
  font-weight: 700;
  margin: 0;
  font-size: 1rem;
  color: var(--gray-dark);
}
.see_all {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--blue-light);
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}
.see_all img {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}
.stat_list {
  width: 100%;
  display: flex;
  flex-direction: row;
  padding: 0.25rem;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
.stat_list::-webkit-scrollbar {
  height: 6px;
}
.stat_list::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border-radius: 3px;
}
.stat_item {
  flex: 1 1 0%;
  padding: 0.75rem;
  background-color: var(--white);
  border-radius: 0.5rem;
  border: 1px solid var(--stat-border);
  box-shadow: 0 0px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  min-width: 100px;
}
.stat_item.no-minwidth {
    min-width: auto; /* 또는 unset */
}
.stat_item.mw160 {
    min-width: 160px; /* 또는 unset */
}
.info_card .stat_item {
  border: none;
}
.stat_item.add {
  background: var(--th);
  border: 0;
}
.stat_label {
  font-size: 0.875rem;
  color: var(--gray-medium);
  margin: 0;
}
.stat_label.ranking {
  position: relative;
  padding-right: 30px;
}
.stat_label svg {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}
.stat_value_wrapper {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1rem;
  color: var(--medium-gray);
}
.stat_value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--black);
  margin: 0;
  display: inline-block;
}
.stat_value + img {
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
  display: inline-block;
}
.ranking_list,
.mydata_list {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}
.ranking_list::-webkit-scrollbar,
.mydata_list::-webkit-scrollbar {
  height: 6px;
}
.ranking_list::-webkit-scrollbar-thumb,
.mydata_list::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border-radius: 3px;
}
.ranking_item {
  flex: 1 1 0%;
  padding: 0.5rem;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.25rem;
  color: var(--light);
  user-select: none;
  min-width: 90px;
}
.ranking_item .emblem {
  width: 2.25rem;
  height: 2rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
}
.ranking_item .emblem img {
  display: block;
  max-width: 100%;
  height: auto;
}
.ranking_item .ranking_info {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  color: var(--light);
}
.ranking_item .ranking_info .title {
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}
.ranking_item .ranking_info .subtitle {
  font-size: 0.75rem;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-x: hidden;
  max-width: 80px;
}
.ranking_item .ranking_position {
  width: 100%;
  /* padding-left: 1rem; */
  /* padding-right: 1rem; */
  height: 2rem;
  background-color: var(--white);
  border-radius: 9999px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.125rem;
  color: var(--black);
  font-size: 1rem;
  font-weight: 500;
  user-select: none;
  margin-top: 20px;
  margin-bottom: 5px;
}
.ranking_item .ranking_position img {
  width: 1rem;
  height: 1rem;
  display: inline-block;
}
.ranking_blue {
  background-color: var(--ranking-blue);
}
.ranking_purple {
  background-color: var(--ranking-purple);
}
.ranking_slate {
  background-color: var(--ranking-slate);
}
.ranking_emerald {
  background-color: var(--ranking-emerald);
}
.mydata_item {
  width: 9rem;
  min-width: 9rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
  background-color: var(--white);
}
.mydata_item img {
  width: 100%;
  display: block;
  height: auto;
}
.mydata_info {
  height: 2rem;
  padding: 0.25rem 0.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
}
.mydata_date {
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--black);
}
.mydata_likes {
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--black);
}
.mydata_likes img {
  width: 1rem;
  height: 1rem;
  display: inline-block;
}
.accordion-toggle {
  cursor: pointer;
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.accordion-content.open {
  max-height: 1000px;
}

/* login */
body.login {
  background-color: #1e3a8a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  font-family: Arial, sans-serif;
  color: white;
  position: relative;
  overflow: auto;
}

.login a {
  text-decoration: none;
}

.login_background {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  justify-content: center;
  background-color: #0f172a;
}

.login_bg_image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login_overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(30, 58, 138, 0.7), rgba(30, 64, 175, 0.8), rgba(30, 58, 138, 0.9));
}

.login_container {
  position: relative;
  width: 90vw;
  height: 100vh;
  border-radius: 1.5rem;
  overflow: hidden;
  z-index: 1;
}
.login_box {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login_content_wrap {
  max-width: 640px;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
}
.login_content {
  position: absolute;
  width: 100%;
  top: 200px;
}
.login_img {
  width: 100%;
  text-align: center;
}
.login_logo {
  position: absolute;
  top: 60px;
  width: 100%;
  text-align: center;
}

.login_logo img {
  object-fit: contain;
  object-position: top;
}

.login_title {
  text-align: center;
  text-shadow: 1px 0px 10px rgba(0, 0, 0, 0.8);
  margin-bottom: 32px;
}

.login_title h1 {
  font-size: 1.75rem;
  margin-bottom: 0.725rem;
  margin-top: 0.5rem;
}

.login_title p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.login_buttons {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding-bottom: 1.5rem;
}

.login_button {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.725rem;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  color: #fff;
}
.login_button:hover {
  filter: brightness(1.1);
}
.login_button:active {
  filter: brightness(0.9);
}

.login_naver {
  background-color: #03c75a;
}
.login_naver img {
  filter: brightness(0) invert(1);
}

.login_kakao {
  background-color: #fee500;
  color: #000;
}

.login_terms {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 1.5rem 0;
}

.login_footer_links {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

.login_footer_links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.login_footer_links a:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* 약관 레이어 팝업 */
.p-modal-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 1000;
}
.p-modal {
  display: none;
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%) translateX(100%);
  width: 340px;
  height: 90vh;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0,0,0,0.3);
  flex-direction: column;
  transition: transform 0.3s ease-in-out;
  z-index: 1001;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  pointer-events: auto;
  color: #000;
}
.p-modal.show {
  display: flex;
  transform: translateY(-50%) translateX(0);
}
.p-modal-top {
  text-align: center;
  padding: 20px;
  font-size: 20px;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}
.p-modal-content {
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
}
.p-modal-bottom {
  padding: 20px;
  border-top: 1px solid #ddd;
  text-align: right;
}
.p-modal-bottom button {
  padding: 10px 20px;
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.terms-text {
  white-space: normal;
  word-break: keep-all;
  line-height: 1.6;
  overflow-x: hidden;
}

.privacy-policy {
  white-space: normal;
  line-height: 1.6;
  word-break: keep-word;
  font-size: 14px;
}

.privacy-policy table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

/* 프로필 이미지 업로드 진행 상태 표시 */
.upload-progress {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px;
  border-radius: 10px;
  z-index: 9999;
  display: none;
}

.upload-progress.show {
  display: block;
}

/* 보기 설정 팝업, 스텟 */
.view-stat {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
  gap: 12px 12px;
}

.view-stat li {
  width: calc(33.3333% - 8px); /* 한 줄에 3개 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  font-size: 14px;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  cursor: grab;
  transition: background 0.2s;
}

.view-stat li:nth-of-type(-n+5) {
  background-color: #1d3886;
  color: #fff;
}

.view-stat li:hover {
  background-color: #f9f9f9;
}

.view-stat li span:first-child {
  font-weight: bold;
  margin-bottom: 4px;
}

.dsp-none {
  display: none;
}

.dsp-block {
  display: block;
}

/* 햄버거 메뉴 */
.hamburger-btn {
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* 메뉴 기본 숨김 */
.side-menu {
    position: fixed;
    top: 60px;
    left: -250px;
    width: 160px;
    height: 200px;
    background-color: rgba(0, 0, 139, 0.7);
    color: white;
    overflow-y: auto;
    transition: left 0.3s ease;
    /* padding-top: 60px; */
    z-index: 1000;
}

/* 메뉴 보임 상태 */
.side-menu.open {
    left: 0;
}

.side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.side-menu a {
    display: block;
    padding: 15px;
    color: white;
    text-decoration: none;
}

.side-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

.highlight td {
    background-color: #e6f2ff;
    border: 2px solid #66b3ff;
    color: #004080;
    font-weight: bold;
}
/*
.highlight td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.highlight td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}
*/