/* === CSS 변수 및 기본 설정 === */
:root {
    --bg-cream: #FBF8F3;
    --text-dark: #4E4A42;
    --primary-green: #6B7B61;
    --accent-gold: #B0926A;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
}

body {
    font-family: var(--font-sans);
    background-color: var(--primary-green); /* 배경을 어둡게 하여 흰 글씨가 잘 보이게 함 */
    color: white;
    margin: 0;
    padding: 0;
}

/* === 네비게이션 헤더 === */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
    transition: background-color 0.4s ease, padding 0.4s ease;
}

/* 스크롤 시 적용될 스타일 */
header.scrolled {
    background-color: var(--bg-cream);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
header.scrolled .logo,
header.scrolled nav a:not(.cta-button) {
    color: var(--text-dark);
}

/* 로고 */
.logo {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: color 0.4s ease;
}

/* 네비게이션 링크 */
nav a {
    font-family: var(--font-sans);
    text-decoration: none;
    color: white;
    margin-left: 2rem;
    font-weight: 300;
    opacity: 0.9;
    transition: color 0.3s ease, opacity 0.3s;
    font-family: var(--font-serif);
}

nav a:not(.cta-button):hover {
    opacity: 1;
    color: var(--accent-gold);
}

header.scrolled nav a:not(.cta-button):hover {
    color: var(--primary-green);
}

/* === 로그인(CTA) 버튼 === */
.cta-button {
    display: inline-block;
    background-color: var(--primary-green);
    color: white !important; /* 항상 흰색 글씨 유지 */
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.3s;
    line-height: 1.4;
}

.cta-button:hover {
    background-color: #5a6950;
    transform: scale(1.05);
}

/* === 테스트용 콘텐츠 스타일 === */
.content-placeholder {
    height: 200vh; /* 스크롤을 만들기 위한 높이 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* --- 기존 헤더 스타일은 그대로 두세요 --- */


/* Modal Styles - Premium Redesign */
.modal-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(5px); /* 배경 블러 효과 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-wrapper.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    display: flex; /* 좌우 분할 레이아웃 */
    width: 90%;
    max-width: 800px; /* 모달 전체 너비 */
    height: 550px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* 둥근 모서리 적용을 위해 */
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* 부드러운 확대 효과 */
}

.modal-wrapper.open .modal {
    transform: scale(1);
}

.modal-left {
    width: 45%;
    background-image: url('https://images.unsplash.com/photo-1501004318641-b39e6451bec6?q=80&w=1973&auto=format&fit=crop'); /* 고급스러운 식물 이미지 */
    background-size: cover;
    background-position: center;
}

.modal-right {
    width: 55%;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover {
    color: #333;
}

.form-container {
    width: 100%;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header .logo {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    display: block; /* 로고와 h2 사이 간격을 위해 */
    margin-bottom: 10px;
}

.form-header h2 {
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #777;
    margin: 0;
}

.input-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group label {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: #888;
    position: absolute;
    top: -10px;
    left: 10px;
    background-color: #fff;
    padding: 0 5px;
    transition: all 0.3s;
}

.input-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    color: #333;
}

.input-group input:focus {
    outline: none;
    border-color: #555;
}

.input-group input:focus + label,
.input-group input:valid + label { /* 입력값이 있을 때도 label 스타일 유지 */
    color: #333;
}




.cta-button:hover {
    background-color: #000;
    transform: translateY(-2px);
}

.form-switcher {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: #888;
}

.form-switcher a {
    color: #333;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s;
}

.form-switcher a:hover {
    color: #000;
    text-decoration: underline;
}

/* 기존 CSS 코드의 아무 곳에나 추가 */

.agreement-group {
    margin-top: 20px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    /* 기본 체크박스 스타일을 조금 더 깔끔하게 */
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color); /* 체크 시 색상 변경 */
}

.checkbox-group label {
    color: #555;
}

.checkbox-group label a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
}

        .logo {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
        }

        .logo img {
            width: 32px;
            height: 32px;
        }


#bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  /* nav의 메뉴 숨기고, cta-button만 보이게 */
  header nav a:not(.cta-button) {
    display: none !important;
  }
  header nav a.cta-button {
    display: inline-block !important;
    margin-left: auto;
    margin-right: 0;
    color: #fff !important;
    padding: 0.4rem 1.1rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    letter-spacing: -1px;
  }
    header, #main-header {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100%;
    box-shadow: none;
  }
  /* header flex 정렬 및 유저이름, 로고 조정 */
  #main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
    padding: 0 10px;
    position: fixed;
    width: 100vw;
    z-index: 1001;
  }
  .logo {
    font-size: 1.22rem;
    font-weight: 700;
    white-space: nowrap;
  }
  .user-name {
    font-size: 1rem;
    margin-left: 0.6rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
  }
  #bottom-nav, .bottom-nav {
    display: flex !important;
    position: fixed;
    left: 0; bottom: 0;
    width: 100vw;
    height: 58px;
    background: #fff;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
    justify-content: space-around;
    align-items: center;
    z-index: 120;
    border-radius: 16px 16px 0 0;
  }
  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333;
    text-decoration: none;
    font-size: 0.94rem;
    flex: 1;
    transition: color 0.12s;
    padding: 0 2px;
    gap: 1px;
  }
  .nav-item .nav-icon {
    font-size: 1.45rem;
    line-height: 1;
    margin-bottom: 2px;
  }
  .nav-item.active, .nav-item:active, .nav-item:focus {
    color: #4CAF50;
    font-weight: 700;
  }
}