/* static/css/styles.css */

/* 기본 설정 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans KR", sans-serif;
  background-color: #121212; /* 다크 테마 배경 */
  color: #e0e0e0; /* 밝은 회색 텍스트 */
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: #00bcd4; /* 밝은 파란색 링크 */
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Header */
.site-header {
  position: relative;
  z-index: 1000;
}

header {
  background-color: #1f1f1f; /* 어두운 헤더 */
  padding: 10px 0;
  border-bottom: 1px solid #333;
}

header .logo a {
  font-size: 1.8rem;
  font-weight: 500;
  color: #00bcd4; /* 로고의 네온 파란색 느낌 */
}

header .nav-links {
  list-style: none;
  display: flex;
  justify-content: flex-end;
}

header .nav-links li {
  margin-left: 30px;
}

header .nav-links li a {
  font-size: 1rem;
  font-weight: 400;
  color: #e0e0e0;
  transition: color 0.3s ease-in-out;
}

header .nav-links li a:hover {
  color: #00bcd4; /* 링크에 네온 효과 */
}

/* Main Content */
main {
  padding: 40px 0;
}

main h1,
main h2,
main h3 {
  color: #e0e0e0;
}

p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Footer */
footer {
  background-color: #1f1f1f;
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid #333;
}

footer p {
  color: #e0e0e0;
}

/* 네온 스타일 버튼 */
button,
.btn {
  background-color: #00bcd4;
  color: #121212;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

button:hover,
.btn:hover {
  background-color: #0097a7; /* 어두운 파란색으로 hover 효과 */
}

/* Hero Section */
.hero {
  text-align: center; /* 텍스트 가운데 정렬 */
  background-color: #1f1f1f;
  color: #e0e0e0;
  padding: 30px 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 40px;
}

.hero .btn {
  padding: 15px 30px;
  font-size: 1.2rem;
}

/* Features Section */
.features {
  background-color: #121212;
  padding: 60px 0;
  color: #e0e0e0;
}

.features h2 {
  text-align: center;
  margin-bottom: 40px;
}

.feature-list {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.feature-item {
  background-color: #1f1f1f;
  padding: 20px;
  border-radius: 8px;
  flex: 1;
  text-align: center;
}

.feature-item h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.feature-item p {
  font-size: 1.1rem;
}

/* Form Styles */
form {
  margin: 20px auto;
  background-color: #1f1f1f;
  border-radius: 8px;
}

form p {
  color: #e0e0e0;
}

form label {
  margin: 5px;
  color: #e0e0e0;
}

form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: none;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
}

form button {
  width: 100%; /* 버튼도 전체 너비 사용 */
  padding: 12px 20px;
  font-size: 1.1rem;
  background-color: #00bcd4;
  color: #121212;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}
form button:hover {
  background-color: #0097a7;
}

/* 로그인 폼 중앙 정렬 */
.auth-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 80vh; /* 화면 높이의 80% 차지하여 중앙에 배치 */
  text-align: center;
}

.auth-container h2 {
  margin-bottom: 20px;
  color: #e0e0e0;
}

.auth-container form {
  max-width: 400px;
  width: 100%;
  background-color: #1f1f1f;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.auth-container p {
  color: #e0e0e0;
}

.auth-container a {
  color: #00bcd4;
  text-decoration: none;
}

.auth-container a:hover {
  text-decoration: underline;
}

.auth-container form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: none;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
}

.auth-container form button {
  width: 100%;
  padding: 10px;
  background-color: #00bcd4;
  color: #121212;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.auth-container form button:hover {
  background-color: #0097a7;
}

#username-message {
  font-size: 0.9rem;
  margin-top: 5px;
}

/* 헤더 내의 컨테이너를 수평 정렬 */
nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

/* 네비게이션 링크도 수평으로 나열 */
nav .nav-links {
  display: flex;
  gap: 20px;
}

/* 사용자 정보와 로그아웃 버튼을 수평 정렬 */
nav .user-section {
  display: flex;
  align-items: center;
  gap: 10px; /* 사용자 이름과 로그아웃 버튼 사이에 간격 */
}

/* 로그아웃 버튼 스타일 */
nav .user-section .btn {
  background-color: #00bcd4;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

nav .user-section .btn:hover {
  background-color: #0097a7;
}

/* 사용자 이름 텍스트 스타일 */
nav .welcome-text {
  font-size: 1rem;
  color: white;
}

.level-beginner {
  color: #00c261; /* 파란색 */
}
.level-bronze {
  color: #cd7f32; /* 청동색 */
}
.level-silver {
  color: #c0c0c0; /* 은색 */
}
.level-gold {
  color: #ffd700; /* 금색 */
}
.level-diamond {
  color: #00ffe4; /* 다이아몬드색 */
}
.level-master {
  color: #ff4500; /* 빨간색 */
}
.list-group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-title {
  font-weight: bold;
  color: #00bcd4;
}

.post-info {
  color: #888;
  font-size: 0.9rem;
}

.post-info .author {
  margin-right: 10px;
  font-weight: 500;
}

.post-info .date {
  font-size: 0.8rem;
  color: #999;
}

.board-actions {
  display: flex;
  justify-content: flex-end;
}

.board-actions .btn {
  margin-bottom: 10px;
}

.board-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.board-list {
  list-style: none;
  padding: 0;
}

.board-item {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.post-title {
  font-size: 1.2rem;
  font-weight: bold;
}

.post-info {
  display: flex;
  gap: 15px;
  font-size: 0.9rem;
  color: #888;
}

.post-comments {
  color: red;
}

.post-section {
  padding: 40px 0;
  background-color: #1f1f1f;
  color: #e0e0e0;
}

.post-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.post-info {
  color: #999;
  font-size: 0.9rem;
}

.post-image img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.6;
}

.comments-section h2 {
  margin-top: 40px;
}

.comments-list {
  list-style: none;
  padding-left: 0;
}

.comment-item {
  border-bottom: 1px solid #333;
  padding: 10px 0;
}

.comment-item strong {
  color: #00bcd4;
}

textarea {
  width: 100%; /* 너비를 부모 요소만큼 설정 */
  height: 200px; /* 원하는 높이로 설정 (조절 가능) */
  padding: 10px; /* 내부 여백 */
  font-size: 1rem; /* 글씨 크기 */
  border: 1px solid #ccc; /* 테두리 색상 */
  border-radius: 5px; /* 모서리를 둥글게 */
  background-color: #333; /* 어두운 배경 */
  color: #fff; /* 글씨 색상 */
  resize: none; /* 사용자가 크기 조절 못하게 설정 */
}
.btn {
  background-color: #00bcd4;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn:hover {
  background-color: #0097a7;
}

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

.profile-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}
/* post-comment-form의 max-width 설정 */
.post-comment-form {
  padding: 0px;
  max-width: 100%; /* 전체 너비 사용 */
  width: 100%; /* 추가적으로 너비 설정 */
}

/* 필요시 다른 스타일 추가 가능 */
.post-comment-form textarea {
  height: 100px; /* 텍스트 박스 높이 설정 */
}
#drop-zone {
  border: 2px dashed #00bcd4;
  padding: 50px;
  text-align: center;
  margin: 20px 0;
}

#drop-zone.drag-over {
  background-color: #f0f0f0;
}

#file-list {
  list-style-type: none;
  padding: 0;
}

#file-list li {
  margin: 5px 0;
}

.custom-title {
  width: 100%;
  padding: 10px;
  border: 2px solid #00bcd4;
  border-radius: 5px;
  font-size: 1.2rem;
}

.custom-textarea {
  width: 100%;
  height: 300px;
  padding: 10px;
  border: 2px solid #00bcd4;
  border-radius: 5px;
  font-size: 1rem;
}

.form-group {
  margin-bottom: 20px;
}

label {
  font-weight: bold;
  margin-bottom: 5px;
  display: block;
}

.solved-problem a {
  color: #54f454; /* Green text */
}

.progress-summary {
  padding: 20px;
  margin-top: 20px;
  text-align: center;
}
.progress-summary h2 {
  margin-bottom: 10px;
}

.problem-form {
  max-width: 100%;
}

#test-cases h4 {
  font-size: 1.2rem; /* 헤딩 크기 줄이기 */
  margin-top: 10px;
  margin-bottom: 10px;
}

#test-cases .form-group label {
  font-size: 0.9rem; /* 레이블 크기 줄이기 */
}

#test-cases .custom-textarea {
  width: 100%; /* 텍스트 영역 너비 유지 */
  height: 50px; /* 텍스트 영역 높이 줄이기 */
  padding: 5px; /* 내부 여백 줄이기 */
  font-size: 0.9rem; /* 글자 크기 줄이기 */
  resize: vertical; /* 수직으로만 크기 조절 가능하도록 설정 */
  box-sizing: border-box;
}

#test-cases-container .test-case {
  margin-bottom: 10px; /* 각 테스트 케이스 간의 간격 */
}

#test-cases-container label {
  font-size: 0.9rem; /* 레이블의 글자 크기 줄이기 */
  margin-bottom: 3px; /* 레이블과 textarea 사이의 간격 */
}

#test-cases-container .custom-textarea {
  width: 100%; /* 텍스트 영역 너비 유지 */
  height: 50px; /* 텍스트 영역 높이 줄이기 */
  padding: 5px; /* 내부 여백 줄이기 */
  font-size: 0.9rem; /* 글자 크기 줄이기 */
  resize: vertical; /* 수직으로만 크기 조절 가능하도록 설정 */
  box-sizing: border-box;
}

/* 마이페이지 전체 스타일 */
.my-page {
  background-color: #222; /* 배경을 어두운 색으로 설정 */
  color: #ddd; /* 텍스트 색상을 밝게 설정 */
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  margin: auto;
}

.page-title {
  font-size: 2rem;
  color: #a0c4ff; /* 주요 제목 색상 */
  text-align: center;
  margin-bottom: 20px;
}

