/* --- 1. Font Imports --- */
@font-face {
    font-family: 'Paperlogy';
    src: url('fonts/Paperlogy-4Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Pretendard';
    src: url('fonts/PretendardVariable.woff2') format('woff2-variations');
    font-weight: 400 700;
}

/* --- 2. Theme & Root Variables --- */
:root {
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --footer-height: 60px; /* 푸터 높이 변수 */
}

body[data-theme="nordic-noir"] {
    --primary: #88C0D0; --primary-darker: #70A9BF; --background: #2E3440;
    --surface: #3B4252; --text-main: #ECEFF4; --text-secondary: #D8DEE9;
    --border: #4C566A; --surface-active: #4C566A;
}

/* [수정] 라이트 테마 색상 값들을 요청에 맞춰 정확하게 수정 */
body[data-theme="aetherial-light"] {
    --primary: #A0D2DB; --primary-darker: #7EACB3; --background: #F8F9FA;
    --surface: #FFFFFF; --text-main: #343A40; --text-secondary: #6C757D;
    --border: #CED4DA; --surface-active: #e9ecef;
}

/* --- 3. General & Layout --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    font-family: 'Pretendard', sans-serif;
    margin: 0;
    padding: 20px 20px var(--footer-height) 20px;
    line-height: 1.7;
    text-align: center;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.header {
    margin-bottom: 50px;
}

h1#home-title {
    font-family: 'Paperlogy', serif;
    font-size: 3em;
    font-weight: normal;
    color: var(--text-main);
    margin: 0 0 10px 0;
    cursor: pointer;
    display: inline-block;
}

.subtitle {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin: 0;
}

.hidden {
    display: none !important;
}

/* --- 4. Card & Test Section --- */
.card-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.job-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    overflow: hidden;
    padding: 20px 5px; 
}

.job-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.card-image {
    width: 85%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px auto;
    filter: brightness(0.8);
}
body[data-theme="aetherial-light"] .card-image {
    filter: brightness(0.9);
}


.card-text {
    padding: 0;
}

.card-text h2 {
    font-family: 'Paperlogy', serif;
    margin: 0 0 5px 0;
    font-size: 1.8em;
    font-weight: normal;
    color: var(--text-main);
}

.card-text p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-secondary);
}

#test-invitation {
    margin: 50px 0;
    color: var(--text-secondary);
}

/* --- 5. Buttons & Interactive Elements --- */
.main-btn {
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color var(--transition-speed) ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
body[data-theme="aetherial-light"] .main-btn {
    color: #fff;
}


.main-btn:hover {
    background-color: var(--primary-darker);
}

#test-area {
    background-color: var(--surface);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    margin-top: 30px;
}

#progress-bar {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

#question-text {
    font-size: 1.4em;
    color: var(--text-main);
    font-weight: bold;
    min-height: 100px;
    text-align: justify;
}

.answer-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.answer-btn {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    font-size: 1.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.answer-btn:hover {
    background-color: var(--surface-active);
    color: var(--text-main);
    border-color: var(--primary);
}

/* --- 6. Result Area --- */
#result-area {
    margin: 40px 0;
}

#result-content-wrapper {
    text-align: justify;
    background-color: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    padding: 40px 50px;
}

.result-header {
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.result-image {
    max-width: 150px;
    height: auto;
    margin: 0 auto 20px auto;
    display: block;
    filter: brightness(0.8);
}
body[data-theme="aetherial-light"] .result-image {
    filter: brightness(0.9);
}


#result-content-wrapper h2 {
    font-family: 'Paperlogy', serif;
    font-size: 2.8em;
    font-weight: normal;
    color: var(--primary);
    margin: 0;
}

#result-content-wrapper .result-slogan {
    font-size: 1.2em;
    font-style: italic;
    color: var(--text-secondary);
    margin: 10px 0 0 0;
}

#result-content-wrapper h3 {
    font-size: 1.5em;
    color: var(--text-main);
    border-bottom: 1px solid var(--primary);
    padding-bottom: 10px;
    margin: 40px 0 15px 0;
}

#result-content-wrapper p {
    font-size: 1.05em;
    color: var(--text-main);
}

#share-button-wrapper {
    margin-top: 40px;
    text-align: center;
}

/* [추가] 결과 화면 버튼들을 감싸는 래퍼 스타일 */
.result-buttons-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}


/* --- 7. Footer & Theme Selector --- */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-height);
    background-color: var(--background);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    z-index: 100;
}

.footer-credit {
    font-size: 0.9em;
    color: var(--text-secondary);
}
.footer-credit a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}
.footer-credit a:hover {
    text-decoration: underline;
}

.theme-buttons {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--surface);
}

.theme-btn {
    height: 38px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
    transition: background-color var(--transition-speed);
}
.theme-btn:first-child { border-right: 1px solid var(--border); }
.theme-btn.active { background-color: var(--surface-active); }
.theme-btn:not(.active):hover { background-color: color-mix(in srgb, var(--surface) 80%, var(--primary) 20%); }

.theme-btn .color-patch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* --- 8. Responsive Design --- */
@media (max-width: 800px) {
    h1#home-title { font-size: 2.5em; }
    .card-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    h1#home-title { font-size: 2.2em; }
    .card-container { grid-template-columns: 1fr; }
    #result-content-wrapper { padding: 30px 20px; }
    .footer { flex-direction: column; height: auto; padding: 10px; gap: 10px;}
}