:root {
    --bg-color: #fff;
    --text-color: #333;
    --card-bg: white;
    --card-border: #f0f0f0;
    --cta-bg: #fdfdfd;
    --cta-border: #eee;
    --radius-bg: #fff3f4;
    --footer-text: #bbb;
    --footer-border: #eee;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #eee;
    --card-bg: #1e1e1e;
    --card-border: #333;
    --cta-bg: #1e1e1e;
    --cta-border: #333;
    --radius-bg: #2e1a1b;
    --footer-text: #888;
    --footer-border: #333;
}

/* 1. 기본 스타일 및 레이아웃 초기화 */
* { box-sizing: border-box; }
body { 
    font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; 
    margin: 0; 
    line-height: 1.6; 
    color: var(--text-color); 
    background-color: var(--bg-color); 
    transition: background-color 0.3s, color 0.3s;
}

/* Top Right Controls */
.top-right-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
}

/* Theme Switcher */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display:none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}

input:checked + .slider {
    background-color: #ff5f6d;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Language Selector */
.lang-select {
    margin-left: 15px;
}

#lang-selector {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    padding: 5px;
    border-radius: 5px;
}


/* 2. 상단 언어 선택 바 (버튼 크기 완벽 통일) */
.lang-switcher { 
    background: #222; 
    padding: 15px 5px; 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.lang-btn { 
    background: transparent; 
    border: 1px solid rgba(255,255,255,0.5); 
    color: white; 
    padding: 10px 0; 
    margin: 5px; 
    cursor: pointer; 
    border-radius: 6px; 
    font-size: 0.85rem; 
    transition: all 0.3s ease;
    /* 핵심: 모든 언어 버튼 너비를 110px로 고정 */
    width: 110px; 
    text-align: center;
    text-decoration: none;
}

.lang-btn:hover, .lang-btn.active { 
    background: #ff5f6d; 
    border-color: #ff5f6d; 
    font-weight: bold;
    transform: translateY(-2px);
}

/* 3. 메인 히어로 섹션 */
header { 
    background: linear-gradient(135deg, #ff5f6d, #ffc371); 
    color: white; 
    padding: 100px 20px; 
    text-align: center; 
}
h1 { font-size: 3.5rem; margin-bottom: 10px; letter-spacing: -1px; }
.subtitle { font-size: 1.2rem; opacity: 0.95; font-weight: 300; }

/* 4. 콘텐츠 영역 */
.container { max-width: 900px; margin: 0 auto; padding: 60px 20px; }

h2 { font-size: 2rem; color: var(--text-color); }
.radius-info { 
    background: var(--radius-bg); 
    border-left: 6px solid #ff5f6d; 
    padding: 25px; 
    margin: 30px 0; 
    font-weight: bold; 
    font-size: 1.1rem;
    border-radius: 0 10px 10px 0;
}

.feature-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 25px; 
    margin-top: 50px; 
}
.card { 
    border: 1px solid var(--card-border); 
    padding: 30px; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    background: var(--card-bg);
    transition: 0.3s;
}
.card:hover { transform: translateY(-5px); }
.card h3 { color: #ff5f6d; margin-top: 0; font-size: 1.4rem; }

/* How it works */
.how-it-works { margin-top: 60px; }
.step { display: flex; align-items: center; margin-bottom: 40px; }
.step-number { font-size: 3rem; font-weight: bold; color: #ff5f6d; margin-right: 30px; }
.step-content h3 { font-size: 1.5rem; margin-top: 0; }

/* Detailed Features */
.detailed-features { margin-top: 60px; }
.detailed-features ul { list-style: none; padding: 0; }
.detailed-features li { margin-bottom: 15px; font-size: 1.1rem; }

/* About Us */
.about-us { margin-top: 60px; }

/* Q&A List */
.qa-list .qa-post {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--card-border);
}
.qa-list .qa-post:last-child {
    border-bottom: none;
}
.qa-list h3 {
    color: #ff5f6d;
}

/* Q&A Form */
.qa-form { margin-top: 60px; }
.qa-form textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background-color: var(--card-bg);
    color: var(--text-color);
    margin-bottom: 15px;
}
.qa-form button {
    background: #ff5f6d;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}
.qa-form button:hover {
    background: #e04e5a;
}


/* FAQ */
.faq { margin-bottom: 30px; }
.faq h3 { font-size: 1.2rem; color: #ff5f6d; }


/* 5. 이메일 수집 (CTA) 섹션 */
.cta-section { 
    text-align: center; 
    background: var(--cta-bg); 
    padding: 80px 20px; 
    border-radius: 30px; 
    margin-top: 60px;
    border: 1px solid var(--cta-border);
}
.email-form { margin-top: 30px; display: none; animation: fadeIn 0.5s ease; } 

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

.email-input { 
    padding: 18px 25px; 
    width: 350px; 
    border: 2px solid #ddd; 
    border-radius: 40px; 
    outline: none; 
    font-size: 1rem;
    transition: 0.3s;
}
.email-input:focus { border-color: #ff5f6d; box-shadow: 0 0 10px rgba(255,95,109,0.2); }

.submit-btn { 
    background: #ff5f6d; 
    color: white; 
    padding: 18px 40px; 
    border: none; 
    border-radius: 40px; 
    font-weight: bold; 
    cursor: pointer; 
    margin-left: 10px;
    font-size: 1rem;
    transition: 0.3s;
}
.submit-btn:hover { background: #e04e5a; box-shadow: 0 5px 15px rgba(224,78,90,0.3); }

.btn-main { 
    background: #ff5f6d; 
    color: white; 
    padding: 20px 50px; 
    border-radius: 40px; 
    font-weight: bold; 
    display: inline-block; 
    cursor: pointer;
    border: none;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(255,95,109,0.2);
    transition: 0.3s;
}
.btn-main:hover { transform: scale(1.05); background: #e04e5a; }

footer {
    text-align: center; 
    padding: 50px; 
    color: var(--footer-text); 
    font-size: 0.9rem; 
    border-top: 1px solid var(--footer-border);
}

/* 반응형 설정 */
@media (max-width: 768px) { 
    h1 { font-size: 2.5rem; }
    .feature-grid { grid-template-columns: 1fr; } 
    .email-input, .submit-btn { width: 100%; margin: 8px 0; }
    .lang-btn { width: 46%; margin: 2%; } 
}