.user-info p {
  margin: 5px 0;
  font-size: 1.1rem;
}

.section-title {
  margin-top: 20px;
  color: #ffb6b9; /* 섹션 제목 색상 */
}

.solved-problems-list {
  list-style-type: none;
  padding: 0;
}

.solved-problems-list li {
  margin: 5px 0;
}

.solved-problems-list li a {
  color: #89cff0; /* 문제 링크 색상 */
  text-decoration: none;
  transition: color 0.3s;
}

.solved-problems-list li a:hover {
  color: #ffb6b9; /* 링크 호버 색상 */
}

.student-data-btn {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s;
}

.student-data-btn:hover {
  background-color: #45a049; /* 버튼 호버 색상 */
}

/* 학생 목록 페이지 전체 스타일 */
.student-list-page {
  background-color: #222;
  color: #ddd;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  margin: auto;
}

.page-title {
  font-size: 2rem;
  color: #a0c4ff;
  text-align: center;
  margin-bottom: 20px;
}

.student-list {
  list-style-type: none;
  padding: 0;
}

.student-item {
  padding: 10px;
  margin: 5px 0;
  border-bottom: 1px solid #333;
}

.student-link {
  color: #89cff0;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s;
}

.student-link:hover {
  color: #ffb6b9;
}

/* 학생 문제 풀이 페이지 전체 스타일 */
.student-solved-page {
  background-color: #222;
  color: #ddd;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  margin: auto;
}

.page-title {
  font-size: 1.8rem;
  color: #a0c4ff;
  text-align: center;
  margin-bottom: 20px;
}

.solved-problem-list {
  list-style-type: none;
  padding: 0;
}

.solved-problem-item {
  padding: 10px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.problem-link {
  color: #89cff0;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s;
}

.problem-link:hover {
  color: #ffb6b9;
}

.solved-time {
  font-size: 0.9rem;
  color: #aaa;
}

.no-record {
  text-align: center;
  color: #777;
  font-size: 1rem;
  margin-top: 20px;
}

.content-section {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 2rem auto;
  padding: 0 15px; /* 모바일에서 좌우 여백 추가 */
}

.progress-summary {
  width: 60%;
  background-color: #222;
  color: #ddd;
  padding: 20px;
  border-radius: 8px;
}

.ranking {
  width: 50%;
  background-color: #333;
  color: #f0f0f0;
  padding: 20px;
  margin-left: 20px;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
}

.ranking-container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  overflow-x: auto; /* 테이블이 넘칠 경우 스크롤 생성 */
}

.ranking h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: clamp(1.2rem, 4vw, 1.8rem); /* 반응형 폰트 크기 */
}

.ranking-subsection-title {
  margin-top: 32px;
}

.table {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
}

.table thead th {
  background-color: #555;
  color: #f0f0f0;
  padding: 10px;
  font-weight: bold;
  text-align: center;
}

.table tbody tr {
  background-color: #444;
  transition: background 0.3s;
}

.table tbody tr:hover {
  background-color: #555;
}

.table td {
  padding: 10px;
  color: #fff;
  text-align: center;
  border-bottom: 1px solid #666;
}

.container {
  margin: 0 auto;
  padding: 20px;
}

.problem-title {
  font-size: 2rem;
  font-weight: bold;
  color: #eeeeee;
  margin-bottom: 15px;
}

.problem-description {
  font-size: 1.1rem;
  color: #ddd;
  margin-top: 30px;
  margin-bottom: 20px;
  min-height: 300px;
}

.example-section {
  width: 100%;
  margin-top: 20px;
  padding: 20px;
  background-color: #333;
  border-radius: 8px;
}

.example-pair {
  margin-bottom: 20px;
}

.example-content {
  background-color: #444;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 5px;
  color: #f0f0f0;
}
.copy-link {
  text-decoration: underline;
  cursor: pointer;

  margin-bottom: 10px;
}
.example-header {
  display: flex;
  align-items: center;
  gap: 8px; /* 제목과 복사 링크 사이 간격 */
}
.copy-link:hover {
  color: #7ebbfd;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.solved-info {
  margin-top: 20px;
  padding: 20px;
  background-color: #121212;
  border-radius: 8px;
}

.code-input {
  width: 100%; /* 너비를 컨테이너에 맞춤 */
  height: 100px; /* 높이를 원하는 크기로 설정 */
  font-size: 1rem;
  padding: 10px;
  border-radius: 5px;
  background-color: #333; /* 배경색 변경 */
  color: #fff; /* 텍스트 색상 */
  border: none;
}
#input-data {
  height: auto;
}
.execute-btn {
  width: 20%;
  margin-top: 10px;
  padding: 10px;
  background-color: #d7870f; /* 버튼 색상 */
}
.execute-btn:hover {
  background-color: #a96d12;
}
.submit-btn {
  width: 20%;
  margin-top: 10px;
  padding: 10px;
  background-color: #28a745; /* 버튼 색상 */
  color: #fff;
  border: none;
  border-radius: 5px;
}
.submit-button-container {
  text-align: right; /* 버튼을 가운데로 정렬 */
  background-color: #121212;
}
.submit-btn:hover {
  background-color: #218838; /* 호버 효과 */
}

.example-section {
  margin-top: 20px;
  padding: 20px;
  background-color: #333;
  border-radius: 8px;
}

