/* 기본 스타일 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 20px;
}

h1, h2, h3 {
  margin-bottom: 15px;
}

button {
  padding: 8px 15px;
  background-color: #5e35b1;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 5px;
}

button:hover {
  background-color: #5e35b1;
}

button.cancel-btn {
  background-color: #f44336;
}

button.cancel-btn:hover {
  background-color: #d32f2f;
}

/* 로그인/회원가입 폼 */
.auth-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

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

.form-group input, .form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.form-actions {
  margin-top: 20px;
  text-align: right;
}

/* 방 목록 */
.room-actions {
  margin-bottom: 15px;
}

#room-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.room-item {
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 15px;
}

.room-item h3 {
  margin-bottom: 10px;
}

.room-item p {
  margin-bottom: 8px;
}

/* 방 페이지 */
.room-content {
  display: flex;
  gap: 20px;
}

.sidebar {
  width: 30%;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 15px;
}

.quiz-area {
  width: 70%;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 15px;
  min-height: 500px;
}

.participant {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.owner-badge {
  background-color: #4caf50;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.8em;
  margin-left: 5px;
}

/* 퀴즈 관련 스타일 */
.question-container {
  text-align: center;
}

.question-content {
  margin: 20px 0;
}

.question-media {
  max-width: 100%;
  max-height: 300px;
  margin: 15px 0;
  border-radius: 5px;
}

.options-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.option-btn {
  padding: 15px;
  font-size: 16px;
}

.option-btn.selected {
  background-color: #03a9f4;
}

.option-btn.disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* 답변 상태 */
#answer-status {
  margin-top: 20px;
  background-color: #f9f9f9;
  padding: 10px;
  border-radius: 5px;
}

.answer-status-item {
  padding: 8px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}

.correct {
  color: #4caf50;
}

.incorrect {
  color: #f44336;
}

/* 결과 화면 */
.results-container, .final-results-container {
  text-align: center;
}

.participants-results table, .final-results-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
}

.participants-results th, .participants-results td,
.final-results-table th, .final-results-table td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
}

.participants-results th, .final-results-table th {
  background-color: #f5f5f5;
}

.winner {
  background-color: #fff9c4;
  font-weight: bold;
}

.return-buttons {
  margin-top: 20px;
}

.waiting-text {
  margin-top: 15px;
  font-style: italic;
  color: #666;
} 