/* 토스 스타일 디자인 */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* 회원가입 페이지 스타일 */
.signup-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: #f8f9fa;
}

.signup-content {
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 1600px;
  width: 100%;
  position: relative;
  animation: slideUp 0.6s ease-out;
}

/* 컨텐츠 래퍼 */
.content-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

/* 데스크탑에서는 이미지와 폼이 가로로 배치 */
@media (min-width: 768px) {
  .content-wrapper {
    flex-direction: row;
    min-height: 600px;
  }
  
  .image-container {
    flex: 1;
    max-width: 55%;
    border-radius: 24px 0 0 24px;
    padding: 0;
    min-height: 600px;
    background-size: cover !important;
    background-position: center !important;
  }
  
  .form-container {
    flex: 1;
    max-width: 45%;
  }
}

/* 이미지 컨테이너 */
.image-container {
  background: url('https://assets.snssupporter.com/assets/images/signin/signup_image.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.image-container img {
  display: none;
}

/* 모바일에서는 이미지가 위쪽에 */
@media (max-width: 767px) {
  .image-container {
    padding: 0;
    min-height: 300px;
    border-radius: 24px 24px 0 0;
  }
  
  .image-container img {
    display: none;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 헤더 스타일 */
.signup-header {
  background: white;
  color: #333;
  padding: 30px 30px 20px;
  text-align: center;
  position: relative;
}

.signup-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
  color: #3182f6;
}

.signup-subtitle {
  font-size: 16px;
  color: #64748b;
  margin: 0;
  font-weight: 400;
}

/* 폼 컨테이너 */
.form-container {
  padding: 0 30px 30px;
}

/* 입력 필드 스타일 */
.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.form-control {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #f1f3f4;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #fafbfc;
  color: #333;
}

.form-control:focus {
  outline: none;
  border-color: #3182f6;
  background: white;
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.15);
}

.form-control:hover:not(:focus) {
  border-color: #e1e5e9;
}

.form-control::placeholder {
  color: #8b95a1;
}

/* 회원가입 페이지 전용 버튼 스타일 */
.signup-btn-primary {
  background: linear-gradient(135deg, #3182f6 0%, #0064ff 100%);
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  letter-spacing: -0.2px;
}

.signup-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(49, 130, 246, 0.4);
}

.signup-btn-primary:active {
  transform: translateY(0);
}

.signup-btn-outline {
  background: white;
  border: 2px solid #f1f3f4;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.signup-btn-outline:hover {
  border-color: #3182f6;
  color: #3182f6;
}

.signup-btn-submit {
  background: #3182f6;
  border: none;
  padding: 18px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 20px;
}

.signup-btn-submit:hover {
  background: #0064ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(49, 130, 246, 0.4);
}

/* 체크박스 스타일 */
.form-check {
  display: flex;
  align-items: flex-start;
  margin: 20px 0;
}

.form-check-input {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  margin-top: 2px;
  accent-color: #3182f6;
}

.form-check-label {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  cursor: pointer;
}

.form-check-label span {
  color: #3182f6;
  font-weight: 600;
}

/* 링크 스타일 */
a {
  color: #3182f6;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0064ff;
}

/* 행 레이아웃 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: -8px;
}

.col-md-6 {
  flex: 1;
  min-width: 0;
  padding: 8px;
}

@media (max-width: 768px) {
  .col-md-6 {
    flex: 1 1 100%;
  }
}

/* 구분선 */
hr {
  border: none;
  height: 1px;
  background: #f1f3f4;
  margin: 30px 0;
}

/* 섹션 제목 */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 30px 0 20px;
  letter-spacing: -0.3px;
}

.section-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* 회원가입 토글 버튼 */
.signup-toggle-btn {
  background: linear-gradient(135deg, #3182f6 0%, #0064ff 100%);
  border: none;
  padding: 18px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
  display: block;
  margin: 20px 0;
  text-decoration: none;
}

.signup-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(49, 130, 246, 0.4);
  color: white;
}

/* 알림 메시지 */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: none;
  font-size: 14px;
  font-weight: 500;
}

.alert-success {
  background: #e8f5e8;
  color: #2e7d32;
}

.alert-danger {
  background: #ffebee;
  color: #c62828;
}