.example-pair {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.example-item {
  flex: 1;
}

.example-item h4 {
  margin-bottom: 5px;
  color: #f0f0f0;
}

.example-content {
  background-color: #444;
  padding: 10px;
  border-radius: 5px;
  color: #f0f0f0;
  white-space: pre-wrap;
}

/* 카드 스타일 */
.result-card {
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  background-color: #2a2a2a;
}

.result-header {
  background-color: #1f1f1f;
  padding: 16px;
  border-bottom: 1px solid #333;
}

.result-header h2 {
  margin: 0;
  color: #53d8fb; /* 청록색 텍스트 */
  font-size: 1.5em;
}

/* 코드 섹션 스타일 */
.code-section {
  margin: 20px 0;
}

.code-section h4 {
  margin-bottom: 8px;
  color: #e0e0e0;
}

.user-code {
  height: 300px;
  background-color: #222;
  padding: 15px;
  border-radius: 4px;
  border: 1px solid #444;
  font-family: monospace;
  color: #53d8fb; /* 청록색 코드 */
  white-space: pre-wrap;
  overflow-x: auto;
}

/* 결과 섹션 스타일 */
.result-section h4 {
  margin-bottom: 8px;
  color: #e0e0e0;
}

.result-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.result-item {
  padding: 10px;
  border-bottom: 1px solid #333;
  color: #e0e0e0;
}

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

/* 결과가 없을 때 */
.no-results {
  color: #999;
  font-style: italic;
}

/* 버튼 섹션 스타일 */
.button-section {
  text-align: center;
  margin-top: 20px;
}

.back-button {
  display: inline-block;
  margin-left: 10px;
  padding: 10px 20px;
  color: #fff;
  background-color: #00bcd4; /* 파란색 버튼 */
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold; /* 글자 굵게 추가 */
  transition: background-color 0.3s ease;
}

.back-button:hover {
  background-color: #40a6c7; /* 호버 시 더 진한 파란색 */
}

.login-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 20px;
  background-color: #2a2a2a;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* 제목 스타일 */
.login-title {
  color: #53d8fb;
  margin-bottom: 20px;
  font-size: 1.8em;
  font-weight: bold;
}

.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.login-form {
  width: 90%;
  padding: 10px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #e0e0e0;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 10px;
  background-color: #1f1f1f;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 4px;
}

/* 로그인 버튼 스타일 */
.btn-login {
  width: 100%;
  padding: 12px;
  background-color: #53d8fb;
  color: #1b1b1b;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease;
  margin-top: 15px;
}

.btn-login:hover {
  background-color: #40a6c7; /* 버튼 호버 색상 */
}

/* 회원가입 링크 스타일 */
.signup-text {
  margin-top: 15px;
  color: #e0e0e0;
}

.signup-link {
  color: #53d8fb;
  text-decoration: none;
}

.signup-link:hover {
  text-decoration: underline;
}

/* 회원가입 컨테이너 */
.signup-container {
  max-width: 500px;
  margin: 100px auto;
  padding: 40px;
  background-color: #2a2a2a;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* 제목 스타일 */
.signup-title {
  color: #53d8fb;
  margin-bottom: 25px;
  font-size: 2em;
  font-weight: bold;
}

/* 폼 그룹 및 입력 필드 */
.form-group {
  margin-bottom: 20px;
  text-align: center; /* 필드 중앙 정렬 */
  padding-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #e0e0e0;
  font-weight: bold;
  text-align: left; /* 레이블은 왼쪽 정렬 */
  width: 80%; /* 레이블도 입력 필드와 같은 너비로 제한 */
  margin: 0 auto;
}

.form-group input,
.form-group select {
  width: 80%; /* 입력 필드 너비를 80%로 설정 */
  padding: 12px;
  background-color: #1f1f1f;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 1.1em;
  margin: 0 auto; /* 입력 필드를 중앙으로 
    정렬 */
  margin-top: 5px;
  display: block;
}

/* 회원가입 버튼 스타일 */
.btn-signup {
  width: 80%; /* 버튼도 80%로 설정 */
  padding: 15px;
  background-color: #53d8fb;
  color: #1b1b1b;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
  margin-top: 20px;
}

.btn-signup:hover {
  background-color: #40a6c7;
}

/* 상점 페이지 스타일 */
.shop-page {
  margin-top: 8px;
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.shop-status-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.shop-point-status {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 196, 61, 0.14);
  border: 1px solid rgba(255, 196, 61, 0.35);
  color: #ffe2a0;
  font-size: 0.95rem;
}

.shop-point-status strong {
  color: #ffd37c;
}

.shop-title {
  margin: 0;
}

.shop-ticket-status {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(102, 204, 255, 0.14);
  border: 1px solid rgba(102, 204, 255, 0.35);
  color: #ccecff;
  font-size: 0.95rem;
}

.shop-ticket-status strong {
  color: #9ee0ff;
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.shop-sort-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.shop-exchange-form {
  margin: 0;
}

.shop-exchange-card {
  border-color: #4a5364;
}

.exchange-image-container {
  background: radial-gradient(circle at 30% 20%, #3a4c66 0%, #2a3546 70%);
}

.exchange-icon {
  font-size: clamp(42px, 5vw, 56px);
  line-height: 1;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.35));
}

.shop-exchange-btn {
  white-space: nowrap;
}

.shop-exchange-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.shop-exchange-btn:disabled:hover {
  transform: none;
  background-color: #28a745;
}

.shop-sort-form label {
  color: #b5d5e8;
  font-size: 0.9rem;
  font-weight: 700;
}

.shop-sort-form select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #465261;
  background: #1f242b;
  color: #e7f2ff;
  font-size: 0.9rem;
}

.shop-sort-submit {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #5b6e86;
  background: #2d3c4e;
  color: #ecf6ff;
  cursor: pointer;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
  background: linear-gradient(180deg, #181818 0%, #121212 100%);
  border-radius: 14px;
}

.shop-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(160deg, #2b2b2b 0%, #232323 100%);
  color: #f1f1f1;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  border: 1px solid #383838;
  padding: 16px;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.shop-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  border-color: #4a5364;
}

.item-image-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #404040;
  background: radial-gradient(circle at 30% 20%, #3d3d3d 0%, #232323 70%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-image-empty {
  width: 58%;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
}

.item-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  min-width: 0;
}

.item-name {
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: bold;
  color: #ffffff;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-price {
  display: inline-flex;
  align-self: flex-start;
  margin: 0;
  font-size: 0.9rem;
  font-weight: bold;
  color: #7dd6ff;
  background: rgba(102, 204, 255, 0.14);
  border: 1px solid rgba(102, 204, 255, 0.35);
  border-radius: 999px;
  padding: 5px 10px;
}

.item-price-event {
  color: #ffd580;
  background: rgba(255, 194, 61, 0.16);
  border-color: rgba(255, 194, 61, 0.4);
}

.item-description-box {
  background: linear-gradient(165deg, #252f3d 0%, #202834 100%);
  border: 1px solid #39465a;
  border-radius: 10px;
  padding: 12px 13px;
}

.item-description-label {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #9db5d8;
}

.item-description {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #dee7f3;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.item-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.action-form {
  margin: 0;
}

/* 기본 버튼 스타일 */
.purchase-btn,
.edit-btn,
.delete-btn {
  width: 100%;
  padding: 10px 16px;
  font-weight: bold;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

/* 구매 버튼 */
.purchase-btn {
  background-color: #28a745;
}

.purchase-btn:hover {
  background-color: #218838;
  transform: translateY(-1px);
}

/* 수정 버튼 */
.edit-btn {
  background-color: #007bff;
}

.edit-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

/* 삭제 버튼 */
.delete-btn {
  background-color: #dc3545;
}

.delete-btn:hover {
  background-color: #c82333;
  transform: translateY(-1px);
}

.popup-modal {
  display: none; /* 기본적으로 숨김 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.popup-content {
  position: relative;
  margin: 5% auto;
  max-width: 800px; /* 최대 너비 유지 */
  width: 90%;
  max-height: 90vh; /* 뷰포트 높이의 90%로 제한 */
  display: flex;
  flex-direction: column;
}

.popup-content img {
  width: 100%;
  height: auto;
  max-height: calc(90vh - 100px); /* 버튼 영역 고려하여 높이 조절 */
  object-fit: contain; /* 이미지 비율 유지 */
  border-radius: 8px;
}

.popup-message {
  color: #d9534f; /* 에러 메시지 색상 */
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.popup-close-btn {
  padding: 10px 20px;
  background: #d9534f;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.popup-close-btn:hover {
  background: #c9302c;
}

.purchased-item-list,
.solved-problem-list {
  list-style-type: none;
  padding: 0;
  margin: 20px 0;
}

.purchased-item,
.solved-problem-item {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #333;
  border-radius: 5px;
}

.purchased-item strong {
  color: #66ccff;
}

.purchase-date {
  font-size: 0.9rem;
  color: #888;
  display: block;
  margin-top: 5px;
}

.student_edit_btn {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  color: white;
  background-color: #007bff;
  cursor: pointer;
  transition: background-color 0.3s;
}

.student_edit_btn:hover {
  background-color: #0056b3;
}
.student-list {
  list-style: none;
  padding: 0;
}

.student-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #333;
}

.student-info {
  flex-grow: 1;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.completed {
  color: rgb(0, 232, 0);
  font-weight: bold;
}
.pending {
  color: orange;
  font-weight: bold;
}

/* 모바일 메뉴 버튼 스타일 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: #00bcd4;
  margin: 5px 0;
  transition: 0.3s;
}

/* 게시판 글 목록 페이지 전용 */
.post-list-page {
  padding-top: 28px;
}

.post-list-page .post-list-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.post-list-page .post-list-heading {
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.post-list-page .post-list-subtitle {
  margin: 0;
  color: #9bb4bb;
  font-size: 0.95rem;
}

.post-list-page .post-list-actions {
  margin-left: auto;
}

.post-list-page .post-write-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 188, 212, 0.55);
  border-radius: 999px;
  background: linear-gradient(135deg, #00bcd4 0%, #31d8e8 100%);
  color: #052226;
  font-weight: 700;
  padding: 11px 22px;
  box-shadow: 0 8px 22px rgba(0, 188, 212, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.post-list-page .post-write-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 188, 212, 0.35);
  filter: brightness(1.03);
}

.post-list-page .post-login-guide {
  margin: 0;
  font-size: 0.95rem;
  color: #adbec4;
}

.post-list-page .post-login-guide a {
  font-weight: 700;
}

.post-list-page .post-board {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: linear-gradient(180deg, #1f2428 0%, #181d21 100%);
  overflow: hidden;
}

.post-list-page .post-board-list {
  margin: 0;
  padding: 0;
}

.post-list-page .post-board-item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.post-list-page .post-board-item:hover {
  background-color: rgba(0, 188, 212, 0.08);
}

.post-list-page .post-board-item.is-boosted {
  background:
    radial-gradient(120% 170% at 0% 0%, rgba(255, 231, 154, 0.34) 0%, rgba(255, 231, 154, 0) 58%),
    radial-gradient(95% 120% at 85% 50%, rgba(255, 201, 84, 0.12) 0%, rgba(255, 201, 84, 0) 72%),
    linear-gradient(90deg, rgba(255, 215, 122, 0.3) 0%, rgba(255, 189, 82, 0.14) 34%, rgba(255, 255, 255, 0.03) 100%),
    linear-gradient(180deg, rgba(79, 60, 19, 0.82) 0%, rgba(44, 34, 15, 0.58) 100%);
  box-shadow:
    inset 4px 0 0 #ffd36b,
    inset 0 0 0 1px rgba(255, 222, 143, 0.18),
    0 12px 28px rgba(255, 193, 85, 0.12),
    0 0 26px rgba(255, 208, 102, 0.08);
  animation: boostedGoldPulse 2.8s ease-in-out infinite;
}

.post-list-page .post-board-item.is-boosted:hover {
  background:
    radial-gradient(120% 170% at 0% 0%, rgba(255, 239, 170, 0.4) 0%, rgba(255, 239, 170, 0) 58%),
    radial-gradient(95% 120% at 85% 50%, rgba(255, 214, 108, 0.16) 0%, rgba(255, 214, 108, 0) 72%),
    linear-gradient(90deg, rgba(255, 224, 140, 0.34) 0%, rgba(255, 200, 95, 0.18) 38%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(180deg, rgba(88, 66, 18, 0.86) 0%, rgba(49, 37, 14, 0.62) 100%);
  box-shadow:
    inset 4px 0 0 #ffe082,
    inset 0 0 0 1px rgba(255, 228, 158, 0.24),
    0 14px 30px rgba(255, 193, 85, 0.16),
    0 0 34px rgba(255, 211, 112, 0.12);
}

.post-list-page .post-board-item.is-boosted::after {
  content: "";
  position: absolute;
  inset: -20% auto -20% -35%;
  width: 42%;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 248, 220, 0.06) 32%,
    rgba(255, 243, 201, 0.32) 50%,
    rgba(255, 250, 234, 0.08) 68%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-24deg);
  opacity: 0.9;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: boostedGoldShine 3.8s linear infinite;
}

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

.post-list-page .post-title-link {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-right: 14px;
  font-size: 1.05rem;
  font-weight: 700;
}

.post-list-page .post-title-link a {
  color: #d7f8ff;
  transition: color 0.2s ease;
}

.post-list-page .post-board-item.is-boosted .post-title-link a {
  color: #ffefb8;
  text-shadow:
    0 0 18px rgba(255, 214, 108, 0.22),
    0 0 30px rgba(255, 224, 140, 0.08);
}

.post-list-page .post-title-link a:hover {
  color: #56e7f8;
}

.post-list-page .post-board-item.is-boosted .post-title-link a:hover {
  color: #fff7db;
}

.post-list-page .post-boost-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 193, 85, 0.4);
  background: rgba(255, 193, 85, 0.12);
  color: #ffe9af;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 188, 0.16),
    0 0 16px rgba(255, 205, 99, 0.12);
}

.post-list-page .post-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.post-list-page .post-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #a9bec4;
  background-color: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
}

.post-list-page .post-author {
  font-weight: 700;
  gap: 3px;
}

.post-list-page .author-level-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  box-shadow: none;
  opacity: 0.9;
  vertical-align: middle;
  transform: translateY(0);
}

.post-list-page .post-comments {
  color: #5de8f8;
  border-color: rgba(93, 232, 248, 0.4);
}

.post-list-page .post-boost-chip {
  color: #ffe9b3;
  border-color: rgba(255, 193, 85, 0.36);
  background-color: rgba(255, 193, 85, 0.1);
}

