/* 기본 스타일 */
body {
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #FFF6E9;
  color: #333;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 350px;
  height: 350px;
  background-color: rgba(199, 176, 227, 0.3);
  border-radius: 50%;
  z-index: 0;
  animation: float 8s ease-in-out infinite;
}

body::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 280px;
  height: 280px;
  background-color: rgba(247, 205, 100, 0.2);
  border-radius: 50%;
  z-index: 0;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0);
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  position: relative;
}

h1 {
  margin: 0;
  color: #4b4dcc;
  font-size: 32px;
  flex-grow: 1;
  text-align: center;
  position: relative;
 
}

.header-buttons {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.back-btn, .create-btn {
  z-index: 1;
  height: 48px;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: #f3f0ff;
  color: #6c5ce7;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6em 1.4em 0.6em 1.1em;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.08);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.13s;
  outline: none;
}

.back-btn svg, .create-btn svg {
  margin-right: 0.5em;
  width: 1.1em;
  height: 1.1em;
  vertical-align: middle;
  fill: currentColor;
  display: inline-block;
  transition: transform 0.18s;
}

.back-btn:hover, .back-btn:focus,
.create-btn:hover, .create-btn:focus {
  background: #e5dbff;
  color: #5649c0;
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.18);
  transform: translateY(-2px) scale(1.04);
}


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

.user-info {
  font-weight: 600;
}

/* 참가 폼 스타일 */
.join-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.join-form-container {
  background-color: white;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.join-form-container::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 160px;
  height: 160px;
  background-color: rgba(255, 144, 57, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.join-form-container::after {
  content: "";
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 100px;
  height: 100px;
  background-color: rgba(75, 77, 204, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.join-form-container h2 {
  margin-top: 0;
  color: #4b4dcc;
  font-size: 24px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.join-form-container p {
  color: #666;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group label {
  margin-bottom: 5px;
  font-weight: 600;
  color: #4b4dcc;
}

.form-group input {
  padding: 15px;
  border: 2px solid #e0e6fa;
  border-radius: 15px;
  font-size: 18px;
  text-align: center;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.form-group input:focus {
  border-color: #4b4dcc;
  outline: none;
  box-shadow: 0 0 0 3px rgba(75, 77, 204, 0.1);
}

.form-group small {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}

.primary-btn, .secondary-btn {
  color: white;
  border: none;
  border-radius: 50px;
  padding: 15px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.primary-btn {
  background-color: #4b4dcc;
}

.primary-btn:hover {
  background-color: #3e3fb8;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(75, 77, 204, 0.3);
}

.secondary-btn {
  background-color: #ff9039;
}

.secondary-btn:hover {
  background-color: #f77d20;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 144, 57, 0.3);
}

.primary-btn:active, .secondary-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hidden {
  display: none;
}

#room-info {
  background-color: #f0f4fe;
  padding: 20px;
  border-radius: 15px;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

#room-info.hidden {
  opacity: 0;
  transform: translateY(-20px);
}

.room-info-header {
  margin-bottom: 15px;
}

.room-info-header h3 {
  margin: 0 0 10px 0;
  color: #4b4dcc;
}

.message-area {
  margin-bottom: 20px;
}

.alert {
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 15px;
  position: relative;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-success {
  background-color: #e6f7e9;
  color: #2e7d32;
  border-left: 4px solid #2e7d32;
}

.alert-danger {
  background-color: #fdeded;
  color: #d32f2f;
  border-left: 4px solid #d32f2f;
}

.alert-warning {
  background-color: #fff8e1;
  color: #ff8f00;
  border-left: 4px solid #ff8f00;
}

.alert-info {
  background-color: #e3f2fd;
  color: #0288d1;
  border-left: 4px solid #0288d1;
}

.btn-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  float: right;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.btn-close:hover {
  opacity: 1;
}

/* 반응형 */
@media (max-width: 768px) {
  .join-form-container {
    padding: 30px 20px;
  }
  
  .modal-content {
    margin: 10% auto;
    width: 95%;
  }
}
