.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.nav-tabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 3px solid #ff6b6b;
}

.nav-tab {
  flex: 1;
  text-align: center;
  padding: 15px 20px;
  background: white;
  border: none;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-tab.active {
  background: #ff6b6b;
  color: white;
}

.calendar-section {
  padding: 30px 0;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 10px;
}

.calendar-title {
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
}

.calendar-nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  padding: 2px 14px;
  border: 2px solid #333;
  background: #333;
  color: #fff !important;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  text-decoration: none;
}

.nav-btn:hover {
  background: #ff6b6b;
  border-color: #ff6b6b;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  background: #f7f7f7;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid #e9ecef;
}

.calendar-day {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  border: 1px solid #e9ecef;
  border-width: 1px 1px 0 0;
  background: white;
  font-size: 14px;
  font-weight: 400;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 20px;
  height: 70px;
}

.calendar-header-day {
  height: 38px;
  display: flex;
  background: #5e6c78;
  color: white;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #838c93;
  border-bottom: 0;
  border-left: 0;
  font-weight: bold;
  cursor: default;
}

.calendar-day.calendar-header-day:nth-child(7n) {
  border-right: none;
}

.calendar-day:nth-child(1),
.calendar-day:nth-child(2),
.calendar-day:nth-child(3),
.calendar-day:nth-child(4),
.calendar-day:nth-child(5),
.calendar-day:nth-child(6),
.calendar-day:nth-child(7) {
  border-top: none; /* 첫째 줄은 상단 보더 없음 */
}

.calendar-day:nth-child(7n) {
  /* 각 주의 마지막 날 (토요일) */
  border-right: none; /* 오른쪽 보더 없음 */
}
.calendar-day:nth-child(7n - 6) {
  /* 각 주의 첫 날 (일요일) */
  border-left: none; /* 왼쪽 보더 없음 */
}

/* 캘린더 전체 border-radius와 겹치는 모서리 셀의 보더 조정 */
.calendar-day:nth-child(1) {
  /* 첫 번째 요일 헤더 (일) */
  border-top-left-radius: 8px; /* .calendar의 border-radius보다 1px 작게 */
  border-left: none;
  border-top: none;
}
.calendar-day:nth-child(7) {
  /* 마지막 요일 헤더 (토) */
  border-top-right-radius: 8px;
  border-right: none;
  border-top: none;
}

.calendar-day.empty {
  background: #f7f7f7;
  cursor: default;
}

.calendar-day:hover:not(.calendar-header-day):not(.empty) {
  background: #e3f2fd;
  transform: scale(1.07);
  box-shadow: 0 2px 13px rgba(0, 0, 0, 0.05);
  z-index: 1;
  cursor: pointer;
}

.calendar-day.active-date {
  background: #e3f2fd;
}

.calendar-day.today {
  background: #ffe289;
  /* background: #ff6b6b; */
  color: white;
  /* animation: pulse 2s infinite; */
}

.calendar-day a {
  display: flex;
  width: 100%;
  padding: 5px 10px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
  }
}

.calendar-day.attended {
  background: #28a745;
  color: white;
}

.calendar-day.weekend {
  color: #dc3545;
}

.calendar-day.sunday {
  color: #dc3545;
}

.calendar-day.special {
  background: #ffc107;
  color: #000;
  font-weight: bold;
}

.attendance-form {
  padding: 20px 30px;
  border-radius: 0 0 15px 15px;
  margin-bottom: 30px;
  border: 1px solid #e9ecef;
}

.form-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #6c757d;
}

.form-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border: 2px solid #e9ecef !important;
  outline: 0;
  box-shadow: none;
}

.submit-btn {
  padding: 15px 30px;
  background: linear-gradient(135deg, #ff0000, #ff0000);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.attendance-list {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.list-header {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 40px 90px 120px 1fr 100px 50px;
  gap: 15px;
  font-weight: bold;
}

.list-item {
  padding: 15px 20px;
  display: grid;
  grid-template-columns: 40px 90px 120px 1fr 100px 50px;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.list-item:hover {
  background: #f8f9fa;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item.empty {
  background: #f8f9fa;
  grid-template-columns: 1fr;
  text-align: center;
}

.rank-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: bold;
  color: white;
}

.post-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 20px;
  letter-spacing: -1px;
  color: #ff0000;
}
.rank-1 {
  background: #ffd700;
  color: #000;
}
.rank-2 {
  background: #c0c0c0;
  color: #000;
}
.rank-3 {
  background: #cd7f32;
  color: #fff;
}
.rank-other {
  background: #6c757d;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.points {
  font-weight: bold;
  color: #28a745;
}

.time-info {
  color: #6c757d;
  font-size: 0.9rem;
}

.alert {
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 10px;
  font-weight: bold;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.calendar-info {
  background: #e3f2fd;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.calendar-info h3 {
  color: #1976d2;
  margin-bottom: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #ff6b6b;
}

.stat-label {
  color: #6c757d;
  margin-top: 5px;
}

/* 출석 정보 */
#fboardlist {
  margin-top: 30px;
}
.attendance-container {
  display: flex;
  justify-content: space-between;
  align-items: center; /* 오른쪽 요소 중앙 정렬 */
  background: #f9fafc;
  border: 1px solid #e9ecef;
  border-bottom: 4px solid #ff0000;
  padding: 20px;
  border-radius: 15px 15px 0 0;
}

