/* 기본 & 폰트 설정 */
:root {
    --main-bg-color: #f0f2f5;
    --text-color: #333;
    --primary-color: #8A2BE2; /* BlueViolet */
    --white-color: #FFFFFF;
    --selected-color: #28a745; /* Green */
    --divider-color: #e0e0e0;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--main-bg-color);
    color: var(--text-color);
    margin: 0;
    padding-top: 80px; /* 헤더 높이만큼 패딩 추가 */
    background-image: url('data:image/svg+xml,%3Csvg width="6" height="6" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%239C92AC" fill-opacity="0.1"%3E%3Cpath d="M5 0h1L0 6V5zM6 5v1H5z"/%3E%3C/g%3E%3C/svg%3E');
}

/* --- 공통 헤더 스타일 --- */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--divider-color);
    padding: 0 40px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.site-header .logo a {
    font-size: 1.5em;
    font-weight: 900;
    color: var(--primary-color);
    text-decoration: none;
}

.site-header .main-nav a {
    margin-left: 25px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.site-header .main-nav a:hover, .site-header .main-nav a.active {
    color: var(--primary-color);
}
/* ------------------------ */

.container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 40px;
    text-align: center;
}

#game-container {
    background: var(--white-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#question-area h1 {
    color: var(--text-color);
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 30px;
}

#choices-area {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
}

.choice-card {
    background: var(--white-color);
    border: 2px solid var(--divider-color);
    border-radius: 12px;
    padding: 30px;
    width: 45%;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0, 0.05);
    position: relative;
}

.choice-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(138, 43, 226, 0.2);
}

.choice-card.selected {
    border-color: var(--selected-color);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
    cursor: not-allowed;
}

.choice-text {
    font-size: 1.5em;
    font-weight: 700;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-divider {
    font-size: 2em;
    font-weight: 900;
    color: var(--primary-color);
}

.result-percent {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 15px;
    display: none;
}

#next-button {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 1.2em;
    cursor: pointer;
    margin-top: 40px;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

#next-button:hover {
    background-color: #7A1CC2;
    transform: scale(1.05);
}

.hidden {
    display: none !important;
}

/* 댓글 섹션 */
#comments-section {
    margin-top: 50px;
    text-align: left;
    border-top: 1px solid var(--divider-color);
    padding-top: 30px;
    background: var(--white-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#comment-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

#comment-title .choice-badge {
    background-color: var(--selected-color);
    color: var(--white-color);
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 10px;
}

#comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#comment-form input, #comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--divider-color);
    border-radius: 8px;
    font-family: 'Pretendard', sans-serif;
    font-size: 1em;
}

#comment-form button {
    align-self: flex-end;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#comment-form button:hover {
    background-color: #7A1CC2;
}

#comments-list .comment {
    background: #fafafa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e9e9e9;
}

.comment .author {
    font-weight: 700;
    color: #555;
    margin-bottom: 5px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .site-header {
        padding: 0 20px;
        height: auto;
        flex-direction: column;
        padding-bottom: 10px;
    }
    body {
        padding-top: 120px; /* 모바일 헤더 높이 조정 */
    }
    .container {
        padding: 10px;
    }

    #choices-area {
        flex-direction: column;
    }

    .choice-card {
        width: 100%;
    }

    .vs-divider {
        margin: 10px 0;
    }
}
