/* º¯¼ö ¼³Á¤ - ±âÁ¸ Å×¸¶ À¯Áö */
:root {
	--main: #2563eb;
	--main-dark: #1e40af;
	--bg: #f4f6f8;
	--card: #ffffff;
	--text: #111827;
	--sub: #6b7280;
	--success: #22c55e;
}

*{box-sizing:border-box}

body { margin: 0; background: var(--bg); font-family: -apple-system, sans-serif; padding-bottom: 80px; color: var(--text); }

/* ======================
   °øÅë
====================== */
/* ======================
   ÇÁ¸®¹Ì¾ö Çì´õ µðÀÚÀÎ
====================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1100;

  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;

  /* ¸ÞÀÎ ºí·ç ±×¶óµ¥ÀÌ¼Ç (³Ê¹« ¾îµÓÁö ¾ÊÀº ¼¼·ÃµÈ ºí·ç) */
  background: linear-gradient(135deg, #2563eb, #3b82f6); 
  color: #ffffff;

  font-size: 19px; /* Á¶±Ý ´õ ½Ã¿øÇÏ°Ô Å°¿ò */
  font-weight: 800;
  letter-spacing: -0.8px;

  /* ÇÏ´Ü ±×¸²ÀÚ¸¦ ºí·ç ÅæÀ¸·Î ÀºÀºÇÏ°Ô */
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.15);
  
  /* Å×µÎ¸® µÕ±Û±â (¼±ÅÃ »çÇ×: ÇÏ´Ü¸¸ »ìÂ¦ µÕ±Û°Ô ÇÏ¸é ´õ ¾Û °°À½) */
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;

  /* »ó´Ü µðÅ×ÀÏ ¶óÀÎ */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Çì´õ ÅØ½ºÆ®¿¡ ÀºÀºÇÑ ºû È¿°ú */
.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;
}


.wrap{padding:16px}

.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;
  justify-content:center;
  align-items:center;
  background:linear-gradient(180deg,#1e3a8a,#2563eb);
}

.login-box{
  width:100%;
  max-width:360px;
  background:#fff;
  border-radius:20px;
  padding:26px;
  box-shadow:0 20px 50px rgba(0,0,0,.25);
}

.login-title{
  text-align:center;
  font-size:24px;
  font-weight:800;
  margin-bottom:20px;
}

.login-box input{
  width:100%;
  padding:14px;
  border-radius:12px;
  border:1px solid #d1d5db;
  font-size:15px;
  margin-bottom:14px;
}

.login-box button{
  width:100%;
  padding:14px;
  border:none;
  border-radius:14px;
  background:var(--main);
  color:#fff;
  font-size:16px;
  font-weight:700;
}

.login-box button:active{
  transform:scale(.98);
}

.login-error{
  text-align:center;
  color:var(--danger);
  margin-top:10px;
  font-size:14px;
}

/* ======================
   ·©Å·
====================== */
.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: 16px;       /* ¹Ù´Ú¿¡¼­ »ìÂ¦ ¶ç¿ò */
    left: 16px;
    right: 16px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9); /* »ìÂ¦ Åõ¸í */
    backdrop-filter: blur(12px);         /* ¹è°æ Èå¸² È¿°ú */
    display: flex;
    padding: 0 8px;
    border-radius: 20px;                 /* µÕ±Û°Ô */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); /* ±íÀÌ°¨ ÀÖ´Â ±×¸²ÀÚ */
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
}

.tabbar .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #9ca3af;
    font-size: 11px;    /* ÅØ½ºÆ® Å©±â ÃÖÀûÈ­ */
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    gap: 2px;
}

/* È°¼º ÅÇ ½ºÅ¸ÀÏ */
.tabbar .tab.active {
    color: var(--main); /* ÆÄ¶õ»ö °­Á¶ */
}

/* ½½¶óÀÌµù ÀÎµðÄÉÀÌÅÍ (¹è°æ ¹Ú½º) */
.tab-indicator {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 8px;
    width: 0;
    background: #eff6ff; /* ¾ÆÁÖ ¿¬ÇÑ ÆÄ¶õ»ö ¹è°æ */
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* ¾ÆÀÌÄÜ ´ë¿ë Æ÷ÀÎÆ® (¼±ÅÃ »çÇ×: ÅØ½ºÆ® À§¿¡ ÀÛÀº Á¡) */
.tab.active::after {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--main);
    border-radius: 50%;
    margin-top: 2px;
}


/* ======================
   ·©Å· ½ºÅ©·Ñ ¿µ¿ª
====================== */
.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{
  background:linear-gradient(135deg,#2563eb,#1e40af);
  color:#fff;
  border:none;
  border-radius:14px;
  padding:10px 16px;
  font-size:14px;
  font-weight:700;
  box-shadow:0 6px 16px rgba(37,99,235,.35);
  cursor:pointer;
  transition:all .2s ease;
}

.btn-primary:active{
  transform:scale(.96);
  box-shadow:0 4px 10px rgba(37,99,235,.25);
}

/* ======================
   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: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card);
    border-radius: 18px;
    padding: 16px 10px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.03);
}

.stat-card .v {
    font-size: 22px; /* 3Ä­ÀÏ ¶§´Â 22-24pxÀÌ Àû´çÇÕ´Ï´Ù */
    font-weight: 900;
    color: var(--main); /* ¼ýÀÚ¿¡ °­Á¶»ö ºÎ¿© */
    margin-bottom: 4px;
    line-height: 1.2;
}

.stat-card .label {
    font-size: 11px;
    font-weight: 600;
    color: var(--sub);
    letter-spacing: -0.5px;
    white-space: nowrap; /* ±ÛÀÚ°¡ ±úÁöÁö ¾Ê°Ô ÇÑ ÁÙ À¯Áö */
}

/* ÃÑ °æ±â¼ö Ä«µå °­Á¶ (¼±ÅÃ »çÇ×) */
.stat-card:last-child {
    background: linear-gradient(135deg, #ffffff, #f0f7ff);
}
.stat-card:last-child .v {
    color: var(--main-dark);
}


.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; }
