/* 타로카드 게임 스타일 */
.tarot-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    min-height: 100vh;
    padding-bottom: calc(50px + 20px); /* 스크롤버튼 + 띠배너1번 + 띠배너여백 + 고정배너 + 여백 */
}

.tarot-header {
    text-align: center;
    margin-bottom: 40px;
}

.tarot-title {
    font-size: 42px;
    font-weight: 700;
    color: #2D2D2D;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 182, 193, 0.5);
}

.tarot-subtitle {
    font-size: 18px;
    color: #5A5A5A;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 설정 영역 */
.setup-section {
    animation: fadeInUp 0.6s ease;
}

.setup-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    box-shadow: var(--shadow-lg);
}

.setup-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.form-group label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.spread-select {
    padding: 16px 20px;
    border: 2px solid #f0f0f0;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.spread-select:focus {
    outline: none;
    border-color: var(--primary-pink);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 182, 193, 0.1);
}

.spread-select {
    cursor: pointer;
}

.draw-btn {
    width: 100%;
    padding: 18px 32px;
    background: var(--gradient-1);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    font-family: 'Pretendard', sans-serif;
    margin-top: 10px;
}

.draw-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.draw-btn:active {
    transform: translateY(0);
}

/* 카드 섹션 */
.card-section {
    animation: fadeInUp 0.6s ease;
}

.card-section.hidden {
    display: none;
}

.spread-info {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.spread-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.spread-info p {
    font-size: 16px;
    color: var(--text-medium);
}

/* 카드 컨테이너 */
.cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
    margin-bottom: 30px;
    min-height: 300px;
}

/* 타로카드 */
.tarot-card {
    width: 140px;
    height: 240px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    perspective: 1000px;
}

.tarot-card:hover {
    transform: translateY(-10px);
}

.tarot-card.flipped {
    cursor: default;
}

.tarot-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.tarot-card.flipped .tarot-card-inner {
    transform: rotateY(180deg);
}

.card-back,
.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: rotateY(0deg);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.card-back::before {
    content: '🔮';
    font-size: 60px;
    opacity: 0.8;
}

.card-front {
    background: white;
    transform: rotateY(180deg);
    flex-direction: column;
    padding: 16px;
    border: 2px solid #f0f0f0;
}

.card-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: 8px;
}

.card-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.card-meaning {
    font-size: 12px;
    color: var(--text-medium);
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-front.reversed {
    transform: rotateY(180deg) rotate(180deg);
}

.card-front.reversed .card-name::after {
    content: ' (역방향)';
    font-size: 14px;
    color: var(--text-light);
}

/* 결과 섹션 */
.result-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease;
}

.result-section.hidden {
    display: none;
}

.result-content {
    text-align: center;
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.result-card-item {
    background: #fafafa;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
    border-left: 4px solid var(--primary-pink);
}

.result-card-item:last-child {
    margin-bottom: 0;
}

.result-card-position {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-pink);
    margin-bottom: 8px;
}

.result-card-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.result-card-meaning {
    font-size: 16px;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 12px;
}

.result-card-interpretation {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.7;
    background: white;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid #f0f0f0;
}

/* 다시하기 버튼 */
.reset-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--gradient-1);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    font-family: 'Pretendard', sans-serif;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.reset-btn:active {
    transform: translateY(0);
}

.reset-btn.hidden {
    display: none;
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardFlip {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(180deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 반응형 */
@media (max-width: 768px) {
    .tarot-container {
        padding: 20px 16px 80px;
        padding-bottom: calc(50px + 20px); /* 스크롤버튼 + 띠배너1번 + 띠배너여백 + 고정배너 + 여백 */
    }
    
    .tarot-title {
        font-size: 32px;
    }
    
    .setup-card {
        padding: 30px 20px;
    }
    
    .cards-container {
        gap: 15px;
    }
    
    .tarot-card {
        width: 120px;
        height: 200px;
    }
    
    .card-icon {
        font-size: 36px;
    }
    
    .card-name {
        font-size: 16px;
    }
}