.attendance-container .left-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.attendance-container .time-info {
  font-size: 14px;
  font-weight: 400;
}

.attendance-container .summary-info {
  font-size: 14px;
  font-weight: bold;
}

.attendance-container .summary-info span {
  margin-right: 10px;
  color: #4b5259;
}

.attendance-container .button-group {
  display: flex;
  gap: 10px;
}

.attendance-container .rank-button,
.attendance-container .point-button {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 12px;
  font-weight: 500;
  border: 2px solid transparent;
  background-color: white;
  cursor: pointer;
  white-space: nowrap;
}

.rank-button {
  color: #0077cc;
  border-color: #cbe4f9;
  box-shadow: 0 0 0 2px #cbe4f9;
}

.point-button {
  color: #c68600;
  border-color: #fce7ba;
  box-shadow: 0 0 0 2px #fce7ba;
}

/* 개근일 랭킹 모달 */
.check-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  /* display: flex; */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.check-modal-overlay.on {
  display: flex;
}

.check-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  border: 3px solid #e74c3c;
}

.check-modal-header {
  background-color: #fff;
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.check-modal-title {
  font-size: 24px;
  font-weight: bold;
  color: #e74c3c;
  margin-bottom: 10px;
}

.check-modal-subtitle {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 15px;
}

.check-modal-note {
  font-size: 12px;
  color: #999;
  margin-bottom: 20px;
}

.check-button-group {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.check-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.check-btn-current {
  background-color: #e74c3c;
  color: white;
}

.check-btn-current:hover {
  background-color: #c0392b;
}

.check-btn-all {
  background-color: #95a5a6;
  color: white;
}

.check-btn-all:hover {
  background-color: #7f8c8d;
}

.check-modal-body {
  overflow-y: auto;
}

.check-ranking-table {
  width: 100%;
}

.check-table-header {
  background-color: #34495e;
  color: white;
  display: flex;
  padding: 0;
}

.check-header-cell {
  padding: 12px;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
}

.check-rank-col {
  flex: 0 0 50px;
}

.check-name-col {
  flex: 1;
}

.check-days-col {
  flex: 0 0 80px;
}

.check-table-row {
  display: flex;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
}

.check-table-row:hover {
  background-color: #f8f9fa;
}

.check-table-cell {
  padding: 12px;
  font-size: 14px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-rank-cell {
  font-weight: bold;
  color: #e74c3c;
}

.check-rank-cell.check-top-3 {
  color: #f39c12;
}

.check-name-cell {
  font-weight: 500;
}

.check-days-cell {
  color: #2c3e50;
  font-weight: bold;
}

.check-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.check-close-btn:hover {
  background-color: #f0f0f0;
  color: #666;
}

/* 스크롤바 스타일링 */
.check-modal-body::-webkit-scrollbar {
  width: 6px;
}

.check-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.check-modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.check-modal-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

@media (max-width: 768px) {
  .calendar {
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
  }

  .calendar-day {
    min-height: 50px;
    font-size: 0.9rem;
  }

  .list-header,
  .list-item {
    grid-template-columns: 40px 1fr 80px 50px;
    gap: 10px;
    padding: 8px 10px;
  }

  .list-header > :nth-child(2),
  .list-header > :nth-child(4),
  .list-item > :nth-child(2),
  .list-item > :nth-child(4) {
    display: none;
  }

  .rank-badge {
    font-size: 10px;
  }
}

/* 반응형 */
@media (max-width: 480px) {
  .check-modal {
    width: 95%;
    margin: 10px;
  }

  .check-modal-title {
    font-size: 20px;
  }

  .check-table-cell,
  .check-header-cell {
    padding: 8px;
    font-size: 12px;
  }

  .calendar-title {
    font-size: 16px;
  }

  .calendar-nav {
    gap: 2px;
  }

  .nav-btn {
    padding: 2px 8px;
    font-size: 11px;
  }

  .calendar-day {
    height: 28px;
    min-height: 38px;
    font-size: 13px;
  }

  .calendar-day {
    height: 50px;
  }

  .day-number {
    font-size: 12px;
  }

  .post-count {
    right: 7px;
    bottom: 3px;
    font-size: 13px;
  }

  .attendance-container {
    flex-direction: column;
    padding: 20px 10px;
    align-items: center;
    gap: 10px;
  }

  .attendance-container .summary-info {
    font-size: 12px;
  }

  .attendance-container .left-info {
    align-items: center;
  }

  .attendance-container .summary-info span {
    margin-right: 5px;
  }

  .attendance-container .rank-button,
  .attendance-container .point-button {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 6px;
  }

  .attendance-form {
    padding: 15px 10px;
  }

  .user-avatar {
    display: none;
  }

  .form-group {
    gap: 5px;
  }

  .form-input {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
  }

  .submit-btn {
    padding: 5px 20px;
    border-radius: 4px;
    font-size: 14px;
  }

  .attendance-list {
    font-size: 13px;
  }
}