.post-list-page .post-board-item.is-boosted .post-meta-chip {
  color: #f1dfae;
  border-color: rgba(255, 219, 130, 0.22);
  background-color: rgba(255, 221, 138, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 238, 182, 0.05);
}

.post-list-page .post-board-item.is-boosted .post-comments {
  color: #ffe089;
  border-color: rgba(255, 223, 134, 0.32);
  background-color: rgba(255, 214, 108, 0.12);
}

.post-list-page .post-board-item.is-boosted .post-boost-chip {
  color: #fff4cc;
  border-color: rgba(255, 223, 140, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 226, 144, 0.2) 0%, rgba(255, 201, 84, 0.12) 100%);
  box-shadow: 0 0 18px rgba(255, 205, 99, 0.08);
}

@keyframes boostedGoldPulse {
  0%, 100% {
    box-shadow:
      inset 4px 0 0 #ffd36b,
      inset 0 0 0 1px rgba(255, 222, 143, 0.18),
      0 12px 28px rgba(255, 193, 85, 0.12),
      0 0 26px rgba(255, 208, 102, 0.08);
  }
  50% {
    box-shadow:
      inset 4px 0 0 #ffe38f,
      inset 0 0 0 1px rgba(255, 236, 174, 0.24),
      0 16px 34px rgba(255, 193, 85, 0.18),
      0 0 38px rgba(255, 214, 120, 0.14);
  }
}

@keyframes boostedGoldShine {
  0% {
    transform: translateX(0) skewX(-24deg);
    opacity: 0;
  }
  12% {
    opacity: 0.9;
  }
  52% {
    opacity: 0.35;
  }
  100% {
    transform: translateX(340%) skewX(-24deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-list-page .post-board-item.is-boosted,
  .post-list-page .post-board-item.is-boosted::after {
    animation: none !important;
  }
}

.post-list-page .post-empty {
  list-style: none;
  padding: 28px 18px;
  text-align: center;
  color: #9fb2b8;
}

/* 반응형 스타일 */
@media screen and (max-width: 768px) {
  /* 헤더 및 네비게이션 */
  nav .container {
    flex-direction: column;
    padding: 10px;
  }

  .mobile-menu-btn {
    display: block;
    position: absolute;
    right: 20px;
    top: 20px;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
    padding: 10px 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 10px 0;
  }

  .user-section {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
  }

  /* 로고 */
  header .logo {
    margin-bottom: 10px;
  }

  /* 컨테이너 */
  .container {
    width: 95%;
    padding: 10px;
  }

  /* 피처 섹션 */
  .feature-list {
    flex-direction: column;
  }

  .feature-item {
    margin-bottom: 20px;
  }

  /* 폼 스타일 */
  .auth-container form {
    width: 90%;
  }

  /* 게시판 스타일 */
  .board-item {
    flex-direction: column;
    gap: 10px;
  }

  .post-info {
    flex-direction: column;
    align-items: flex-start;
  }

  /* 샵 아이템 */
  .shop-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .shop-ticket-status {
    font-size: 0.9rem;
  }

  .shop-toolbar {
    align-items: flex-start;
    margin-bottom: 10px;
  }

  .shop-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .shop-item {
    width: 100%;
    padding: 14px;
  }

  .item-description {
    font-size: 0.86rem;
  }
  .ranking {
    width: 100%; /* 모바일에서는 전체 너비 사용 */
    margin-left: 0; /* 모바일에서는 좌측 마진 제거 */
    padding: 15px; /* 모바일에서는 패딩 줄임 */
  }
  .ranking-container {
    padding: 10px;
  }

  .table th,
  .table td {
    padding: 8px 5px;
    font-size: 0.9rem;
  }

  /* 순위 열 너비 조정 */
  .table th:first-child,
  .table td:first-child {
    width: 60px;
  }

  /* 점수 열 너비 조정 */
  .table th:last-child,
  .table td:last-child {
    width: 80px;
  }

  .post-list-page .post-list-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-list-page .post-list-actions {
    width: 100%;
  }

  .post-list-page .post-write-btn {
    width: 100%;
  }

  .post-list-page .post-board-item {
    align-items: flex-start;
  }

  .post-list-page .post-meta {
    justify-content: flex-start;
  }
}

/* 태블릿 스타일 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .container {
    width: 95%;
  }

  .feature-list {
    gap: 15px;
  }

  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 작은 모바일 화면 */
@media screen and (max-width: 480px) {
  header .logo a {
    font-size: 1.4rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .auth-container {
    margin: 40px auto;
  }
}

.notice-item {
  margin: 10px 0;
  padding: 15px;
  border-left: 4px solid #0dcaf0; /* 왼쪽 강조선 */
  background-color: #1f1f1f;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* 그림자 효과 */
}
.notice-item:hover {
  background-color: #1b1515;
}
.notice-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}
.notice-text {
  flex-grow: 1; /* 내용이 최대한의 공간을 차지 */
}

.notice-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  min-width: 120px; /* 날짜가 깨지지 않도록 최소 너비 설정 */
}

.delete-link {
  color: #dc3545;
  text-decoration: none;
  font-size: 0.9em;
}

.delete-link:hover {
  color: #bb2d3b;
  text-decoration: underline;
}

.text-muted {
  flex-shrink: 0; /* 날짜가 줄어들지 않도록 */
  color: #6c757d; /* 회색 계열 색상 */
  opacity: 0.7; /* 투명도 조절 */
  font-size: 0.85em; /* 글자 크기를 살짝 작게 */
  font-weight: 300; /* 글자 두께를 얇게 */
}
/* 반응형 스타일 */
@media screen and (max-width: 768px) {
  .notice-item {
    padding: 12px;
    margin: 8px 0;
  }

  .notice-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .text-muted {
    font-size: 0.8em;
    display: block;
    width: 100%;
  }

  .delete-link {
    align-self: flex-end; /* 삭제 링크를 오른쪽으로 정렬 */
  }
}

/* 더 작은 화면 */
@media screen and (max-width: 480px) {
  .notice-item {
    padding: 10px;
    margin: 6px 0;
  }

  .notice-content {
    gap: 8px;
  }

  .text-muted {
    font-size: 0.75em;
  }
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.popup-content {
  position: relative;
  margin: 5% auto;
  max-width: 800px;
  width: 90%;
}

.popup-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.close-button {
  position: absolute;
  right: -30px;
  top: -30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

.close-button:hover {
  color: #ccc;
}

@media (max-width: 600px) {
  .popup-content {
    margin: 15% auto;
  }
  .close-button {
    right: 10px;
    top: -40px;
  }
}

/* 작은 화면에서의 여백 조절 */
@media screen and (max-width: 768px) {
  .popup-content {
    margin: 10% auto;
    width: 95%;
  }
}

/* 매우 작은 화면에서의 추가 조절 */
@media screen and (max-width: 480px) {
  .popup-content {
    margin: 5% auto;
  }

  .popup-content img {
    max-height: calc(90vh - 80px);
  }
}

.messages {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.message {
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
}

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

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

.message.warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}
.emoji-snow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  pointer-events: none;
  overflow: hidden;
}

.emoji {
  position: absolute;
  top: -40px;
  font-size: 24px; /* 이모지 크기 */
  opacity: 0;
  animation: emojiSnowfall linear infinite;
  cursor: pointer;
  pointer-events: auto; /* 클릭 가능 */
  z-index: 1;
  transition: transform 0.3s ease-out;
}

@keyframes emojiSnowfall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(calc(100vh + 80px)) rotate(360deg);
    opacity: 0;
  }
}

.floating-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  font-size: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.mini-emoji {
  position: absolute;
  animation: explode-and-fade 2s forwards; /* 애니메이션 지속 시간과 효과 설정 */
  font-size: 0.5em; /* 작은 이모지 크기 */
  pointer-events: none; /* 클릭 불가 */
  z-index: 2;
}

@keyframes explode-and-fade {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(var(--x), var(--y)) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(var(--x), var(--y)) scale(0.5);
    opacity: 0; /* 서서히 사라지도록 설정 */
  }
}
.btn-disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}
/* .problem-description {
white-space: pre-wrap;
word-wrap: break-word;
}
  */

/* Style only <hr> inside .problem-description */
.problem-description hr {
  border: none;
  border-top: 0.5px solid #424242;
}

.solved-students-container {
  margin-top: 30px;
  padding: 20px;
  background-color: #1f1f1f;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.solved-students-list {
  margin-top: 15px;
}

.student-item {
  border-bottom: 1px solid #2d2d2d;
}

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

.student-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.student-header:hover {
  background-color: #2d2d2d;
}

.student-name {
  font-weight: 500;
}

.solved-time {
  font-size: 0.85em;
  color: #6c757d;
}

.student-code {
  padding: 15px;
  background-color: #2d2d2d;
  border-radius: 4px;
  margin: 0 10px 10px 10px;
}

.code-block {
  margin: 0;
  white-space: pre-wrap;
  font-family: "Consolas", monospace;
  font-size: 0.9em;
  color: #e9ecef;
}

@media screen and (max-width: 768px) {
  .student-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  .solved-time {
    align-self: flex-end;
  }
}

/* Base Refresh */
.site-header {
  background: linear-gradient(135deg, rgba(15, 23, 30, 0.96) 0%, rgba(24, 35, 43, 0.96) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.site-nav {
  width: 100%;
}

.site-nav-inner {
  min-height: 72px;
  gap: 14px;
}

.site-nav-inner .logo a {
  color: #75ecff;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.site-nav-inner .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 0 12px;
}

.site-nav-inner .nav-links li {
  margin: 0;
}

.site-nav-inner .nav-links li a {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #d5e8ee;
}

.site-nav-inner .nav-links li a:hover {
  border-color: rgba(0, 188, 212, 0.45);
  background: rgba(0, 188, 212, 0.12);
  color: #e9fbff;
}

.site-user-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-main {
  padding: 30px 0 44px;
}

.main-shell {
  width: 100%;
}

.site-footer {
  margin-top: 34px;
  background: linear-gradient(180deg, rgba(20, 28, 34, 0.98) 0%, rgba(15, 20, 25, 0.98) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer .container {
  padding: 18px 0;
}

.site-footer-text {
  color: #a8bdc4;
  letter-spacing: 0.01em;
}

/* Home Refresh */
.home-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-live-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 195, 64, 0.4);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 195, 64, 0.12) 0%, rgba(255, 154, 69, 0.1) 100%);
}

