body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  /* 필요한 경우 스크롤이 생기도록 설정 */
}

.container-fluid {
  display: flex;
  flex-wrap: wrap;
  height: 100%;
  /* 컨테이너가 전체 높이를 차지하도록 설정 */
  overflow-y: auto;
  /* 세로 스크롤바 추가 */
}

.grid-item {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #ccc;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  width: calc(50% - 1px);
  /* 두 개의 그리드 아이템이 가로로 맞도록 설정 */
  height: calc((100vw / 2) * 0.75);
  /* 두 개의 그리드 아이템이 세로로 맞도록 설정 */
}

@media (max-width: 900px) {
  .grid-item {
    width: 100%;
    /* 화면이 작을 때 각 그리드 아이템이 전체 너비를 차지하도록 설정 */
    height: calc((100vw) * 0.75);
    /* 화면이 작을 때 각 그리드 아이템이 전체 높이의 절반을 차지하도록 설정 */
  }
}

.grid-item-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

#grid-item-1,
#grid-item-2,
#grid-item-3,
#grid-item-4 {
  background-color: #1a1a1a;
  color: white;
  text-align: center;
}

#grid-item-1-1,
#grid-item-1-2 {
  flex: 1;
  width: 100%;
  height: 50%;
  display: flex;
  flex-direction: column;
  /* 세로로 정렬 */
  justify-content: center;
  align-items: center;
  border-bottom: none;
  /* 구분선 제거 */
}

#date {
  font-size: clamp(16px, 2vw, 24px);
  color: white;
  margin-bottom: 10px;
  /* 날짜를 시간 위로 배치 */
}

#time {
  font-size: clamp(40px, 10vw, 120px);
  display: flex;
  align-items: baseline;
  flex-direction: row;
  /* 시간과 초를 가로로 정렬 */
}

.hours-minutes {
  color: #ffcc00;
  font-weight: bold;
}

.seconds {
  color: white;
  font-size: 0.5em;
  margin-left: 5px;
}

.fullscreen-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  cursor: pointer;
  font-size: 20px;
  display: block;
}

.fullscreen-button:hover {
  background-color: darkblue;
}
.fullscreen-button2 {
  position: absolute;
  top: 10px;
  right: 40px;
  width: 40px;
  height: 40px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  cursor: pointer;
  font-size: 20px;
  display: block;
}

.fullscreen-button2:hover {
  background-color: darkblue;
}

.hide-button {
  display: none;
}

.show-cursor {
  cursor: default;
}

.fullscreen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background-color: black;
  /* 필요시 추가, 백그라운드 컬러 */
  overflow: auto;
  /* 필요한 경우 스크롤이 생기도록 설정 */
  display: flex;
  justify-content: center;
  /* 가운데 정렬 */
  align-items: center;
  /* 가운데 정렬 */
}

.grid-item.fullscreen .grid-item-content {
  width: 100%;
  height: 100%;
}

.grid-item.fullscreen #location {
  flex-direction: row;
  /* 태극기와 텍스트를 가로로 정렬 */
  align-items: center;
}

.grid-item.fullscreen #time {
  flex-direction: row;
  /* 시간과 초를 가로로 정렬 */
  justify-content: center;
  align-items: baseline;
}

.grid-item.fullscreen>* {
  flex: 1 0 auto;
  /* 자식 요소가 부모의 높이를 채우도록 설정 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
}

.grid-item.fullscreen #location img {
  max-height: 10%;
  /* 화면 비율에 맞게 이미지 크기 조정 */
}

.grid-item.fullscreen #time {
  font-size: calc(5vw + 5vh);
  /* 화면 크기에 맞게 폰트 크기 조정 */
}

.grid-item.fullscreen #date,
.grid-item.fullscreen #server-time,
.grid-item.fullscreen #offset {
  font-size: calc(2vw + 2vh);
  /* 화면 크기에 맞게 폰트 크기 조정 */
}

.button-group {
  display: flex;
  justify-content: center;
  /* 버튼들을 가로로 중앙에 정렬 */
  gap: 10px;
  /* 버튼 간격을 조정 (필요에 따라 조정 가능) */
  flex-wrap: wrap;
  /* 작은 화면에서 버튼들이 줄바꿈되도록 설정 */
}

.button-group .btn {
  flex: 1;
  /* 버튼들이 같은 너비를 가지도록 설정 */
  max-width: 200px;
  /* 버튼의 최대 너비 설정 (필요에 따라 조정 가능) */
  margin: 10px 0;
  /* 상하 간격 설정 */

}

.text-below-image {
  font-size: 50vw;
  /* 화면 너비의 5%에 해당하는 크기로 설정 */
  margin-top: 10px;
  /* 이미지와 텍스트 간의 여백 설정 */
  text-align: center;
  /* 가운데 정렬 */
  color: #000;
  /* 텍스트 색상 설정, 필요에 따라 변경 가능 */
}

/* Panel Container Styles */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: sans-serif;
}

.panel-container {
    display: grid;
    height: 100vh;
    width: 100vw;
    background-color: #f0f0f0;
    position: relative;
}

/* Grid Resizer Styles */
.grid-resizer {
    position: absolute;
    background: transparent;
    z-index: 10000;
    display: none;
}

