
/* 타로 카드 전용 스타일 */
.tarot-board {
    text-align: center;
    padding: 40px 0;
    cursor: pointer;
}

.card-deck {
    width: 200px;
    height: 340px;
    background: linear-gradient(135deg, #2c3e50, #000000);
    border-radius: 15px;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #d4af37; /* 금색 테두리 */
    transition: transform 0.3s;
}

.card-deck:hover {
    transform: translateY(-10px); /* 마우스 올리면 둥실 */
}

.card-back {
    color: #d4af37;
    text-align: center;
}

.card-back .pattern {
    font-size: 5rem;
    display: block;
    margin-bottom: 10px;
}

.tarot-result-card {
    text-align: center;
    margin-bottom: 30px;
}

.tarot-img {
    font-size: 8rem; /* 이모지 크기 */
    margin-bottom: 10px;
    animation: popIn 0.5s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.keyword-badge {
    color: #6c5ce7;
    font-weight: bold;
    background: #f0f0ff;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    margin: 10px 0;
}

.result-details .detail-item {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: left;
}
.result-details strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

/* [타로 그리드 스타일] */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); /* 반응형 그리드 */
    gap: 10px;
    padding: 10px;
    max-width: 800px;
    margin: 0 auto;
}

/* 개별 작은 카드 뒷면 */
.mini-card {
    background: linear-gradient(135deg, #2c3e50, #000);
    border: 1px solid #d4af37;
    border-radius: 5px;
    aspect-ratio: 2/3; /* 카드 비율 유지 */
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 1.2rem;
}

.mini-card:hover {
    transform: translateY(-5px);
}

/* 선택된 카드 스타일 */
.mini-card.selected {
    border: 2px solid #ff7675;
    background: #ff7675;
    transform: translateY(-10px);
    box-shadow: 0 0 10px rgba(255, 118, 117, 0.5);
}

/* [결과 화면 스타일] */
.synthesis-box {
    background: #f8f9fa;
    border-left: 5px solid #6c5ce7;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
    text-align: left;
}

.synthesis-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    word-break: keep-all;
}

.spread-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.spread-card {
    flex: 1;
    min-width: 250px; /* 모바일에서 한 줄씩 나오게 */
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-top: 5px solid #d4af37;
}

.spread-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.tarot-img-small {
    font-size: 4rem;
    margin: 10px 0;
}

.spread-desc {
    font-size: 0.95rem;
    color: #555;
    margin-top: 10px;
    line-height: 1.5;
    word-break: keep-all;
}

/* 모드 선택 버튼 영역 (간격 수정됨) */
.mode-selector {
    display: flex;
    justify-content: center;
    gap: 10px;

    /* ★ 핵심 수정: 위아래 여백을 넉넉하게 추가 */
    margin-top: 10px;    /* 헤더 설명글과의 간격 */
    margin-bottom: 10px; /* 아래 게임 영역과의 간격 */
}

.mode-btn {
    padding: 10px 20px;
    border: 2px solid #d4af37;
    background: white;
    color: #333;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.mode-btn:hover {
    background: #fcf8e3;
}

/* 활성화된 버튼 스타일 */
.mode-btn.active {
    background: #d4af37;
    color: white;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
}

/* 3카드 모드 결과창의 작은 이미지 */
.tarot-img-small {
    font-size: 3rem;
    margin: 10px 0;
}

/* =========================================
   버튼 디자인 (타로/운세 전용)
   ========================================= */

/* 1. [결과 확인하기] 버튼 (가장 화려함) */
#btn-reveal, #btn-reveal-three {
    background: linear-gradient(45deg, #d4af37, #f1c40f); /* 금빛 그라데이션 */
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px 40px;
    border: none;
    border-radius: 50px; /* 둥근 알약 모양 */
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4); /* 금색 그림자 */
    transition: all 0.3s ease;
    animation: pulse 2s infinite; /* 두근두근 효과 */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    display: block;
    margin: 20px auto; /* 가운데 정렬 */
}

#btn-reveal:hover, #btn-reveal-three:hover {
    transform: translateY(-3px) scale(1.05); /* 살짝 커지며 올라감 */
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.6);
}

/* 두근두근 애니메이션 */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* 1. 버튼을 감싸는 그룹 */
.btn-group {
    display: flex;           /* 가로 배치 */
    justify-content: center; /* 가운데 정렬 */
    gap: 15px;               /* ★ 버튼 사이 간격은 여기서 담당 */
    width: 100%;
    max-width: 360px;
    margin: 30px auto 0;     /* 그룹 전체의 위쪽 여백 */
}

/* 2. 두 버튼의 공통 스타일 */
.btn-reset, .btn-home {
    flex: 1;                 /* 1:1 비율로 공간 차지 */
    height: 52px;            /* 높이 고정 */
    margin: 0;               /* ★ 핵심: 기존 마진 제거 (gap이 대신함) */
    padding: 0;              /* 패딩 0 (flex 정렬로 대체) */

    display: flex;           /* 내부 정렬 */
    align-items: center;
    justify-content: center;
    gap: 8px;                /* 아이콘과 글자 사이 간격 */

    font-size: 1rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

/* 3. [다시 뽑기] 색상 */
.btn-reset {
    background: #6c5ce7;
    color: white;
    border: 1px solid transparent;
}

.btn-reset:hover {
    background: #5649c0;
    transform: translateY(-2px);
}

/* 4. [홈으로] 색상 */
.btn-home {
    background: #f1f2f6;
    color: #57606f;
    border: 1px solid #dfe4ea;
}

.btn-home:hover {
    background: #dfe4ea;
    color: #2f3542;
    transform: translateY(-2px);
}

/* 기존 .tarot-img, .tarot-img-small 스타일을 수정하거나 아래 코드를 추가하세요 */

/* 결과 화면의 카드 이미지 컨테이너 */
.tarot-img, .tarot-img-small {
    width: 100%;
    max-width: 200px; /* PC에서 너무 커지지 않게 제한 */
    margin: 0 auto 15px; /* 가운데 정렬 및 아래 여백 */
    border-radius: 10px;
    overflow: hidden; /* 둥근 모서리 적용 */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); /* 그림자 효과 */
    font-size: 0; /* 이모지 텍스트 잔여물 제거 */
}

/* 실제 이미지 태그 스타일 */
.real-card-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* 비율 유지하며 꽉 채우기 */
}

/* 3장 결과 화면에서 카드 크기 조정 (모바일 대응) */
.spread-card .tarot-img-small {
    max-width: 150px; /* 3장 나열될 때는 조금 작게 */
}