.home-live-notice-text {
  color: #ffe4ad;
  font-weight: 700;
}

.home-inline-form {
  margin: 0;
  padding: 0;
  background: transparent;
}

.home-notice-dismiss {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.home-hero-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(130% 130% at 0% 0%, rgba(0, 188, 212, 0.18) 0%, rgba(0, 188, 212, 0) 48%),
    linear-gradient(155deg, #1a2025 0%, #151a1f 100%);
}

.home-hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  color: #eefbff;
  line-height: 1.24;
}

.home-hero-desc {
  margin: 0 0 16px;
  color: #b8cfd6;
  font-size: 0.95rem;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ddedf2;
}

.home-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.home-attendance-form {
  margin: 0;
  padding: 0;
  background: transparent;
  display: inline-flex;
}

.home-btn-attendance,
.home-btn-meet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 44px;
  padding: 0 18px;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
}

.home-btn-attendance {
  border: 1px solid rgba(255, 210, 112, 0.5);
  background:
    radial-gradient(circle at top left, rgba(255, 229, 149, 0.28), transparent 44%),
    linear-gradient(135deg, rgba(178, 121, 28, 0.92) 0%, rgba(132, 84, 18, 0.96) 100%);
  color: #fff7df;
  box-shadow: 0 10px 22px rgba(190, 134, 41, 0.2);
}

.home-btn-attendance:hover {
  background:
    radial-gradient(circle at top left, rgba(255, 239, 180, 0.34), transparent 46%),
    linear-gradient(135deg, rgba(196, 134, 31, 0.94) 0%, rgba(148, 94, 20, 0.98) 100%);
  color: #fffdf2;
}

.home-btn-attendance:disabled {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #8ea3aa;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.home-btn-meet {
  border: 1px solid rgba(127, 232, 168, 0.42);
  background:
    radial-gradient(circle at top left, rgba(127, 232, 168, 0.24), transparent 46%),
    linear-gradient(135deg, rgba(53, 146, 102, 0.82) 0%, rgba(39, 109, 80, 0.95) 100%);
  color: #e9fff2;
  box-shadow: 0 10px 22px rgba(56, 151, 105, 0.18);
}

.home-btn-meet:hover {
  background:
    radial-gradient(circle at top left, rgba(150, 244, 187, 0.28), transparent 48%),
    linear-gradient(135deg, rgba(60, 164, 114, 0.88) 0%, rgba(42, 119, 87, 0.98) 100%);
  color: #f5fff8;
}

.home-btn-meet.is-disabled,
.home-btn-meet:disabled {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #8ea3aa;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.home-hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.home-attendance-meta {
  margin: 12px 0 0;
  color: #e6d39f;
  font-size: 0.9rem;
  line-height: 1.5;
}

.home-attendance-streak {
  display: inline-flex;
  align-items: center;
  margin: 12px 0 0;
  padding: 6px 12px;
  border: 1px solid rgba(255, 173, 84, 0.32);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 155, 62, 0.18) 0%, rgba(255, 112, 67, 0.12) 100%);
  color: #ffd39a;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.home-stat-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.03);
}

.home-stat-label {
  margin: 0 0 4px;
  color: #98b0b7;
  font-size: 0.8rem;
}

.home-stat-value {
  margin: 0;
  color: #f5feff;
  font-size: 1.28rem;
  font-weight: 700;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.home-feature-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.home-feature-card h3 {
  margin: 0 0 9px;
  color: #e4f9ff;
}

.home-feature-card p {
  margin: 0;
  color: #adc3c9;
  font-size: 0.96rem;
}

.home-feature-card--points {
  border-color: rgba(255, 196, 64, 0.35);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 196, 64, 0.2) 0%, rgba(255, 196, 64, 0) 55%),
    linear-gradient(180deg, rgba(46, 35, 16, 0.75) 0%, rgba(26, 23, 16, 0.45) 100%);
}

.home-feature-card--points h3 {
  color: #ffe3a1;
}

.home-feature-card--points .home-point-scale {
  color: #f2d9a4;
}

.home-feature-card--custom {
  border-color: rgba(120, 206, 255, 0.35);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(120, 206, 255, 0.18) 0%, rgba(120, 206, 255, 0) 58%),
    linear-gradient(180deg, rgba(17, 33, 44, 0.75) 0%, rgba(17, 26, 33, 0.45) 100%);
}

.home-feature-card--custom h3 {
  color: #c6efff;
}

.home-feature-card--custom .home-feature-meta {
  color: #9fe4ff;
}

.home-feature-card--community {
  border-color: rgba(144, 231, 146, 0.35);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(144, 231, 146, 0.17) 0%, rgba(144, 231, 146, 0) 58%),
    linear-gradient(180deg, rgba(20, 40, 30, 0.74) 0%, rgba(17, 28, 22, 0.45) 100%);
}

.home-feature-card--community h3 {
  color: #c9ffd0;
}

.home-feature-card--community .home-inline-link {
  color: #9cffaf;
}

.home-feature-meta {
  margin-top: 12px;
  font-size: 0.84rem;
  color: #90e8f4;
}

.home-point-scale {
  margin: 11px 0 0;
  padding-left: 16px;
  color: #bcd0d6;
  font-size: 0.88rem;
}

.home-inline-link {
  display: inline-flex;
  margin-top: 12px;
  font-size: 0.86rem;
  color: #77eefe;
}

.home-notice-board,
.home-ranking-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 15px;
  background: linear-gradient(180deg, rgba(28, 34, 39, 0.98) 0%, rgba(22, 27, 31, 0.98) 100%);
}

.home-ranking-panel--tabs {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.home-ranking-panel--tabs::before,
.home-ranking-panel--tabs::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(0);
  pointer-events: none;
}

.home-ranking-panel--tabs::before {
  top: -58px;
  right: -34px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(70, 181, 255, 0.22) 0%, rgba(70, 181, 255, 0) 72%);
}

.home-ranking-panel--tabs::after {
  bottom: -86px;
  left: -32px;
  width: 210px;
  height: 210px;
  background: radial-gradient(circle, rgba(255, 169, 79, 0.14) 0%, rgba(255, 169, 79, 0) 72%);
}

.home-ranking-panel--tabs.is-attendance-active {
  border-color: rgba(255, 191, 116, 0.32);
  background:
    radial-gradient(150% 130% at 100% 0%, rgba(255, 170, 98, 0.18) 0%, rgba(255, 170, 98, 0) 46%),
    linear-gradient(180deg, rgba(40, 28, 21, 0.98) 0%, rgba(27, 18, 15, 0.98) 100%);
}

.home-ranking-panel--tabs.is-attendance-active::before {
  background: radial-gradient(circle, rgba(255, 185, 105, 0.26) 0%, rgba(255, 185, 105, 0) 72%);
}

.home-ranking-panel--tabs.is-attendance-active::after {
  background: radial-gradient(circle, rgba(255, 229, 150, 0.18) 0%, rgba(255, 229, 150, 0) 72%);
}

.home-ranking-panel--tabs.is-minigame-active {
  border-color: rgba(108, 226, 185, 0.32);
  background:
    radial-gradient(150% 130% at 100% 0%, rgba(92, 215, 182, 0.18) 0%, rgba(92, 215, 182, 0) 46%),
    linear-gradient(180deg, rgba(18, 39, 37, 0.98) 0%, rgba(14, 27, 28, 0.98) 100%);
}

.home-ranking-panel--tabs.is-minigame-active::before {
  background: radial-gradient(circle, rgba(116, 239, 201, 0.26) 0%, rgba(116, 239, 201, 0) 72%);
}

.home-ranking-panel--tabs.is-minigame-active::after {
  background: radial-gradient(circle, rgba(167, 245, 194, 0.16) 0%, rgba(167, 245, 194, 0) 72%);
}

.home-section-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.home-section-head h2 {
  margin: 0;
}

.home-section-head--ranking {
  margin-bottom: 16px;
}

.home-ranking-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: color 0.2s ease;
}

.home-ranking-heading h2 {
  transition: color 0.2s ease;
}

.home-ranking-copy {
  margin: 0;
  color: #a5c0ca;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.home-ranking-panel--tabs.is-attendance-active .home-ranking-heading h2 {
  color: #fff2dd;
}

.home-ranking-panel--tabs.is-attendance-active .home-ranking-copy {
  color: #e2c7aa;
}

.home-ranking-panel--tabs.is-minigame-active .home-ranking-heading h2 {
  color: #e8fff6;
}

.home-ranking-panel--tabs.is-minigame-active .home-ranking-copy {
  color: #bfe8d8;
}

.home-ranking-tabs {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 12, 18, 0.4);
}

