:root {
    /* 새 색상 스키마 */
    --primary: #3C8D99;
    --primary-dark: #2563eb;
    --secondary: #6FCCB4;
    --accent: #FFB347;
    
    /* 기존 변수 (참조용) */
    --policy-primary: var(--primary);
    --policy-light: rgba(111, 204, 180, 0.2); /* 변경: 새로운 secondary 색상 기반 */
    --policy-dark: #065F46;
    --policy-medium: var(--secondary);
    --warning-color: #EF4444;
    --warning-light: #FEF2F2;
    --text-dark: #111827;
    --text-medium: #374151;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

.header {
	padding: 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    background-color: white;
}

.back-button {
    position: absolute;
    left: 16px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    color: var(--text-medium);
    cursor: pointer;
    font-size: 16px;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    display:none;
}

.title-area {
    text-align: center;
    margin-bottom: 32px;
}

h1 {
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 12px;
}

.form-description {
    color: var(--text-medium);
    font-size: 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-medium);
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-dark);
    transition: all 0.3s;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(111, 204, 180, 0.2);
}

.address-wrapper {
    display: flex;
    gap: 8px;
}

.address-wrapper .form-control {
    flex: 1;
}

.address-button {
    padding: 14px 16px;
    background-color: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.address-button:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-card {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

.radio-card label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
    font-weight: 400;
}

.radio-card input[type="radio"] {
    display: none;
}

.radio-card input[type="radio"]:checked + label {
    background-color: var(--policy-light);
    color: var(--primary);
    border-color: var(--secondary);
    font-weight: 500;
}

.error-message {
    color: var(--warning-color);
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--text-medium);
    margin-top: 12px;
}

.btn-outline:hover, .btn-outline:focus {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.flatpickr-input {
    background-color: white;
}

/* 결과 페이지 스타일 */
.page {
    display: none;
}

.page.active {
    display: block;
}

.result-page {
    text-align: center;
    padding: 24px 0;
}

.result-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--policy-light);
}

.result-icon svg {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.result-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
}

.result-message {
    color: var(--text-medium);
    margin-bottom: 24px;
    font-size: 15px;
}

.result-email {
    background-color: var(--policy-light);
    padding: 16px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 32px;
    font-size: 18px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

/* 로딩 애니메이션 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.loading.active {
    display: flex !important;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--policy-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 모바일 최적화 */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }

    .radio-group {
        gap: 12px;
    }

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

    .btn {
        padding: 14px;
    }
    .header-title {
	    font-size: 18px;
	    font-weight: 700;
	    color: var(--primary);
	    display:block;
	}
	.header {
	 padding: 16px 0;
	}
}


  /* 모바일 디바이스 테두리 */
  .device-wrapper {
    width: 390px; /* 고정 너비 */
    margin: 20px auto;
    border: 12px solid #111;
    border-radius: 36px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    height: 800px;
    overflow: hidden;
    position: relative;
    background-color: white;
  }
  
  /* 모바일 디바이스 상단 노치 */
  .device-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 25px;
    background-color: #111;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    z-index: 1000;
  }
  
  .device-screen {
    height: 100%;
    overflow-y: auto;
    position: relative;
  }
  
  /* 모바일 기기에서는 테두리 제거 (768px 이하의 화면) */
  @media (max-width: 768px) {
    html, body {
      background-color: #f5f5f5;
      display: block;
    }
    
    .device-wrapper {
      margin: 0;
      border: none;
      border-radius: 0;
      box-shadow: none;
      width: 100%;
      max-width: none;
      height: 100vh;
    }
    
    .device-notch {
      display: none;
    }
    
	.header-title {
	    font-size: 18px;
	    font-weight: 700;
	    color: var(--primary);
	    display:block;
	}
	.header {
	 padding: 16px 0;
	}
  }