

body {
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", sans-serif;
  transition:
    background 0.3s,
    color 0.3s;
}

html.light body {
  background-color: #f0f0f0;
  color: #222;
}

html.dark body {
  background-color: #666666;
  color: #fff;
}

/* 2. 상단바 (고정) */
.top-bar {
  position: fixed;
  top: 20px; /* 🚀 화면 상단에 고정 */
  left: 50%; /* 🚀 가로 중앙 정렬을 위해 50% 밀기 */
  transform: translateX(-50%); /* 🚀 가로 중앙 정렬 완벽하게 보정 */
  border-radius: 20px 20px;
  width: 95%;

  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding: 15px 20px 20px;
  box-sizing: border-box;
  background-color: #f0f0f0;
  box-shadow: 0 25px 25px rgba(0, 0, 0, 0.2);
}

html.dark .top-bar {
  background-color: #666666;
  box-shadow: 0 25px 25px rgba(0, 0, 0, 0.5);
}

.top-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.session-info {
  margin-top: 2px;
  font-size: 0.85rem;
  text-align: right;
  font-weight: bold;
}

/* 3. 본문 영역 (스크롤) */
.main-container {
  flex: 1;
  overflow-y: auto;
  padding: 140px 20px;
  text-align: center;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

/* 4. 버튼 그리드 수정: 한 줄로 세우기 */
.button-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto 40px;
}

.button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  /* width: 100%; 너비를 꽉 채워 중앙 정렬 보조 */
}

.portal-button {
  width: 220px; /* 버튼 길이를 조금 더 시원하게 조절 */
  padding: 16px;
  text-align: center;
  background: #1e88e5;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  transition:
    background 0.3s,
    transform 0.2s;
}

.portal-button:hover {
  background: #1565c0;
  transform: translateY(-2px);
}

/* 제목 및 기타 스타일 */
.title {
  font-size: 2em;
  margin-bottom: 40px;
}

.mode-toggle {
  background: white;
  color: black;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}

.tooltip {
  font-size: 13px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #888;
}

.button-wrapper:hover .tooltip {
  opacity: 1;
}

html.dark .session-info {
  color: #ffffff;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    opacity: 1;
  }
}

.extend-warning {
  animation: blink 1s infinite;
  background: #ff4d4d !important;
  color: white !important;
}