.home-ranking-tab {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(8, 14, 22, 0.62);
  color: #9db6bf;
  min-height: 48px;
  padding: 0 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-ranking-tab:hover {
  transform: translateY(-1px);
  color: #edfaff;
}

.home-ranking-tab-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.home-ranking-tab-title {
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}

.home-ranking-tab-meta {
  margin-top: 3px;
  color: rgba(171, 197, 205, 0.82);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-ranking-tab.is-active {
  background: linear-gradient(135deg, rgba(36, 176, 240, 0.9) 0%, rgba(31, 132, 237, 0.88) 100%);
  color: #effbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 24px rgba(31, 132, 237, 0.2);
}

.home-ranking-panel--tabs.is-attendance-active .home-ranking-tab.is-active {
  background: linear-gradient(135deg, rgba(255, 183, 96, 0.94) 0%, rgba(225, 132, 54, 0.9) 100%);
  color: #fff7ee;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 24px rgba(214, 124, 40, 0.22);
}

.home-ranking-panel--tabs.is-minigame-active .home-ranking-tab.is-active {
  background: linear-gradient(135deg, rgba(95, 219, 182, 0.94) 0%, rgba(41, 166, 129, 0.9) 100%);
  color: #effff9;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 24px rgba(44, 155, 122, 0.24);
}

.home-ranking-tab.is-active .home-ranking-tab-meta {
  color: rgba(234, 248, 255, 0.78);
}

.home-ranking-panel--tabs.is-attendance-active .home-ranking-tab.is-active .home-ranking-tab-meta {
  color: rgba(255, 247, 233, 0.8);
}

.home-ranking-panel--tabs.is-minigame-active .home-ranking-tab.is-active .home-ranking-tab-meta {
  color: rgba(234, 255, 245, 0.82);
}

.home-section-meta {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #b5c5ca;
  font-size: 0.78rem;
}

.home-notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-notice-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.home-notice-text {
  margin: 0;
  color: #e0edf1;
}

.home-notice-date {
  color: #90a8b0;
  font-size: 0.77rem;
}

.home-delete-link {
  color: #ff9589;
  font-size: 0.84rem;
}

.home-empty-text {
  margin: 0;
  color: #9db3b9;
}

.home-notice-form {
  margin: 14px 0 0;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.home-notice-input {
  flex: 1 1 auto;
  min-width: 260px;
  margin-bottom: 0;
  height: 44px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 10px;
  background: rgba(17, 23, 27, 0.95);
  color: #e2eef2;
}

.home-notice-form .btn {
  width: auto;
  min-width: 106px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0 14px;
  border-radius: 10px;
  white-space: nowrap;
}

.home-ranking-panel {
  border-color: rgba(112, 189, 255, 0.28);
  background:
    radial-gradient(150% 130% at 100% 0%, rgba(93, 186, 255, 0.16) 0%, rgba(93, 186, 255, 0) 46%),
    linear-gradient(180deg, rgba(23, 31, 40, 0.98) 0%, rgba(18, 24, 33, 0.98) 100%);
}

.home-ranking-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(6, 12, 18, 0.42);
}

.home-ranking-wrap--attendance {
  border-color: rgba(255, 178, 92, 0.22);
  background:
    radial-gradient(160% 130% at 100% 0%, rgba(255, 175, 94, 0.12) 0%, rgba(255, 175, 94, 0) 48%),
    rgba(18, 12, 10, 0.48);
}

.home-ranking-wrap--minigame {
  border-color: rgba(103, 222, 183, 0.22);
  background:
    radial-gradient(160% 130% at 100% 0%, rgba(108, 226, 185, 0.12) 0%, rgba(108, 226, 185, 0) 48%),
    rgba(8, 20, 18, 0.48);
}

.home-ranking-pane {
  position: relative;
  z-index: 1;
  display: block;
}

.home-ranking-pane[hidden] {
  display: none;
}

.home-ranking-pane.is-active {
  animation: home-ranking-reveal 0.34s ease;
}

.home-ranking-pane-meta {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.home-ranking-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 34px rgba(0, 0, 0, 0.18);
}

.home-ranking-hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  opacity: 0.7;
  pointer-events: none;
}

.home-ranking-hero--solved {
  background:
    radial-gradient(circle at top right, rgba(101, 199, 255, 0.26), transparent 42%),
    linear-gradient(135deg, rgba(17, 56, 82, 0.98) 0%, rgba(9, 26, 41, 0.98) 100%);
  border-color: rgba(115, 204, 255, 0.18);
}

.home-ranking-hero--attendance {
  background:
    radial-gradient(circle at top right, rgba(255, 187, 112, 0.24), transparent 42%),
    linear-gradient(135deg, rgba(82, 44, 21, 0.98) 0%, rgba(38, 21, 14, 0.98) 100%);
  border-color: rgba(255, 197, 129, 0.16);
}

.home-ranking-hero--minigame {
  background:
    radial-gradient(circle at top right, rgba(123, 232, 198, 0.24), transparent 42%),
    linear-gradient(135deg, rgba(20, 77, 64, 0.98) 0%, rgba(10, 35, 33, 0.98) 100%);
  border-color: rgba(142, 241, 209, 0.16);
}

.home-ranking-hero--solved::after {
  background: radial-gradient(circle, rgba(96, 202, 255, 0.22) 0%, rgba(96, 202, 255, 0) 72%);
}

.home-ranking-hero--attendance::after {
  background: radial-gradient(circle, rgba(255, 190, 112, 0.22) 0%, rgba(255, 190, 112, 0) 72%);
}

.home-ranking-hero--minigame::after {
  background: radial-gradient(circle, rgba(123, 232, 198, 0.22) 0%, rgba(123, 232, 198, 0) 72%);
}

.home-ranking-hero-rank {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 241, 197, 0.96);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.home-ranking-hero--solved .home-ranking-hero-rank {
  background: linear-gradient(135deg, rgba(50, 185, 255, 0.3) 0%, rgba(18, 106, 191, 0.22) 100%);
}

.home-ranking-hero--attendance .home-ranking-hero-rank {
  background: linear-gradient(135deg, rgba(255, 198, 124, 0.3) 0%, rgba(175, 98, 41, 0.22) 100%);
}

.home-ranking-hero--minigame .home-ranking-hero-rank {
  background: linear-gradient(135deg, rgba(126, 238, 202, 0.28) 0%, rgba(37, 149, 114, 0.22) 100%);
}

.home-ranking-hero-body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.home-ranking-hero-kicker {
  margin: 0 0 6px;
  color: #89dfff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-ranking-hero--attendance .home-ranking-hero-kicker {
  color: #ffcc8f;
}

.home-ranking-hero--minigame .home-ranking-hero-kicker {
  color: #9ef3d1;
}

.home-ranking-hero-name {
  margin: 0;
  color: #f6fcff;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.15;
}

.home-ranking-hero-copy {
  margin: 8px 0 0;
  color: #b5d0d9;
  font-size: 0.92rem;
  line-height: 1.45;
}

.home-ranking-hero-score {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 78px;
}

.home-ranking-hero-score strong {
  color: #ffffff;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.home-ranking-hero-score span {
  color: #9ec2d0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-ranking-hero--attendance .home-ranking-hero-score span {
  color: #e4c4a0;
}

.home-ranking-hero--minigame .home-ranking-hero-score span {
  color: #abebd4;
}

.home-ranking-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  table-layout: fixed;
}

.home-ranking-table th,
.home-ranking-table td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.home-ranking-table th {
  color: #99bac6;
  font-weight: 700;
  font-size: 0.79rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}

.home-ranking-table th:first-child,
.home-ranking-table td:first-child {
  width: 84px;
  text-align: center;
}

.home-ranking-table th:nth-child(2),
.home-ranking-table td:nth-child(2) {
  width: 128px;
  text-align: left;
}

.home-ranking-table th:nth-child(3),
.home-ranking-table td:nth-child(3) {
  width: 46%;
  text-align: left;
}

.home-ranking-table th:last-child,
.home-ranking-table td:last-child {
  width: 118px;
  text-align: right;
}

.home-ranking-table--compact {
  min-width: 320px;
}

.home-ranking-table--minigame {
  min-width: 420px;
}

.home-ranking-table--compact th:nth-child(2),
.home-ranking-table--compact td:nth-child(2) {
  width: auto;
}

.home-ranking-table--compact th:last-child,
.home-ranking-table--compact td:last-child {
  width: 132px;
  text-align: right;
}

.home-ranking-table tbody tr {
  transition: background 0.2s ease;
}

.home-ranking-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.home-ranking-table tbody tr:hover {
  background: rgba(132, 210, 255, 0.12);
}

.home-ranking-table tr:last-child td {
  border-bottom: none;
}

.home-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #d6eaf4;
  background: rgba(255, 255, 255, 0.12);
}