/* 반응형 디자인 */
@media (max-width: 576px) {
  .signup-content {
    margin: 10px;
    border-radius: 20px;
  }
  
  .signup-header {
    padding: 25px 20px 15px;
  }
  
  .signup-title {
    font-size: 22px;
    line-height: 1.3;
  }
  
  .signup-subtitle {
    font-size: 14px;
    line-height: 1.4;
  }
  
  .form-container {
    padding: 0 20px 20px;
  }
  
  .form-control {
    padding: 16px 18px;
    font-size: 16px;
  }
  
  .form-group label {
    font-size: 14px;
    font-weight: 600;
  }
  
  .section-title {
    font-size: 18px;
    margin: 25px 0 15px;
  }
  
  .section-subtitle {
    font-size: 13px;
    margin-bottom: 15px;
  }
  
  .signup-btn-primary, .signup-btn-submit {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
  }
  
  .signup-toggle-btn {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
  }
  
  .form-check-label {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .sms-card-title {
    font-size: 16px;
  }
  
  .sms-card-text {
    font-size: 13px;
  }
  
  .alert {
    padding: 14px 16px;
    font-size: 13px;
  }
}

/* SMS 인증 스타일 */
.sms-verification-section {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-top: 24px;
  transition: all 0.3s ease;
}

.sms-verification-section:hover {
  border-color: #3182f6;
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.1);
}

.sms-card-title {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  color: #3182f6;
  margin-bottom: 8px;
}

.sms-card-title i {
  margin-right: 8px;
}

.sms-card-text {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
}

.step-indicator::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: #e2e8f0;
  z-index: 1;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
}

.step.completed + .step::before {
  background: #10b981;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  margin: 0 auto 8px;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: #3182f6;
  color: white;
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.3);
}

.step.completed .step-number {
  background: #10b981;
  color: white;
}

.step-text {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.step.active .step-text {
  color: #3182f6;
  font-weight: 600;
}

.step.completed .step-text {
  color: #10b981;
  font-weight: 600;
}

.input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: stretch;
}

.input-group .form-control {
  flex: 1;
  min-width: 0;
}

.input-group .signup-btn-primary {
  flex: 0 0 auto;
  min-width: 140px;
  white-space: nowrap;
  padding: 16px 20px;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
}

.timer-display {
  font-weight: 600;
  font-size: 14px;
  color: #3182f6;
  min-width: 50px;
}

.timer-display.text-danger {
  color: #ef4444 !important;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sms-message {
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  border: none;
  font-size: 14px;
  font-weight: 500;
}

.sms-message i {
  margin-right: 8px;
}

.sms-message.alert-success {
  background: #dcfce7;
  color: #166534;
}

.sms-message.alert-danger {
  background: #fef2f2;
  color: #dc2626;
}

.sms-message.alert-warning {
  background: #fef3c7;
  color: #d97706;
}

.d-flex {
  display: flex;
}

.gap-2 {
  gap: 12px;
}

.flex-fill {
  flex: 1;
}

.d-none {
  display: none !important;
}

.verification-success {
  background: #dcfce7;
  color: #166534;
  border: 2px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
}

.verification-success i {
  margin-right: 8px;
}

@media (max-width: 576px) {
  .step-number {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .step-text {
    font-size: 12px;
  }
  
  .sms-verification-section {
    padding: 20px;
  }
  
  .input-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .input-group .form-control {
    width: 100%;
    padding: 18px 20px;
    font-size: 16px;
    min-height: 56px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
  }
  
  .input-group .form-control:focus {
    border-color: #3182f6;
    box-shadow: 0 4px 12px rgba(49, 130, 246, 0.15);
  }
  
  .input-group .signup-btn-primary {
    width: 100%;
    min-width: auto;
    padding: 18px 20px;
    font-size: 16px;
    min-height: 56px;
  }
  
  .d-flex.gap-2 {
    flex-direction: column;
    gap: 12px;
  }
  
  .d-flex.gap-2 .signup-btn-outline,
  .d-flex.gap-2 .signup-btn-primary {
    width: 100%;
    padding: 18px 20px;
    font-size: 16px;
    min-height: 56px;
  }
  
  .input-group-text {
    padding: 18px 20px;
    font-size: 16px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}