/* 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 */
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); /* 반응형 폰트 크기 */
}

.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-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 20px;
  background-color: #1a1a1a; /* 어두운 배경색 */
}

.shop-item {
  background-color: #2b2b2b; /* 어두운 카드 배경 */
  color: #f1f1f1;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 250px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.item-image-container {
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 15px;
}

.item-image {
  width: 100%;
  height: auto;
}

.item-name {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 5px;
}

.item-description {
  font-size: 14px;
  color: #cccccc;
  margin-bottom: 10px;
}

.item-price {
  font-size: 16px;
  font-weight: bold;
  color: #66ccff;
  margin-bottom: 15px;
}

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

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

.purchase-btn:hover {
  background-color: #218838;
}

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

.edit-btn:hover {
  background-color: #0056b3;
}

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

.delete-btn:hover {
  background-color: #c82333;
}

.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;
}

/* 반응형 스타일 */
@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-grid {
    grid-template-columns: 1fr;
  }

  .shop-item {
    width: 100%;
  }
  .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;
  }
}

/* 태블릿 스타일 */
@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%;
  pointer-events: none;
  /* z-index: -1; */
  overflow: hidden;
}

.emoji {
  position: absolute;
  font-size: 24px; /* 이모지 크기 */
  opacity: 0.8;
  animation: emojiSnowfall linear infinite;
}

@keyframes emojiSnowfall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(100vh) 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;
}

.emoji {
  opacity: 0;
  position: absolute;
  cursor: pointer;
  transition: transform 0.3s ease-out;
  z-index: 999; /* 이모지가 다른 요소 위에 표시되도록 설정 */
  pointer-events: auto; /* 이모지가 클릭 가능하도록 설정 */
}

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

@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;
  }
}