.home-rank-badge.is-first {
  color: #fff0c4;
  background: linear-gradient(135deg, #e0b03d 0%, #a77813 100%);
}

.home-rank-badge.is-second {
  color: #f4f9ff;
  background: linear-gradient(135deg, #96a9ba 0%, #6a7e8f 100%);
}

.home-rank-badge.is-third {
  color: #ffe7cf;
  background: linear-gradient(135deg, #c98b5d 0%, #96613b 100%);
}

.home-rank-user {
  color: #e9f5fb;
  font-weight: 600;
}

.home-rank-comment-cell {
  vertical-align: middle;
}

.home-rank-comment-text {
  display: block;
  color: #dbeaf0;
  font-size: 0.9rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-rank-comment-empty {
  color: #7f96a1;
}

.home-rank-comment-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-rank-comment-input {
  width: 100%;
  min-width: 0;
  height: 33px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #eaf7fb;
  padding: 6px 9px;
  font-size: 0.84rem;
}

.home-rank-comment-save {
  border: 1px solid rgba(105, 216, 255, 0.48);
  border-radius: 8px;
  background: rgba(105, 216, 255, 0.16);
  color: #d9f6ff;
  font-size: 0.78rem;
  font-weight: 600;
  height: 33px;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
}

.home-rank-comment-save--paid {
  border-color: rgba(255, 209, 110, 0.45);
  background: linear-gradient(135deg, rgba(255, 209, 110, 0.24) 0%, rgba(255, 170, 60, 0.16) 100%);
  color: #ffe9af;
  box-shadow: 0 8px 18px rgba(255, 193, 85, 0.1);
}

.home-rank-comment-save:disabled,
.home-rank-comment-save--paid:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.home-rank-comment-delete-form {
  margin-top: 5px;
}

.home-rank-comment-delete {
  border: 1px solid rgba(255, 138, 138, 0.45);
  border-radius: 8px;
  background: rgba(255, 138, 138, 0.14);
  color: #ffc4c4;
  font-size: 0.76rem;
  font-weight: 600;
  height: 30px;
  padding: 0 9px;
  cursor: pointer;
}

.home-rank-comment-lock {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}

.home-rank-comment-lock-text {
  margin: 0;
  color: #9fb5bc;
  font-size: 0.77rem;
  line-height: 1.45;
}

.home-rank-comment-unlock-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-rank-comment-unlock {
  border: 1px solid rgba(255, 209, 110, 0.45);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 209, 110, 0.24) 0%, rgba(255, 170, 60, 0.16) 100%);
  color: #ffe9af;
  font-size: 0.78rem;
  font-weight: 700;
  height: 33px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(255, 193, 85, 0.1);
}

.home-rank-comment-unlock:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.home-rank-comment-unlock-points {
  color: #f6d68e;
  font-size: 0.76rem;
  font-weight: 600;
}

.home-rank-comment-lock-note {
  color: #f0a2a2;
  font-size: 0.74rem;
}

.home-rank-comment-lock-note--soft {
  color: #d5c191;
}

.home-rank-companion {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.home-rank-companion-name {
  color: #e8f9f2;
  font-size: 0.92rem;
  font-weight: 700;
}

.home-rank-companion-meta {
  color: #9db9b0;
  font-size: 0.78rem;
}

.home-rank-score {
  color: #d5e4ea;
  white-space: nowrap;
}

.home-rank-score strong {
  color: #f4fdff;
  font-size: 1.02rem;
  margin-right: 4px;
}

.home-rank-score span {
  color: #9ab3bd;
  font-size: 0.84rem;
}

.home-ranking-empty {
  color: #93a8b1;
  text-align: center;
  padding: 22px 12px;
}

@keyframes home-ranking-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .site-nav-inner {
    flex-wrap: wrap;
    align-items: center;
  }

  .site-nav-inner .nav-links {
    margin-left: 0;
    order: 3;
    width: 100%;
  }

  .site-user-tools {
    margin-left: 0;
  }

  .home-hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-main {
    padding-top: 22px;
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }

  .home-notice-form {
    flex-direction: column;
    align-items: stretch;
  }

  .home-notice-form .btn {
    width: 100%;
    height: auto;
  }

  .home-section-head--ranking {
    flex-direction: column;
    align-items: stretch;
  }

  .home-ranking-tabs {
    width: 100%;
  }

  .home-ranking-tab {
    flex: 1 1 0;
    justify-content: center;
    min-height: 52px;
  }

  .home-ranking-tab-text {
    align-items: center;
  }

  .home-ranking-hero {
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }

  .home-ranking-hero-rank {
    width: 60px;
    height: 60px;
    font-size: 1.45rem;
  }

  .home-ranking-hero-score {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
    align-items: baseline;
    gap: 6px;
  }

  .home-ranking-table {
    min-width: 560px;
  }

  .home-ranking-table--compact {
    min-width: 320px;
  }

  .home-ranking-table th,
  .home-ranking-table td {
    padding: 10px 8px;
  }

  .home-ranking-table th:nth-child(2),
  .home-ranking-table td:nth-child(2) {
    width: 112px;
  }

  .home-rank-badge {
    width: 28px;
    height: 28px;
    font-size: 0.84rem;
  }

  .home-rank-comment-input {
    height: 31px;
    font-size: 0.8rem;
  }

  .home-rank-comment-save {
    height: 31px;
    padding: 0 8px;
  }

  .home-rank-comment-delete {
    height: 28px;
    font-size: 0.72rem;
    padding: 0 8px;
  }

  .home-rank-comment-unlock {
    height: 31px;
    padding: 0 10px;
    font-size: 0.74rem;
  }
}

.home-btn-game {
  border: 1px solid rgba(255, 173, 233, 0.4);
  background:
    radial-gradient(circle at top left, rgba(255, 173, 233, 0.24), transparent 44%),
    linear-gradient(135deg, rgba(112, 71, 152, 0.9) 0%, rgba(65, 45, 115, 0.98) 100%);
  color: #fff1fb;
  box-shadow: 0 10px 22px rgba(99, 63, 138, 0.2);
}

.home-btn-game:hover {
  background:
    radial-gradient(circle at top left, rgba(255, 191, 240, 0.28), transparent 46%),
    linear-gradient(135deg, rgba(127, 82, 173, 0.92) 0%, rgba(74, 50, 129, 1) 100%);
  color: #fff9fd;
}

.pet-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pet-page-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(255, 211, 120, 0.14) 0%, rgba(255, 211, 120, 0) 48%),
    radial-gradient(120% 150% at 100% 0%, rgba(132, 229, 255, 0.14) 0%, rgba(132, 229, 255, 0) 42%),
    linear-gradient(145deg, rgba(31, 36, 52, 0.98) 0%, rgba(20, 23, 34, 0.98) 100%);
}

.pet-page-hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 210, 0.18) 0%, rgba(255, 184, 210, 0) 70%);
  pointer-events: none;
}

.pet-page-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: #fff7eb;
}

.pet-page-copy {
  display: grid;
  gap: 14px;
  align-content: start;
}

.pet-page-copy p {
  margin: 0;
  color: #d7e4ef;
}

.pet-page-synergy {
  align-self: start;
  padding: 18px;
  border: 1px solid rgba(146, 214, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 34, 48, 0.66), rgba(11, 19, 29, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pet-page-synergy h2 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #96ddff;
}

.pet-page-synergy-list {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.pet-page-synergy-item {
  padding: 14px 16px;
  border: 1px solid rgba(146, 214, 255, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(17, 36, 54, 0.72), rgba(11, 22, 34, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pet-page-synergy-item.is-study {
  border-color: rgba(115, 227, 193, 0.18);
}

.pet-page-synergy-item.is-point {
  border-color: rgba(255, 209, 102, 0.18);
}

.pet-page-synergy-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #8bc7ea;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pet-page-synergy-item strong {
  display: block;
  margin: 0 0 4px;
  color: #fff4cf;
  font-size: 1.02rem;
}

.pet-page-synergy-item p {
  margin: 0;
  color: #b8cad7;
  font-size: 0.84rem;
  line-height: 1.45;
}

.pet-page-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pet-page-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #eef9ff;
  font-size: 0.88rem;
}

.pet-page-chip strong {
  color: #8cedff;
}

.pet-page-side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.pet-page-note,
.pet-page-beta,
.pet-page-tip {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.pet-page-note h2,
.pet-page-beta h2,
.pet-page-tip h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #fff2b0;
}

.pet-page-note p,
.pet-page-beta li,
.pet-page-tip p {
  margin: 0;
  font-size: 0.92rem;
  color: #d0dce8;
}

.pet-page-beta {
  border-color: rgba(255, 186, 121, 0.22);
  background: linear-gradient(180deg, rgba(56, 42, 29, 0.34) 0%, rgba(33, 27, 22, 0.24) 100%);
}

.pet-page-beta h2 {
  color: #ffd59d;
}

.pet-page-beta ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.pet-page-beta li::marker {
  color: #ffcf82;
}

.pet-page-tip h2 {
  color: #b6f7ff;
}

.pet-chooser {
  position: relative;
  margin-bottom: 14px;
  padding: 18px;
}

.pet-chooser-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.pet-chooser-head h2 {
  margin: 0;
  color: #fff1c7;
  font-size: 1.12rem;
}

.pet-chooser-head p {
  margin: 6px 0 0;
  color: #a9bfce;
  font-size: 0.92rem;
  line-height: 1.5;
}

.pet-choice-carousel {
  position: relative;
}

.pet-choice-viewport {
  position: relative;
  overflow: hidden;
  margin: 0 -6px;
  border-radius: 22px;
}

.pet-choice-viewport::before,
.pet-choice-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 2;
  pointer-events: none;
}

.pet-choice-viewport::before {
  left: 0;
  background: linear-gradient(90deg, rgba(14, 18, 27, 0.95) 0%, rgba(14, 18, 27, 0.7) 46%, rgba(14, 18, 27, 0) 100%);
}

.pet-choice-viewport::after {
  right: 0;
  background: linear-gradient(270deg, rgba(14, 18, 27, 0.95) 0%, rgba(14, 18, 27, 0.7) 46%, rgba(14, 18, 27, 0) 100%);
}

.pet-choice-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 24px) / 3.15);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 54px;
  scrollbar-width: none;
  padding: 4px 54px 8px;
  -ms-overflow-style: none;
}

.pet-choice-grid::-webkit-scrollbar {
  display: none;
}

.pet-choice-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(38, 46, 58, 0.98) 0%, rgba(24, 29, 39, 0.98) 100%);
  color: #fff0c7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    opacity 0.18s ease;
  transform: translateY(-50%);
}

.pet-choice-nav.is-prev {
  left: 8px;
}

.pet-choice-nav.is-next {
  right: 8px;
}

.pet-choice-nav:hover {
  transform: translateY(calc(-50% - 1px));
  border-color: rgba(145, 213, 255, 0.3);
  background: linear-gradient(180deg, rgba(48, 56, 69, 0.98) 0%, rgba(28, 34, 45, 0.98) 100%);
}

.pet-choice-nav:disabled {
  opacity: 0.35;
  cursor: default;
  transform: translateY(-50%);
}

.pet-choice-nav-icon {
  width: 17px;
  height: 17px;
  display: block;
}

.pet-choice-nav-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pet-choice-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-height: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(34, 42, 54, 0.96) 0%, rgba(24, 29, 39, 0.98) 100%);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.pet-choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(146, 214, 255, 0.34);
  background: linear-gradient(180deg, rgba(40, 48, 62, 0.98) 0%, rgba(27, 33, 44, 0.98) 100%);
}

.pet-choice-card.is-active {
  border-color: rgba(255, 218, 128, 0.7);
  background: linear-gradient(180deg, rgba(54, 62, 76, 0.98) 0%, rgba(28, 33, 44, 0.98) 100%);
  box-shadow: 0 0 0 2px rgba(255, 214, 122, 0.16);
}

