body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #0a0b1a;
    font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #fff;
    height: 100vh;
    position: relative;
    font-size: 16px; /* 기본 폰트 크기 설정 */
}

/* 헤더 스타일 - 다른 페이지와 동일하게 보장 */
.navbar {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    backdrop-filter: blur(10px) !important;
}

.nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1rem 20px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.logo {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: var(--accent) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.logo span {
    font-size: 1rem !important;
    font-weight: 600 !important;
    font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 1.5 !important;
}

.logo-icon {
    width: 30px !important;
    height: 30px !important;
    border: 2px solid var(--accent) !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Noto Sans KR', sans-serif !important;
    font-weight: 700 !important;
}

.nav-links {
    display: flex !important;
    gap: 2rem !important;
}

.nav-links a {
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    padding: 0.5rem 0 !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.3s ease !important;
    font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.nav-links a:hover {
    color: var(--accent) !important;
    border-bottom-color: var(--accent) !important;
}

.nav-links a.active {
    color: var(--accent) !important;
    border-bottom-color: var(--accent) !important;
}

.container {
    width: 100%;
    height: 100%;
    position: relative;
    box-sizing: border-box;
}

.node {
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.node:hover {
    transform: scale(1.1);
}

.hexagram-text {
    fill: white;
    text-anchor: middle;
    dominant-baseline: middle;
    font-size: 12px;
    pointer-events: none;
}

.link {
    stroke-opacity: 0.4;
    stroke-width: 1;
    stroke-linecap: round;
}

.hexagram-content {
    position: absolute;
    background-color: rgba(10, 11, 26, 0.85);
    border-radius: 10px;
    padding: 20px;
    max-width: 400px;
    box-shadow: 0 0 20px rgba(138, 180, 248, 0.2);
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(138, 180, 248, 0.3);
    z-index: 5;
}

.title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    text-align: center;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
    animation-delay: 1s;
    text-shadow: 0 0 15px rgba(138, 180, 248, 0.8);
    z-index: 2;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.description {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    text-align: center;
    opacity: 0;
    width: 80%;
    max-width: 800px;
    animation: fadeIn 2s ease forwards;
    animation-delay: 2s;
    z-index: 2;
}

.guide {
    position: absolute;
    top: 80px;
    left: 30px;
    font-size: 16px;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
    animation-delay: 3s;
    text-align: left;
    max-width: 400px;
    line-height: 1.6;
    z-index: 5;
    background-color: rgba(10, 11, 26, 0.7);
    padding: 15px;
    border-radius: 8px;
}

.drawing-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: crosshair;
    display: none;
}

.circle-counter {
    position: absolute;
    top: 280px;  /* 위치 조정 - 가이드 아래로 이동 */
    left: 30px;
    font-size: 18px;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
    animation-delay: 3.5s;
    z-index: 5;
    background-color: rgba(10, 11, 26, 0.7);
    padding: 10px 15px;
    border-radius: 8px;
}

.start-divination {
    position: absolute;
    top: 340px;  /* 위치 조정 - 카운터 아래로 이동 */
    left: 30px;
    padding: 12px 20px;
    background-color: rgba(138, 180, 248, 0.2);
    border: 1px solid rgba(138, 180, 248, 0.5);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
    animation-delay: 4s;
    transition: background-color 0.3s;
    z-index: 5;
}

.start-divination:hover {
    background-color: rgba(138, 180, 248, 0.4);
}

.drawing-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    display: none;
    z-index: 11;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.drawing-center-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    display: none;
    z-index: 11;
}

.drawing-direction {
    position: absolute;
    top: 50%;
    left: 55%;
    width: 200px;
    height: 2px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.8));
    display: none;
    z-index: 11;
}

.drawing-direction::after {
    content: '';
    position: absolute;
    right: 0;
    top: -6px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 14px solid rgba(255, 255, 255, 0.8);
}

#result-board {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background-color: rgba(10, 11, 26, 0.9);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 40px rgba(138, 180, 248, 0.4);
    display: none;
    border: 1px solid rgba(138, 180, 248, 0.5);
    z-index: 100;
    max-height: 80vh;
    overflow-y: auto;
}

#result-title {
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(138, 180, 248, 0.8);
}

#result-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

.hexagram-lines {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
}

.broken-line .line-segment:nth-child(2) {
    opacity: 100;
}

#close-result {
    padding: 10px 20px;
    background-color: rgba(138, 180, 248, 0.3);
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

#more-result:hover {
    background-color: rgba(138, 180, 248, 0.5);
}

#more-result {
    padding: 10px 20px;
    background-color: rgba(138, 180, 248, 0.3);
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

#close-result:hover {
    background-color: rgba(138, 180, 248, 0.5);
}

#wormhole-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    display: none;
}

.typing-effect::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* CSS 수정 */
.hexagram-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 8px 0;
}

.line-segment {
    height: 8px;
    background-color: #fff;
    border-radius: 2px;
}

.broken-line .line-segment {
    width: 45px;
}

.broken-line {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
}