.grid-resizer::after {
    content: '';
    position: absolute;
    background: #666;
    transition: background 0.2s;
}

.grid-resizer:hover::after {
    background: #999;
}

.grid-resizer.resizing::after {
    background: #333;
}

.grid-resizer-horizontal {
    cursor: col-resize;
    width: 20px;
    height: 100%;
    right: 50%;
    transform: translateX(10px);
}

.grid-resizer-horizontal::after {
    width: 4px;
    height: 100%;
    left: 8px;
}

.grid-resizer-vertical {
    cursor: row-resize;
    height: 20px;
    width: 100%;
    top: 50%;
    transform: translateY(-10px);
}

.grid-resizer-vertical::after {
    height: 4px;
    width: 100%;
    top: 8px;
}

.resize-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.resize-overlay.active {
    display: block;
}

/* Panel Styles */
.panel {
    border: 1px solid #ccc;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

/* Panel Tabs Styling */
.panel-tabs {
    display: flex;
    background-color: #eee;
    border-bottom: 1px solid #ccc;
    overflow-x: auto;
}

.panel-tab-button {
    padding: 8px 12px;
    cursor: pointer;
    border: none;
    background-color: #eee;
    font-size: 0.9em;
    white-space: nowrap;
    border-right: 1px solid #ccc;
}

.panel-tab-button:last-child {
    border-right: none;
}

.panel-tab-button.active {
    background-color: #fff;
    font-weight: bold;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

.panel-tab-button:hover:not(.active) {
    background-color: #ddd;
}

/* Panel Content Styling */
.panel-content {
    position: relative;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-content iframe {
    flex: 1;
    width: 100% !important;
    height: 100% !important;
    border: none;
    margin: 0;
    padding: 0;
    display: block;
}

/* Race Monitor Styles */
.race-monitor-embed {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.race-monitor-embed > * {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    transform: scale(1) !important;
}

/* Notice Modal Styles */
.notice-modal {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8vh;
    background: rgba(0, 0, 0, 0.8);
    color: #FFD700 !important;
    padding: 10px;
    z-index: 10000;
    text-align: left;
    font-size: min(5vh, 28px);
    line-height: 1.3;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
    justify-content: center;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 350;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notice-modal.show {
    display: flex;
}

/* Media Queries */
@media (orientation: landscape) {
    .panel-container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "panel2 panel1";
    }
    #panel-1 { 
        grid-area: panel1;
        width: 100%;
    }
    #panel-2 { 
        grid-area: panel2;
        width: 100%;
    }
    .grid-resizer-horizontal { display: block; }
    .grid-resizer-vertical { display: none; }
}

@media (orientation: portrait) {
    .panel-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        grid-template-areas: 
            "panel2"
            "panel1";
    }
    #panel-1 { 
        grid-area: panel1;
        width: 100%;
    }
    #panel-2 { 
        grid-area: panel2;
        width: 100%;
    }
    .panel-content,
    .panel-content iframe {
        width: 100%;
        min-width: 100%;
    }
    .grid-resizer-horizontal { display: none; }
    .grid-resizer-vertical { display: block; }
}

/* ===== 심사위원 공지(simsa.html) 스타일 ===== */
.simsa-container {
  max-width: 480px;
  margin: 40px auto 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 32px 18px 32px 18px;
}
.simsa-title {
  font-size: 1.7em;
  font-weight: bold;
  margin-bottom: 18px;
  text-align: center;
}
.simsa-subtitle {
  font-size: 1.1em;
  font-weight: 600;
  margin: 32px 0 12px 0;
  color: #2d7cff;
}
.notice-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.notice-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d0d4db;
  border-radius: 6px;
  font-size: 1em;
  outline: none;
  transition: border 0.2s;
}
.notice-input:focus {
  border: 1.5px solid #2d7cff;
}
.notice-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(45,124,255,0.08);
}
.notice-btn-add {
  background: linear-gradient(90deg, #2d7cff 60%, #5bb6ff 100%);
  color: #fff;
}
.notice-btn-add:hover {
  background: linear-gradient(90deg, #1a5dcc 60%, #2d7cff 100%);
}
.notice-btn-del {
  background: #fff0f0;
  color: #e74c3c;
  border: 1px solid #ffd6d6;
  margin-top: 10px;
}
.notice-btn-del:hover {
  background: #ffeaea;
  color: #c0392b;
}
.card-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.card {
  background: #f9fbff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(45,124,255,0.08);
  padding: 18px 16px 12px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 70px;
}
.card:not(:last-child) {
  border-bottom: 1.5px solid #e6eaf3;
}
.card-date {
  font-size: 0.92em;
  color: #7a869a;
  margin-bottom: 6px;
}
.card-content {
  font-size: 1.13em;
  color: #222;
  margin-bottom: 8px;
  word-break: break-all;
}
.card-empty {
  background: #f5f6fa;
  color: #b0b5be;
  text-align: center;
  font-size: 1.1em;
  border-radius: 10px;
  box-shadow: none;
  padding: 24px 0;
}
@media (max-width: 600px) {
  .simsa-container {
    max-width: 98vw;
    padding: 16px 2vw 24px 2vw;
  }
  .card {
    padding: 12px 6px 8px 10px;
  }
  .notice-btn {
    padding: 8px 10px;
    font-size: 0.98em;
  }
}