.pet-choice-card.is-pending {
  border-color: rgba(255, 225, 152, 0.82);
  box-shadow: 0 0 0 2px rgba(255, 214, 122, 0.22);
}

.pet-choice-card.is-owned:not(.is-active) {
  border-color: rgba(141, 241, 188, 0.28);
}

.pet-choice-card.is-locked {
  border-color: rgba(255, 255, 255, 0.05);
}

.pet-choice-card.is-unavailable {
  border-color: rgba(255, 182, 120, 0.14);
  background: linear-gradient(180deg, rgba(38, 37, 42, 0.98) 0%, rgba(24, 25, 31, 0.98) 100%);
}

.pet-choice-card:disabled {
  cursor: wait;
}

.pet-choice-card strong {
  display: block;
  margin-top: 10px;
  color: #fff5d4;
  font-size: 1rem;
}

.pet-choice-card span {
  display: block;
  margin-top: 6px;
  color: #a7bfd0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.pet-choice-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.pet-choice-state,
.pet-choice-price {
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.pet-choice-state {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffe1a5;
}

.pet-choice-price {
  color: #9fb6c7;
  text-align: right;
}

.pet-choice-card.is-active .pet-choice-state {
  background: rgba(255, 218, 128, 0.16);
  color: #fff0be;
}

.pet-choice-card.is-owned:not(.is-active) .pet-choice-state {
  background: rgba(124, 233, 173, 0.14);
  color: #c8ffe2;
}

.pet-choice-card.is-locked .pet-choice-state {
  background: rgba(255, 255, 255, 0.06);
  color: #c7d2dd;
}

.pet-choice-card.is-unavailable .pet-choice-state {
  background: rgba(255, 182, 120, 0.12);
  color: #ffd7af;
}

.pet-choice-card.is-unavailable .pet-choice-price {
  color: #d2b79b;
}

.pet-choice-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #121925;
  image-rendering: pixelated;
}

.pet-choice-dialog[hidden] {
  display: none;
}

.pet-choice-dialog {
  position: absolute;
  inset: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border-radius: 18px;
  background: rgba(7, 10, 16, 0.68);
  backdrop-filter: blur(2px);
}

.pet-choice-dialog-card {
  width: min(360px, 100%);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 220, 146, 0.35);
  background: linear-gradient(180deg, rgba(36, 43, 56, 0.98) 0%, rgba(23, 28, 39, 0.98) 100%);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.pet-choice-dialog-card strong {
  display: block;
  color: #fff1c8;
  font-size: 1.08rem;
}

.pet-choice-dialog-card p {
  margin: 10px 0 0;
  color: #d7e4ee;
  font-size: 0.92rem;
  line-height: 1.6;
}

.pet-choice-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.pet-choice-dialog-btn {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #edf6ff;
  font-weight: 700;
}

.pet-choice-dialog-btn.is-confirm {
  border-color: rgba(255, 215, 122, 0.45);
  background: linear-gradient(180deg, rgba(255, 204, 107, 0.2) 0%, rgba(255, 170, 84, 0.16) 100%);
  color: #fff1c2;
}

.pet-choice-dialog-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.pet-game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.9fr);
  gap: 14px;
}

.pet-canvas-card,
.pet-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(28, 34, 44, 0.98) 0%, rgba(21, 26, 34, 0.98) 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.pet-canvas-card {
  padding: 16px;
}

.pet-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.pet-card-head h2 {
  margin: 0;
  color: #f7fbff;
  font-size: 1.2rem;
}

.pet-card-head p {
  margin: 4px 0 0;
  color: #9fb6c4;
  font-size: 0.9rem;
}

.pet-card-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffd99d;
  font-size: 0.8rem;
}

.pet-canvas-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(21, 26, 36, 1) 0%, rgba(18, 20, 28, 1) 100%);
}

.pet-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
}

.pet-signal {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #ecf7ff;
  min-height: 110px;
}

.pet-canvas-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pet-canvas-log .pet-log-list {
  gap: 8px;
}

.pet-signal-label {
  display: block;
  color: #8fdfff;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pet-signal-text {
  margin: 0;
  color: #f2f9ff;
  line-height: 1.6;
}

.pet-sidebar {
  display: grid;
  gap: 12px;
  align-content: start;
}

.pet-panel {
  padding: 15px;
}

.pet-panel h3 {
  margin: 0 0 12px;
  color: #eef9ff;
  font-size: 1.04rem;
}

.pet-panel-caption {
  margin: -4px 0 12px;
  color: #9fc2d2;
  font-size: 0.84rem;
}

.pet-level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pet-level-row strong {
  font-size: 1.2rem;
  color: #fff6dc;
}

.pet-level-row span {
  color: #9fc2d2;
  font-size: 0.9rem;
}

.pet-meter-grid {
  display: grid;
  gap: 10px;
}

.pet-meter-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.pet-meter-row label {
  color: #cad9e5;
  font-size: 0.88rem;
}

.pet-meter-track,
.pet-exp-track {
  position: relative;
  height: 11px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.pet-meter-fill,
.pet-exp-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8df6ff 0%, #ffd480 100%);
  width: 50%;
  transition: width 0.25s ease;
}

.pet-meter-value {
  color: #fff0ce;
  font-size: 0.86rem;
  text-align: right;
}

.pet-exp-track {
  margin-top: 10px;
}

.pet-exp-fill {
  background: linear-gradient(90deg, #ffb45f 0%, #ffef9b 100%);
}

.pet-exp-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: #9db0be;
  font-size: 0.85rem;
}

.pet-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.pet-action-btn,
.pet-secondary-btn {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.07);
  color: #eff8ff;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
}

.pet-action-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 13px 14px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pet-action-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.pet-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(8, 16, 28, 0.22);
  font-size: 1rem;
  flex-shrink: 0;
}

.pet-action-cost {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(8, 16, 28, 0.22);
  color: #fff7d0;
  font-size: 0.74rem;
  font-weight: 700;
}

.pet-action-btn.is-feed {
  border-color: rgba(255, 196, 120, 0.28);
  background: linear-gradient(180deg, rgba(255, 188, 92, 0.2) 0%, rgba(111, 67, 28, 0.24) 100%);
}

.pet-action-btn.is-play {
  border-color: rgba(255, 146, 168, 0.28);
  background: linear-gradient(180deg, rgba(255, 129, 153, 0.18) 0%, rgba(113, 39, 78, 0.24) 100%);
}

.pet-action-btn.is-rest {
  border-color: rgba(148, 204, 255, 0.28);
  background: linear-gradient(180deg, rgba(113, 182, 255, 0.18) 0%, rgba(33, 62, 101, 0.24) 100%);
}

.pet-action-btn.is-clean {
  border-color: rgba(115, 236, 220, 0.28);
  background: linear-gradient(180deg, rgba(86, 216, 198, 0.18) 0%, rgba(23, 81, 92, 0.24) 100%);
}

.pet-action-btn.is-study {
  border-color: rgba(186, 166, 255, 0.28);
  background: linear-gradient(180deg, rgba(156, 135, 255, 0.18) 0%, rgba(58, 44, 108, 0.24) 100%);
}

.pet-action-btn.is-cheer {
  border-color: rgba(255, 226, 126, 0.28);
  background: linear-gradient(180deg, rgba(255, 216, 92, 0.18) 0%, rgba(120, 86, 26, 0.24) 100%);
}

.pet-action-btn {
  transition: transform 0.16s ease, filter 0.16s ease, border-color 0.16s ease;
}

.pet-secondary-btn {
  transition: background 0.16s ease, border-color 0.16s ease;
}

.pet-action-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.pet-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.13);
}

.pet-action-btn:disabled {
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  color: #8fa2b1;
  cursor: not-allowed;
  opacity: 0.46;
}

.pet-action-btn:disabled:hover {
  background: rgba(255, 255, 255, 0.03);
}

.pet-action-btn small,
.pet-secondary-btn small {
  display: block;
  margin-top: 5px;
  color: #aac3d2;
  font-size: 0.78rem;
  font-weight: 400;
}

.pet-secondary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.pet-secondary-btn {
  background: rgba(255, 255, 255, 0.04);
}

.pet-secondary-btn.is-danger {
  border-color: rgba(255, 167, 152, 0.24);
  color: #ffd1c7;
}

.pet-bonus-list,
.pet-log-list {
  display: grid;
  gap: 10px;
}

.pet-bonus-item,
.pet-log-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.pet-bonus-item strong,
.pet-log-item strong {
  display: block;
  margin-bottom: 4px;
  color: #fff4cf;
  font-size: 0.92rem;
}

.pet-bonus-item p,
.pet-log-item p {
  margin: 0;
  color: #cadbe6;
  font-size: 0.86rem;
  line-height: 1.5;
}

.pet-empty-log {
  margin: 0;
  color: #93a9b6;
  font-size: 0.9rem;
}

@media (max-width: 1180px) {
  .pet-choice-grid {
    grid-auto-columns: calc((100% - 12px) / 2.15);
  }
}

@media (max-width: 1000px) {
  .pet-page-hero,
  .pet-game-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .pet-page-hero {
    padding: 18px;
  }

  .pet-chooser-head {
    flex-direction: column;
  }

  .pet-choice-nav {
    display: none;
  }

  .pet-choice-viewport {
    margin: 0 -4px;
  }

  .pet-choice-viewport::before,
  .pet-choice-viewport::after {
    width: 26px;
  }

  .pet-choice-grid {
    grid-auto-columns: 84%;
    scroll-padding-inline: 18px;
    padding: 4px 18px 8px;
  }

  .pet-action-grid,
  .pet-secondary-row {
    grid-template-columns: 1fr;
  }

  .pet-meter-row {
    grid-template-columns: 62px minmax(0, 1fr) 38px;
    gap: 8px;
  }
}
